
var TitleColor,HeadColor,timepic,GoalColor,twidth
TitleColor="#6F68DA";
HeadColor="#94ADA5";
GoalColor="#00CCFF";
timepic="/gobooo/images/lxgg.gif";
twidth="600"

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function displayWindow(theURL,winName,width,height,features) { //v3.1
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = 100;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
}

function switchInfoTag(tabid,gifname)
{
   document.getElementById(tabid).blur();
   document.getElementById('yesterday').src="/gobooo/MiscBall/image/bf_end.gif";
   document.getElementById('today').src="/gobooo/MiscBall/image/bf_live.gif";
   document.getElementById('tomorrow').src="/gobooo/MiscBall/image/bf_next.gif";
   document.getElementById(tabid).src=gifname;
   
   ScoreFile="/gobooo/MiscBall/basketball/"+tabid+".xml";
   loadScore(m_language);
}

function sellanguage(language)
{
   loadScore(language);
}

function GetTableHead()
{
	var tablehead="";
	tablehead+="<table cellspacing=0 cellpadding=0 align=center bgcolor='#7FBA4E' border=0 width="+twidth+">";
	tablehead+="<tr><td align=center bgcolor='#ffffff'>";
	tablehead+="<table width='100%' border=0 align=center cellpadding=0 cellspacing=1 bordercolor='#FFFFFF'>";
	tablehead+="<tr  bordercolor='#FFFFFF'>";
	tablehead+="<td align='center' height=20  bgcolor='#BDDBA5' width='150'>联赛</td>";
	tablehead+="<td align='center'  bgcolor='#BDDBA5' width=100>赛事时间</td>";
	tablehead+="<td align='center'  bgcolor='#BDDBA5'>类别</td>";
	tablehead+="<td align='center'  bgcolor='#BDDBA5'>主场</td>";
	tablehead+="<td align='center'  bgcolor='#BDDBA5'>比分</td>";
	tablehead+="<td align='center'  bgcolor='#BDDBA5'>客场</td>";
	tablehead+="</tr>"
	return tablehead;
}


function selnextdate(sdate)
{
	var ScoreFile;
	ScoreFile=sdate + ".xml";
	var matchnamelist,matchkindlist,matchtimelist,hostteamlist,guestteamlist;
	
	var allhtml="";
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async="false";
	xmlDoc.load(ScoreFile);
	
	matchnamelist=xmlDoc.documentElement.selectNodes("//item/matchname");
	matchkindlist=xmlDoc.documentElement.selectNodes("//item/matchkind");
	matchtimelist=xmlDoc.documentElement.selectNodes("//item/matchtime");
	hostteamlist=xmlDoc.documentElement.selectNodes("//item/hostteam");
	guestteamlist=xmlDoc.documentElement.selectNodes("//item/guestteam");
	
	allhtml=GetTableHead();
		
	var i,n;
	n=matchnamelist.length;
	for (i=0;i<n;i++)
	{
		if (i % 2 == 0)
			allhtml+="<tr  bgcolor='#FFF6FE'>"
		else
			allhtml+="<tr  bgcolor='#EDF8FA'>"
			
		allhtml+="<td align='center' height='18' width='150'>"+matchnamelist(i).text+"</td>";
		allhtml+="<td align='center' width='100'>"+matchtimelist(i).text+"</td>";
		allhtml+="<td align='center' >"+matchkindlist(i).text+"</td>";
		allhtml+="<td align='center' ><font color='blue'>"+hostteamlist(i).text+"</font></td>";
		allhtml+="<td align='center' ><font color='red'>-</font></td>";
		allhtml+="<td align='center' ><font color='blue'>"+guestteamlist(i).text+"</font></font></td>";
		allhtml+="</tr>"
	}
	allhtml+="</table></td></tr></table>";
	document.all["TennisScore"].innerHTML=allhtml;
}

