﻿var zArray=new Array();
var LeagueAry=new Array();

function zLiveBuildObj(){
var XmlTimeHttp = null;
var XmlLiveHttp = null;
var ShowTimeTimerID = null;
var ShowLiveTimerID = null;
var ShowPopTimerID = null
var UpTimes = 2000;
var LiveDocOld = "";
var isIE = true;
var IeVersion = "";
var RemberTime =(new Date()).getTime()/1000;
var DiShowPlaySound = getCookie("DiShowPlaySound");
var DiShowWindow = getCookie("DiShowWindow");
var DiShowPopTxt = getCookie("DiShowPopTxt");
if(""!=DiShowPlaySound){document.getElementsByName("showgoal_s")[0].checked=false;}
if(""!=DiShowWindow){document.getElementsByName("showgoal_f")[0].checked=false;}
if(""!=DiShowPopTxt){document.getElementsByName("showscroller")[0].checked=false;}

var tmp_ico_goal = new Image();
var tmp_ico_live = new Image();

tmp_ico_goal.src='../images/goal.gif';
tmp_ico_live.src='../images/live.gif';

var ico_goal="<img src='"+tmp_ico_goal.src+"' border=0 width=13>";
this.ico_live = "<img src='"+tmp_ico_live.src+"' border=0 width=8 height=8>&nbsp;";

this.LCounts = 0;
this.PageLoaded = 0;

this.Create = function(free){
	try{
		if(free){CanFree = true};
		if(window.ActiveXObject){
			var bActivexFound=false;
			var msxmls = ['MSXML2.XMLHttp.6.0','MSXML2.XMLHttp.5.0','MSXML2.XMLHttp.4.0','MSXML2.XMLHttp.3.0',
'MSXML2.XMLHttp', 'Microsoft.XMLHttp'];
			for(var i=0;i<msxmls.length && !bActivexFound;i++)
			{
				try{ XmlTimeHttp=new ActiveXObject(msxmls[i]); XmlLiveHttp=new ActiveXObject(msxmls[i]); bActivexFound=true; }catch (e1){}
			}
			IeVersion=Number(navigator.appVersion.split(";")[1].replace("MSIE ",""));
		}else{
			XmlTimeHttp=new XMLHttpRequest(); XmlLiveHttp=new XMLHttpRequest(); isIE=false;
		}
		return true;
	}catch(e2){return false;}
}

this.SynSend = function(){
	try{
		XmlTimeHttp.open("GET", "../js/time.xml?"+Date.parse(new Date()), true);    
		XmlTimeHttp.onreadystatechange = this.TimeStateChange; 
		XmlTimeHttp.send(null);
	}catch(e){}
}

this.LiveSend = function(){
	try{
		XmlLiveHttp.open("GET", "../js/live_2004.xml?"+Date.parse(new Date()), true);    
		XmlLiveHttp.onreadystatechange = utilityOBJ.LiveStateChange; 
		XmlLiveHttp.send(null);
	}catch(e){}
	if(ShowLiveTimerID){clearInterval(ShowLiveTimerID);}
	ShowLiveTimerID=setInterval(utilityOBJ.LiveSend,UpTimes);
}

this.PostUpdataPage = function(){ document.getElementById("I_zQzzData").contentWindow.PageReload(); }

this.LiveStateChange = function(){
	try{
		if(XmlLiveHttp.readyState!=4 || (XmlLiveHttp.status!=200 && XmlLiveHttp.status!=0)){return;}
		var d=new Date();
		var newDoc=XmlLiveHttp.responseText;
		if(newDoc!=""){RemberTime=d.getTime()/1000;}
		if(LiveDocOld==newDoc || newDoc==""){return;}
		var finNm=0;
		var LNmi=0;
		var popAry=new Array();
		var popWin=0;
		while(finNm!=-1)
		{
			finNm=newDoc.indexOf("<G>",finNm);
			if(finNm==-1){break;}
			var fs1=finNm+3;
			var fs2=newDoc.indexOf("</G>",fs1);
			var rs=newDoc.substring(fs1,fs2).split("#");
			if(LNmi==0)
			{
				if(UpTimes!=rs[2]){UpTimes=rs[2];}
				if(utilityOBJ.LCounts!=rs[0]){utilityOBJ.LCounts=rs[0];window.setTimeout("utilityOBJ.PostUpdataPage()",6000);return;}
			}else{
				if(zArray["z"+k] == "undefined"){continue;}
				
				var k=rs[0];
				var isCheck=document.getElementById("select_"+k).checked;
				if(zArray["z"+k].stim!=rs[4])
				{
					if(isCheck){utilityOBJ.ShowTheMessage("<b>"+SssAry[rs[4]]+"</b>&nbsp;"+zArray["z"+k].ss+" "+zArray["z"+k].tama+"&nbsp;"+rs[2]+"&nbsp;"+zArray["z"+k].tamb+"<br>");}
					if(rs[4] == 0 || rs[4] == 3){document.getElementById("time_"+k).innerHTML=FixedTime(rs[1]);}
					if(rs[4] == 1){document.getElementById("time_"+k).innerHTML=utilityOBJ.ico_live+"<font color=#CC0000>&nbsp;1'</font>";}
					if(rs[4] == 2){document.getElementById("time_"+k).innerHTML=utilityOBJ.ico_live+"<font color=#CC0000>46'</font>";}
					if(rs[4] == 4 || rs[4] == 5 || rs[4] == 8)
					{
						document.getElementById("time_"+k).innerHTML = FixedTime(rs[1]);
						var ThisItem=document.getElementById("ss_"+k).parentNode;
						ThisItem.cells[1].className="tda2";
						ThisItem.cells[2].className="tda2";
						ThisItem.cells[3].className="tdb2";
						ThisItem.cells[4].className="tda2";
						ThisItem.cells[4].style.color="#EE0000";
						ThisItem.cells[4].style.fontSize="8pt";
						ThisItem.cells[5].className="tdb2";
						ThisItem.cells[6].className="tda2";
						ThisItem.cells[7].className="tdb2";
						ThisItem.cells[8].className="tda2";
						var TmpItem = document.getElementById("tr_over");
						TmpItem.parentNode.insertBefore(document.getElementById("stime_" + k).parentNode,TmpItem);
						if(document.getElementById("tdmID_"+k) != null){TmpItem.parentNode.insertBefore(document.getElementById("tdmID_"+k).parentNode,TmpItem);}
					}
					if(rs[4] == 6 || rs[4] == 7){document.getElementById("time_"+k).innerHTML=utilityOBJ.ico_live;}
					document.getElementById("stime_"+k).innerHTML = SssAry[rs[4]];
					document.getElementById("score_"+k).innerHTML = rs[2];
					document.getElementById("half_"+k).innerHTML=rs[3];
					zArray["z"+k].stim=rs[4];
					zArray["z"+k].scoe=rs[2];
					zArray["z"+k].half=rs[3];
					continue;
				}

				if(zArray["z"+k].scoe != rs[2])
				{
					var OScore=zArray["z"+k].scoe.split("-");
					var NScore=rs[2].split("-");
					zArray["z"+k].scoe=rs[2];

					var tmpAtm=zArray["z"+k].tama;
					var tmpBtm=zArray["z"+k].tamb;

					if(NScore[0] != OScore[0])
					{
						NScore[0]="<font color=red>"+NScore[0]+"</font>";
						tmpAtm="<font color=red>"+tmpAtm+"</font>";
						document.getElementById("TeamA_"+k).className="tdgo";
					}
					if(NScore[1] != OScore[1])
					{
						NScore[1]="<font color=red>"+NScore[1]+"</font>";
						tmpBtm="<font color=red>"+tmpBtm+"</font>";
						document.getElementById("TeamB_"+k).className="tdgo";
					}
	
					var tmpScore = NScore[0]+"-"+NScore[1];
					document.getElementById("score_"+k).innerHTML=tmpScore;
					zArray["z"+k].updatetime=d.getTime()/1000;
					window.setTimeout("utilityOBJ.ClearSytle("+k+")",60000);
					if(isCheck)
					{
						utilityOBJ.ShowTheMessage(ico_goal+"&nbsp;"+zArray["z"+k].ss+"&nbsp;"+tmpAtm+"&nbsp;"+tmpScore+"&nbsp;"+tmpBtm+"<br>");
						if(document.getElementsByName("showgoal_s")[0].checked){document.getElementById("PlaySound").innerHTML=sound_B;}
						if(document.getElementsByName("showgoal_f")[0].checked && IeVersion > 5 && isIE==true)
						{
							popAry[popWin] = "<tr height=18><td align=center colspan=3>"+
							"				"+ico_goal+"&nbsp;&nbsp;"+zArray["z"+k].ss+"&nbsp;&nbsp;"+document.getElementById("time_"+k).innerHTML+
							"			</td></tr><tr height=20>"+
							"				<td align=right width='40%' noWrap>"+tmpAtm+"&nbsp;&nbsp;"+
							"				<td align=center width='20%' noWrap><b style='font-family:Verdana;'>"+tmpScore+
							"				<td width='40%' noWrap>&nbsp;&nbsp;"+tmpBtm+
							"			</tr>";
							popWin++;
						}
					}
				}

				if(zArray["z"+k].half != rs[3]){zArray["z"+k].half=rs[3];document.getElementById("half_"+k).innerHTML=rs[3];}
	
				if(zArray["z"+k].time != rs[1]){zArray["z"+k].time=rs[1];document.getElementById("time_"+k).innerHTML=FixedTime(rs[1]);}

				if(zArray["z"+k].reda != rs[5])
				{	
					zArray["z"+k].reda=rs[5];
					document.getElementById("TeamA_"+k).innerHTML = "<span class=tred>"+rs[5]+"</span>&nbsp;"+zArray["z"+k].tama;
					if(isCheck){utilityOBJ.ShowTheMessage("<img src='../images/redcard.gif' border=0 width=13>&nbsp;"+zArray["z"+k].ss+"&nbsp;<font color=#CC6600>"+zArray["z"+k].tama+"</font>&nbsp;"+rs[2]+"&nbsp;"+zArray["z"+k].tamb+"<br>");}
				}
				if(zArray["z"+k].redb != rs[6])
				{	
					zArray["z"+k].redb=rs[6];
					document.getElementById("TeamB_"+k).innerHTML = zArray["z"+k].tamb+"&nbsp;<span class=tred>"+rs[6]+"</span>";
					if(isCheck){utilityOBJ.ShowTheMessage("<img src='../images/redcard.gif' border=0 width=13>&nbsp;"+zArray["z"+k].ss+"&nbsp;"+zArray["z"+k].tama+"&nbsp;"+rs[2]+"&nbsp;<font color=#CC6600>"+zArray["z"+k].tamb+"</font><br>");}
				}

				if(zArray["z"+k].mess!=rs[7] && LANG!="2")
				{
					zArray["z"+k].mess=rs[7];
					if(rs[7]!="")
					{
						var reString=rs[7].replace(/\\/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">");
						if(document.getElementById("tdmID_"+k) != null)
						{
							document.getElementById("tdmID_"+k).innerHTML=reString;
						}else{
							var tmpTR=document.createElement("tr");if(!document.getElementById("select_"+k).checked){tmpTR.style.display = "none";}
							var tmpTD=document.createElement("td");tmpTD.colSpan = 9;tmpTD.className="tdms";tmpTD.id="tdmID_"+k;tmpTD.innerHTML=reString;
							tmpTR.appendChild(tmpTD);
							var TmpNode=document.getElementById("score_"+k).parentNode;
							TmpNode.parentNode.insertBefore(tmpTR,TmpNode.nextSibling);
						}
					}else{
						if(document.getElementById("tdmID_"+k) != null){var TmpNode = document.getElementById("tdmID_"+k).parentNode; TmpNode.parentNode.removeChild(TmpNode);}
					} 
				}
			}

			finNm=fs2;
			LNmi++

			if(popWin > 0 && isIE==true)
			{
				var TmpShowTxt="<table bordercolor=black border=1 cellspacing=0 cellpadding=0 style='font-size:9pt;border-collapse:collapse' width='100%'><tr><td>"+
				"			<table bgcolor=#FFFFFF bordercolor=#FFFFFF border=1 cellspacing=0 cellpadding=2 style='font-size:9pt;border-collapse:collapse' width='100%'>"+
				"			<tr><td align=center style='background-color:#3366FF;color:white;font-family:Arial;font-Weight:bold'>"+
				"				<i>GOAL!!!</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='font-size:7pt'>CopyRight &copy; www.zQzz.com</font>"+
				"			</td></tr>"+
				"			<tr><td align=center  style='font-family:Verdana;'>"+
				"				<table border=1 width='100%' borderColor='#E0E0E0' cellpadding=0 style='font-size:9pt;border-collapse:collapse'>"+popAry.join("")+"</table>"+
				"			</td></tr><td align=center style='background-color:#7D9EFF;color:white;'>欢迎观看知足比分 [按鼠标右键关闭此窗口]</td></tr></table>"+
				"		</td></tr></table>";
				utilityOBJ.ShowTheWindows(TmpShowTxt,popWin);
			}
		}
		LiveDocOld=newDoc;
	}catch(e){}
}

this.ClearSytle = function(k){
	var d=new Date();
	var GoOutTime = d.getTime()/1000 - zArray["z"+k].updatetime;
	if(GoOutTime > 29.8)
	{
		document.getElementById("score_"+k).innerHTML = zArray["z"+k].scoe;
		document.getElementById("TeamA_"+k).className = "tdb1";
		document.getElementById("TeamB_"+k).className = "tdb1";
	}
}

this.ShowTheMessage = function(Message){
	var Item = document.getElementById("zqzz_showgoaltext");
	if(Item.parentNode.style.display=="none" && document.getElementsByName("showscroller")[0].checked){Item.parentNode.style.display="";}
	var tmpMM=document.createElement("DIV");
	tmpMM.className="tdb1";
	tmpMM.innerHTML=Message
	Item.insertBefore(tmpMM,Item.firstChild)
	if(Item.getElementsByTagName("DIV").length>50){Item.removeChild(Item.getElementsByTagName("DIV")[Item.getElementsByTagName("DIV").length-1])}
}


this.ShowTheWindows = function(poptext,popWin){

	this.dismisspopup = function(){oPopup.hide();clearInterval(ShowPopTimerID);}

	this.pop=function(){
		oPopup.show(x,y,imagewidth,imageheight);
		if(ShowPopTimerID){clearInterval(ShowPopTimerID);}
		ShowPopTimerID=setInterval(this.dismisspopup,10000);
	}

	var thisHeight = popWin*39
	var imagewidth = 298;
	var imageheight = 49+thisHeight;
	var x = screen.width-imagewidth-1;
	var y = 1;
	var oPopup = window.createPopup();
	var oPopupBody = oPopup.document.body;
	oPopupBody.style.cursor = "hand";
	oPopupBody.innerHTML = poptext;
	oPopup.document.body.onmouseover = new Function("clearInterval(ShowPopTimerID)");
	oPopup.document.body.onclick = this.dismisspopup;
	oPopup.document.body.oncontextmenu = this.dismisspopup;
	this.pop();
}

this.TimeStateChange = function(){
	try{
		if(XmlTimeHttp.readyState!=4 || (XmlTimeHttp.status!=200 && XmlTimeHttp.status!=0)){return false;}
		var tmpTxt=XmlTimeHttp.responseText;
		var root = tmpTxt.substring(tmpTxt.indexOf("<i>")+3,tmpTxt.indexOf("</i>"));
		var rs = root.split(",");
		var serverTime = new Date(rs[0],rs[1],rs[2],rs[3],rs[4],rs[5]);
		var clientTime = new Date();
		diffTime = Math.round((serverTime-clientTime)/1000/60);
		XmlTimeHttp=null;
		utilityOBJ.Show_NowTimes();
	}catch(e){}
}

this.ShowDoingTime = function(){
	try{
		var d = new Date();
		for(key in zArray)
		{
			var id=zArray[key].lsid;
			var tmpStr="";
			if(zArray[key].stim == 6 || zArray[key].stim == 7 || zArray[key].stim == 9 || zArray[key].stim == 10 || zArray[key].stim == 11 || zArray[key].stim == 12){document.getElementById("time_"+id).innerHTML = utilityOBJ.ico_live;continue;}

			if(zArray[key].stim==1)
			{
				var sUTAry = zArray[key].time.split(",");
				var sMTime = new Date(sUTAry[0],sUTAry[1]-1,sUTAry[2],sUTAry[3],sUTAry[4],0);
				var sUTime = Math.round((d-sMTime)/1000/60+diffTime)-sUTAry[5];
				if(sUTime < 1){tmpStr = utilityOBJ.ico_live+"<font color=#CC0000>&nbsp;1'</font>";}
				if(sUTime > 45){tmpStr = utilityOBJ.ico_live+"<font color=#CC0000>45'</font>";}
				if(sUTime > 0 && sUTime < 46){ if(sUTime < 10){sUTime = "&nbsp;"+sUTime;} tmpStr = utilityOBJ.ico_live+"<font color=#CC0000>"+sUTime+"'</font>";} 
				document.getElementById("time_"+id).innerHTML = tmpStr; continue;
			}
			if(zArray[key].stim==2)
			{
				var sUTAry = zArray[key].time.split(",");
				var sMTime = new Date(sUTAry[0],sUTAry[1]-1,sUTAry[2],sUTAry[3],sUTAry[4],0);
				var sUTime = Math.round((d-sMTime)/1000/60+diffTime)-15-sUTAry[5];
				if(sUTime < 46){tmpStr = utilityOBJ.ico_live+"<font color=#CC0000>46'</font>";}
				if(sUTime > 90){tmpStr = utilityOBJ.ico_live+"<font color=#CC0000>90'</font>";}
				if(sUTime > 45 && sUTime < 91){ if(sUTime < 10){sUTime = "&nbsp;"+sUTime;} tmpStr = utilityOBJ.ico_live+"<font color=#CC0000>"+sUTime+"'</font>";} 
				document.getElementById("time_"+id).innerHTML = tmpStr; continue;
			}
		}
	}catch(e){}
}

this.Show_NowTimes = function(){
	try{
		if((new Date()).getTime()/1000-RemberTime > 10){/*if(confirm("数据连接已经断开，是否重新连接？\nThe Data Link Failed,Are You Reload?")){*/location.reload();} //}
		var d = new Date(new Date()*1+diffTime*1000*60);
		var YY = d.getFullYear();
		var MM = ((d.getMonth()+1) < 10)? "0"+(d.getMonth()+1):(d.getMonth()+1);
		var DD = (d.getDate() <10)? "0"+d.getDate():d.getDate();
		var ss = (d.getHours() <10)? "0"+d.getHours():d.getHours();
		var mm = (d.getMinutes() < 10)? "0"+d.getMinutes():d.getMinutes();
		document.getElementById("now_times").innerHTML = "[GMT+8]&nbsp;"+YY+"-"+MM+"-"+DD+" ("+ss+":"+mm+")";
		if(ShowTimeTimerID){clearInterval(ShowTimeTimerID);}
		ShowTimeTimerID=setInterval(utilityOBJ.Show_NowTimes,90000);
		if(utilityOBJ.PageLoaded==1){utilityOBJ.ShowDoingTime();}
	}catch(e){}
}

this.ClickLeagueDIV = function(){
	try{
		var tmpItem=document.getElementById("LeagueDataShow");
		var diyItem=document.getElementById("DiyOptionDIV");
		if(tmpItem.style.display=="none"){tmpItem.style.display="";}else{tmpItem.style.display="none";}
		tmpItem.style.top=diyItem.parentNode.parentNode.parentNode.parentNode.offsetTop+diyItem.offsetHeight+1;
		tmpItem.style.left=diyItem.parentNode.parentNode.parentNode.parentNode.offsetLeft+2;
	}catch(e){}
}

this.ClickOptionDIV = function(){
	try{
		var tmpItem=document.getElementById("OptionSelectShow");
		var diyItem=document.getElementById("DiyOptionDIV");
		if(tmpItem.style.display=="none"){tmpItem.style.display="";}else{tmpItem.style.display="none";}
		tmpItem.style.top=diyItem.parentNode.parentNode.parentNode.parentNode.offsetTop+diyItem.offsetHeight+1;
		tmpItem.style.left=diyItem.parentNode.parentNode.parentNode.parentNode.offsetLeft+2;
	}catch(e){}
}

this.ShowHiddenTr = function(id){
	if(!document.getElementById("select_"+id).checked)
	{
		document.getElementById("trID_"+id).style.display="none";
		if(document.getElementById("tdmID_"+id) != null){document.getElementById("tdmID_"+id).parentNode.style.display = "none";}
		var TmpNum = parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue);
		TmpNum++;
		document.getElementById("MatchHideNum").firstChild.nodeValue = TmpNum;
		DropIdAry+=":"+id;
		setCookie("DropIdAry",DropIdAry,1000*60*60*24);
	}
}

this.select_ssall = function(){
try{
	for(key in zArray)
	{
		var id=zArray[key].lsid;
		if(!document.getElementById("select_"+id).checked){
			document.getElementById("select_"+id).checked=true;
			document.getElementById("trID_"+id).style.display="";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="";}
		}
	}

	for(var i=0;i<LeagueAry.length;i++)
	{
		if(!document.getElementsByName("trss_"+i)[0].checked){document.getElementsByName("trss_"+i)[0].checked=true;}
	}
	document.getElementById("MatchHideNum").firstChild.nodeValue=0;
	setCookie("DropIdAry","",1000*60*60*24);
}catch(e){}
}

this.select_live = function(){
try{
	for(key in zArray)
	{
		var id=zArray[key].lsid;
		if(zArray[key].stim!=4 && zArray[key].stim!=5 & zArray[key].stim!=8 & zArray[key].stim!=0)
		{
			if(!document.getElementById("select_"+id).checked){
				document.getElementById("select_"+id).checked=true;
				document.getElementById("trID_"+id).style.display="";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="";}
				document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)-1;
				DropIdAry=DropIdAry.replace(":"+id,"");

			}
		}else{
			if(document.getElementById("select_"+id).checked){
				document.getElementById("select_"+id).checked=false;
				document.getElementById("trID_"+id).style.display="none";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="none";}
				document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)+1;
				DropIdAry+=":"+id;
			}
		}
	}
	setCookie("DropIdAry",DropIdAry,1000*60*60*24);
}catch(e){}
}

this.select_over = function(){
try{
	for(key in zArray)
	{
		var id=zArray[key].lsid;
		if(zArray[key].stim==4 || zArray[key].stim==5 || zArray[key].stim==8)
		{
			if(!document.getElementById("select_"+id).checked){
				document.getElementById("select_"+id).checked=true;
				document.getElementById("trID_"+id).style.display="";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="";}
				document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)-1;
				DropIdAry=DropIdAry.replace(":"+id,"");

			}
		}else{
			if(document.getElementById("select_"+id).checked){
				document.getElementById("select_"+id).checked=false;
				document.getElementById("trID_"+id).style.display="none";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="none";}
				document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)+1;
				DropIdAry+=":"+id;
			}
		}
	}
	setCookie("DropIdAry",DropIdAry,1000*60*60*24);
}catch(e){}
}

this.select_will = function(){
try{
	for(key in zArray)
	{
		var id=zArray[key].lsid;
		if(zArray[key].stim==0)
		{
			if(!document.getElementById("select_"+id).checked){
				document.getElementById("select_"+id).checked=true;
				document.getElementById("trID_"+id).style.display="";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="";}
				document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)-1;
				DropIdAry=DropIdAry.replace(":"+id,"");

			}
		}else{
			if(document.getElementById("select_"+id).checked){
				document.getElementById("select_"+id).checked=false;
				document.getElementById("trID_"+id).style.display="none";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="none";}
				document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)+1;
				DropIdAry+=":"+id;
			}
		}
	}
	setCookie("DropIdAry",DropIdAry,1000*60*60*24);
}catch(e){}
}

this.select_inverse = function(){
try{
	for(key in zArray)
	{
		var id=zArray[key].lsid;
		if(!document.getElementById("select_"+id).checked){
			document.getElementById("select_"+id).checked=true;
			document.getElementById("trID_"+id).style.display="";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="";}
			document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)-1;
			DropIdAry=DropIdAry.replace(":"+id,"");
		}else{
			document.getElementById("select_"+id).checked=false;
			document.getElementById("trID_"+id).style.display="none";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="none";}
			document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)+1;
			DropIdAry+=":"+id;
		}
	}

	for(var i=0;i<LeagueAry.length;i++)
	{
		if(document.getElementsByName("trss_"+i)[0].checked){document.getElementsByName("trss_"+i)[0].checked=false;}else{document.getElementsByName("trss_"+i)[0].checked=true;}
	}
	setCookie("DropIdAry",DropIdAry,1000*60*60*24);
}catch(e){}
}

this.select_ss = function(ss,ok){
try{

	for(key in zArray)
	{
		var id=zArray[key].lsid;
		if(zArray[key].ss==ss){
			if(ok){
				if(!document.getElementById("select_"+id).checked){
					document.getElementById("trID_"+id).style.display="";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="";}
					document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)-1;
					DropIdAry=DropIdAry.replace(":"+id,"");
				}
			}else{
				if(document.getElementById("select_"+id).checked){
					document.getElementById("trID_"+id).style.display="none";if(document.getElementById("tdmID_"+id)!=null){document.getElementById("tdmID_"+id).parentNode.style.display="none";}
					document.getElementById("MatchHideNum").firstChild.nodeValue=parseInt(document.getElementById("MatchHideNum").firstChild.nodeValue)+1;
					DropIdAry+=":"+id;
				}
			}
			document.getElementById("select_"+id).checked=ok;

		}
	}
	setCookie("DropIdAry",DropIdAry,1000*60*60*24);
}catch(e){}
}

this.Live_Class = function(rs){
	this.lsid=rs[1];this.colo=rs[2];
	this.tama=rs[3]; this.tamb=rs[6]; this.ss=rs[15]
	if(LANG==1){this.tama=rs[4]; this.tamb=rs[7]; this.ss=rs[23]}
	if(LANG==2){this.tama=rs[5]; this.tamb=rs[8]; this.ss=rs[16]}
	this.reda=rs[9];this.redb=rs[10];this.scoe=rs[11];this.half=rs[12];this.stim=rs[13];this.time=rs[14];this.mess=rs[22];this.updatetime=null;
}

}


