
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 EuropeOdds(ID) {
var theURL='xedh/oddslist.php?id='+ID;
window.open(theURL,'','width=750,height=520,top=40,left=40,resizable=yes,scrollbars=yes');}

function AsianOdds(ID) {
var theURL='xedh/AsianOdds_n.php?id='+ID;
window.open(theURL,'','width=620,height=408,top=40,left=90,resizable=yes,scrollbars=yes');}

function analysis(ID){
var theURL='xedh/analysis.php?id='+ID;
window.open(theURL,'','');
}

function teaminfo(teamID){
var theURL='xedh/team.php?id='+teamID;
window.open(theURL,'','');
}

function showgoallist(i){
var theURL="xedh/detail.php?id=" + A(i,1);
window.open(theURL,'','scrollbars=yes,resizable=yes,width=668, height=370,left=50,top=100');
}

function submit_info_query(url,form){  
//url = "http://www.betzc.com"+url+"?issueNumber=" + form.elements['issueNumber'].value;
//window.open(url,'','resizable=no,scrollbars=yes,width=580,height=555,top=20,left=100');
//return false;
}

function getCookie(name)
{
	var cname = name + "=";
	var dc = document.cookie;
	if (dc.length > 0) 
	{
		begin = dc.indexOf(cname);
		if (begin != -1) 
		{
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
			return dc.substring(begin, end);
		}
	}
	return null;
}
function writeCookie(name, value) 
{ 
	var expire = ""; 
	var hours = 365;
	expire = new Date((new Date()).getTime() + hours * 3600000); 
	expire = ";path=/; expires=" + expire.toGMTString(); 
	document.cookie = name + "=" + escape(value) + expire; 
}

//显示进球窗口
var startani_C,startani_A,startani_B,pop_TC

function ShowScoreWindow(sclass,team1,team2,score1,score2,entertime,index)
{
imagewidth=222;
imageheight=100;
var sText
sText= ""
var st

st="<table width=220 border=0 cellpadding=1 cellspacing=0 bgcolor=#FF9933>"
st=st + "  <tr><td><table width=220 border=0 cellpadding=0 cellspacing=0>"
st=st + "      <tr><td colspan=4><img src=bf_img/bf_open.gif width=220 height=26></td></tr>"
st=st + "      <tr bgcolor=#FFFFFF class=tr_color2 height=22 align=center>"
st=st + "      <td width=16%><font color=blue>" + sclass +"</font></td>"

if (index==1)
{ st=st + "        <td width=37%><div align=center  style='color:red;font-weight:bold;font-size:9pt'><strong>" + team1 +"</strong> </div></td>" }
else
{ st=st + "        <td width=37%><div align=center><strong>" + team1 +"</strong> </div></td>" }

st=st + "        <td width=10%><div align=center style='color:blue;font-weight:bold;'><font face='Arial, Helvetica, sans-serif'>VS</font></div></td>"

if (index==1)
{ st=st + "        <td width=37%><div align=center><strong>" + team2 +"</strong> </div></td>" }
else
{ st=st + "        <td width=37%><div align=center style='color:red;font-weight:bold;font-size:9pt'><strong>" + team2 +"</strong> </div></td>" }

st=st + "      </tr>"
st=st + "      <tr bgcolor=#FFFFFF class=tr_color3>"

if(index==1)
{ st=st + "        <td colspan=2><div align=center  style='color:red;font-weight:bold;'><strong><font size=5 face='Arial, Helvetica, sans-serif'>" + score1 + "</font></strong></div></td>"}
else
{ st=st + "        <td colspan=2><div align=center><strong><font size=5 face='Arial, Helvetica, sans-serif'>" + score1 + "</font></strong></div></td>"}

st=st + "        <td><div align=center class=f1>：</div></td>"

if(index==1)
{ st=st + "        <td><div align=center><strong><font size=5 face='Arial, Helvetica, sans-serif'>" + score2 + "</font></strong></div></td>"}
else
{ st=st + "        <td><div align=center  style='color:red;font-weight:bold;'><strong><font size=5 face='Arial, Helvetica, sans-serif'>" + score2 + "</font></strong></div></td>"}

st=st + "      </tr>"
st=st + "      <tr bgcolor=#FFFFFF>"
st=st + "        <td height=20 colspan=4 class='tr_color3'><div align=center>比赛进行了" + entertime + "分钟</div></td>"
st=st + "        </tr>"
st=st + "    </table></td>"
st=st + "  </tr>"
st=st + "</table>"  
sText=st
sText=sText + "<link rel='stylesheet' type='text/css' href='style.css'>"
oPopup = window.createPopup();
oPopupBody = oPopup.document.body;
oPopupBody.bgColor="white";

oPopupBody.innerHTML = sText
x=screen.width-imagewidth-20;
y= screen.height-imageheight-40;
oPopupBody.style.cursor="hand";
oPopup.document.body.onmouseover=new Function("clearTimeout(startani_A)");
oPopup.document.body.onmouseout=pop;    
oPopup.document.body.onclick=dismisspopup;
oPopup.document.body.oncontextmenu=dismisspopup;
pop_TC=200;
pop();
}

//显示变盘窗口
function ShowGoalWindow(team1,team2,upodds,downodds,goal)
{
 imagewidth=220
 imageheight=81
var sText
sText= ""
var st

st="<table width=220 border=0 cellpadding=1 cellspacing=0 bgcolor=#FF9933>"
st=st + "  <tr>"
st=st + "    <td><table width=218 border=0 cellpadding=0 cellspacing=0>"
st=st + "      <tr>"
st=st + "        <td colspan=3><img src=../image/bf_open.gif width=218 height=26></td>"
st=st + "      </tr>"
st=st + "      <tr bgcolor=#FFFFFF class=tr_color2 height=22>"
st=st + "        <td width=45%><div align=center><strong>" + team1 +"</strong> </div></td>"
st=st + "        <td width=10%><div align=center style='color:blue;font-weight:bold;'><font face='Arial, Helvetica, sans-serif'>VS</font></div></td>"
st=st + "        <td width=45%><div align=center><strong>" + team2 +"</strong> </div></td>" 
st=st + "      </tr>"
st=st + "      <tr bgcolor=#FFFFFF class=tr_color3 height=30>"
st=st + " 		   <td colspan=3><table width=218 border=0 cellpadding=0 cellspacing=0><tr>"

st=st + "					<td align=center class=odds>" + upodds + "</td>"
st=st + "     	 			<td align=center class=goal_R> "+goal+"</td>"
st=st + "			        <td align=center class=odds>" + downodds + "</td>"
st=st + "    		  </tr></table></td>"
st=st + "      </tr>"
st=st + "    </table></td>"
st=st + "  </tr>"
st=st + "</table>"  
sText=st
sText=sText + "<link rel='stylesheet' type='text/css' href='../xmlscript/style.css'>"
oPopup = window.createPopup();
oPopupBody = oPopup.document.body;
oPopupBody.bgColor="white";

oPopupBody.innerHTML = sText
x=screen.width-imagewidth-20;
y= screen.height-imageheight-40;
oPopupBody.style.cursor="hand";
oPopup.document.body.onmouseover=new Function("clearTimeout(startani_A)");
oPopup.document.body.onmouseout=pop;    
oPopup.document.body.onclick=dismisspopup;
oPopup.document.body.oncontextmenu=dismisspopup;
pop_TC=200;
pop();

}

function pop(){
	oPopup.show(x,y,imagewidth, imageheight);
	startani_A=setTimeout("pop()",100);  //显示15秒
	if(pop_TC<0){dismisspopup();};
	pop_TC=pop_TC-1;
}
function dismisspopup()
{	clearTimeout(startani_A);
	oPopup.hide();
}
