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='http://live.123zq.net/jsp/123/1x2.jsp?id='+ID+'';
window.open(theURL,'','width=700,height=520,top=40,left=40,resizable=yes,scrollbars=yes');}

function AsianOdds(ID) {
var theURL='http://live.123zq.net/jsp/123/asia.jsp?id='+ID;
window.open(theURL,'','');}

function analysis(ID){
var theURL='http://live.123zq.net/jsp/123/info.jsp?id='+ID+'';
window.open(theURL,'','');
}

function dxq(ID,t1,t2){
var theURL='http://live.123zq.net/jsp/123/dx.jsp?id='+ID+'&team1=' + t1 +' &team2='+ t2;
window.open(theURL,'','');
}

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; 
}

//显示变盘窗口
function ShowGoalWindow(team1,team2,upodds,downodds,goal)
{
 imagewidth=230
 imageheight=81
var sText
sText= ""
var st
//提示窗口
st="<table width=230 border=0 cellpadding=1 cellspacing=0 bgcolor=#336699>"
st=st + "  <tr>"
st=st + "    <td><table width=228 border=0 cellpadding=0 cellspacing=0>"
st=st + "      <tr>"
st=st + "        <td colspan=3 bgcolor=#336699 height=27><span style='width: 92%;text-align: center;color:#ffffff;'>變盤提示窗</span><img src=/image/close_1.gif  border=0 title=点击关闭窗口 align='absmiddle'></span></td>"
st=st + "      </tr>"
st=st + "      <tr bgcolor=#FFFFFF class=tr_color2 height=22>"
st=st + "        <td width=30%><div align=center><strong>" + team1 +"</strong> </div></td>"
st=st + "        <td width=40%><div align=center style='color:blue;'>" + sclassname +"</div></td>"
st=st + "        <td width=30%><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=228 border=0 cellpadding=0 cellspacing=0><tr>"

st=st + "					<td align=center width=30% class=odds>" + upodds + "</td>"
st=st + "     	 			<td align=center width=40% class=goal_R> "+goal+"</td>"
st=st + "			        <td align=center width=30% 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='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();

}
function daohang(){
if(!document.ns){
    var top=document.body.scrollTop;
    if(top==0) top=document.documentElement.scrollTop;
    if(top>280){
        divDaohang.style.top=top;
        divDaohang.style.left=(document.documentElement.scrollWidth-630)/2;
        document.getElementById("divDaohang").style.display="";
    }
    else
        document.getElementById("divDaohang").style.display="none";
}
setTimeout("daohang();",200)}
