﻿var IsRefresh=false;
var IsRootDir="";
function PlaySwf(ID,Frame)
{
	$("imgAds1").src=IsRootDir+"images/tan2.gif";
	$("imgAds2").src=IsRootDir+"images/tan2.gif";
	$("imgAds3").src=IsRootDir+"images/tan2.gif";
	$("imgAds4").src=IsRootDir+"images/tan2.gif";
	$("aAds1").style.color="#848484";
	$("aAds2").style.color="#848484";
	$("aAds3").style.color="#848484";
	$("aAds4").style.color="#848484";
	$("imgAds"+ID).src=IsRootDir+"images/tan1.gif";
	$("aAds"+ID).style.color="#0D2C85";
	document.getElementById("swfAds").GotoFrame(Frame);
	document.getElementById("swfAds").Play();
}
function DisplayNews(ID,me)
{
	if($("trNews"+ID).style.display=="none")
	{
		$("trNews"+ID).style.display="";
		me.src="images/sanjiao.gif";
	}
	else
	{
		$("trNews"+ID).style.display="none";
		me.src="images/sanjiao2.gif";
	}
	DivAutoHeight();
}
function ShowGameList()
{
	if($("tbGameList").style.display=="none")
	{
		$("tbGameList").style.display="";
		$("imgGameList").src="images/close.gif";
	}
	else
	{
		$("tbGameList").style.display="none";
		$("imgGameList").src="images/open.gif";
	}
	DivAutoHeight();
}
function ServiceScore()
{
	g4pgold.ajax.common.ServiceScore(ServiceScore1);
}
function ServiceScore1(response)
{
	var dt=response.value;
	var result="";
	var Count=dt.Rows.length;
	for(var i=0;i<Count;i++)
	{		
		result+="	<tr>";
		result+="		<td align=\"left\" style=\"PADDING-LEFT:25px\" class=\"td_1px\">"+dt.Rows[i].TradeID+"</td>";
		result+="		<td align=\"left\" style=\"PADDING-LEFT:25px\" class=\"td_1px\">"+dt.Rows[i].Unit+"&nbsp;"+dt.Rows[i].GameName+"</td>";
		result+="		<td align=\"left\" style=\"PADDING-LEFT:25px\" class=\"td_1px\"><img src=\"images/xing"+dt.Rows[i].Score+".jpg\"></td>";
		result+="	</tr>";
	}
	if(result!="")
	{
		var tbTitle="<tr><td width=\"150\" align=\"center\" class=\"td_1px\">Player's Name</td><td width=\"260\" align=\"center\" class=\"td_1px\">Product</td><td align=\"center\" class=\"td_1px\">Satisfaction</td></tr>";
		result="<table align=\"left\" style=\"FONT-WEIGHT:bold; FONT-SIZE:12px; LINE-HEIGHT:35px\" class=\"tb_1px\" width=\"100%\"	border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"+tbTitle+result+"</table>";
	}
	$("divServiceScore").innerHTML=result;
	DivAutoHeight();
}
function DisplayBtn(ID1,ID2)
{
	$("divAdsStep"+ID1).style.display="none";
	$("divAdsStep"+ID2).style.display="";
}
function WebRefresh()
{
	RefreshInfo();
	ServiceScore();
}
ServiceScore();
var MyInterval=setInterval("WebRefresh()",1000*60*5);