﻿
function Product_Init(Att)
{
	if(Att=="1")
	{
		ShowLayer_Frame_Init("span_Message",300,200,"留言",1,"");
		ShowLayer_Frame_Init("span_Comment",300,180,"产品评论",1,"");
		ShowLayer_Frame_Init("span_Credit_Comment",300,180,"企业信用评价",1,"");
	}else{
		ShowLayer_Frame_Init("span_Message",300,200,"留言",1,"");
		ShowLayer_Frame_Init("span_Comment",300,180,"产品评论",1,"");
		ShowLayer_Frame_Init("span_Credit_Comment",300,180,"企业信用评价",1,"");
	}
	
}

function SelectIntro(Sv)
{
	Sv=parseInt(Sv);
	var Intro_x;
	var Intro_Div_x;
	for(var i=0;i<5;i++)
	{
		Intro_x=eval("Intro_"+i);
		Intro_Div_x=eval("Intro_Div_"+i);
		if(Sv==i)
		{
			Intro_x.className="piiselected";
			Intro_Div_x.className="piiintro_selected";
		}else{
			Intro_x.className="piiselect";
			Intro_Div_x.className="piiintro";
		}
	}
}

function RFQ(Buy_Type,ProductID)
{
	setCookie("Product_RFQ_Url",location.href,1);
	location.href="/CN/Product/Product_RFQ.aspx?Buy_Type="+Buy_Type+"&ID="+ProductID;
}

function Message(Buy_Type,ProductID)
{
	ShowLayer_Frame_ShowLayer_Span("span_Message","/CN/Product/Product_Message.aspx?Buy_Type="+Buy_Type+"&ProductID="+ProductID);
}

function Message_Close()
{
	ShowLayer_Frame_Close_ShowLayer("span_Message");
}

function Fav(Buy_Type,ProductID)
{
	setCookie("Product_Fav_Url",location.href,1);
	location.href="/CN/Product/Product_AddFavorite.aspx?Buy_Type="+Buy_Type+"&ProductID="+ProductID
	//ShowLayer_Frame_ShowLayer_Span("span_Fav","Product_AddFavorite.aspx?Buy_Type="+Buy_Type+"&ProductID="+ProductID);
}

function Fav_Close()
{
	//ShowLayer_Frame_Close_ShowLayer("span_Fav");
}

//产品评论开始
function Comment(Buy_Type,ProductID)
{
	ShowLayer_Frame_ShowLayer_Span("span_Comment","/CN/Product/Product_Comment.aspx?Buy_Type="+Buy_Type+"&ProductID="+ProductID);
}

function Comment_Close()
{
	ShowLayer_Frame_Close_ShowLayer("span_Comment");
}

function Show_Comment_List(Buy_Type,ProductID)
{
	if(Comment_Text_List.innerHTML.trim()==""||Comment_Text_List.innerHTML.trim()=="暂无评论！")
	{
		LoadCommandDoc(Buy_Type,ProductID)
	}
}
//产品评论结束


//信用评价开始
function Credit_Comment(Buy_Type,ProductID)
{
	ShowLayer_Frame_ShowLayer_Span("span_Credit_Comment","/CN/Product/Product_Credit_Comment.aspx?Buy_Type="+Buy_Type+"&ProductID="+ProductID);
}

function Credit_Comment_Close()
{
	ShowLayer_Frame_Close_ShowLayer("span_Credit_Comment");
}

function Show_Credit_Comment_List(UserID,PostDegree)
{
	if(Credit_Comment_Text_List.innerHTML.trim()==""||Credit_Comment_Text_List.innerHTML.trim()=="该公司暂无信用评价信息！")
	{
		LoadCredit_CommandDoc(UserID,PostDegree)
	}
}
//信用评价结束


