document.writeln("<div id='user_top' style='text-algin:center' algin='center'>");
document.writeln(" <iframe src='/header.html' height='150' width='100%' frameborder='0' scrolling='no' marginwidth='0' marginheight='0'></iframe>");
document.writeln("</div>");
document.writeln('  <div id="ad">');
document.writeln("    <div class='ad1'><a href='http://www.zuqiubifen.com' target=_blank><img title='足球比分' src='upload/fixup/1.gif' width='160' height='45' /></a></div>");
document.writeln("    <div class='ad2'><a href='http://www.zuqiubifen.com/' target=_blank><img title='足球比分' src='upload/fixup/2.gif' width='490' height='45' /></a></div>");
document.writeln("    <div class='ad1'><a href='http://www.zuqiubifen.com/' target=_blank><img title='足球比分' src='upload/fixup/3.gif' width='160' height='45' /></a></div>");
document.writeln('    <div style="clear:both"></div>');
document.writeln('  </div>');

var right_layer=new Array();
var left_layer=new Array();
var imgheight=85;
var MyTop=-10;
var MyWidth=-10;

// 每次增加减少固定广告时需要改动其数量。
var left_ad_count=3;
var right_ad_count=3;
var left_layer_top=265+imgheight*left_ad_count;
var right_layer_top=265+imgheight*right_ad_count;


function set_image_ad()
{
	var mx_html="";
	for (var p in right_layer)
	{
		mx_html+="<div id='right"+p+"' style='position: absolute;width:90;top:"+(right_layer_top+imgheight*p)+";visibility:visible;z-index:3;'>";
		mx_html+=right_layer[p];
		mx_html+="</div>";
	}

	id_right_layer.innerHTML=mx_html;
	mx_html="";
	for (var p in left_layer)
	{
		mx_html+="<div id='left"+p+"' style='position: absolute;width:90;top:"+(left_layer_top+imgheight*p)+";visibility:visible;z-index:3;'>";
		mx_html+=left_layer[p];
		mx_html+="</div>";
	}
	id_left_layer.innerHTML=mx_html;
	myload();
}

function myload()
{
	if (document.documentElement.scrollTop==MyTop && document.body.clientWidth==MyWidth)
	{
		setTimeout("myload();",200);
		return false;
	}
	MyTop=document.body.scrollTop;
	if(MyTop==0) MyTop=document.documentElement.scrollTop;
	MyWidth=document.body.clientWidth;

	for (var p in right_layer)
	{
		var mlayer=eval("right"+p);
		var new_top=MyTop+200+imgheight*p ;
		var pos_top=right_layer_top+imgheight*p ;
		if (new_top>pos_top)  mlayer.style.top= new_top; else mlayer.style.top=pos_top;

		if(document.body.clientWidth>830)
			mlayer.style.left= (MyWidth-830)/2+734;
		else
			mlayer.style.left=734;
	}

	for (var p in left_layer)
	{
		var mlayer=eval("left"+p);
		var new_top=MyTop+200+imgheight*p ;
		var pos_top=left_layer_top+imgheight*p ;
		if (new_top>pos_top)  mlayer.style.top= new_top; else mlayer.style.top=pos_top;
		if(MyWidth>778)
			mlayer.style.left= (MyWidth-830)/2+6;
		else
			mlayer.style.left=6;
	}
	setTimeout("myload();",200);
}

function ShowTop30pxAd(){
  document.write("<div align=center style='width:830px; background-color:white;'><a href='http://www.bk288.com/' target=_blank><img title='专业大小球推荐' src='upload/fixup/gangdu18.gif' width='160' height='30' /></a><a href='http://www.bk288.com/' target=_blank><img title='www.crcr11.com' src='upload/fixup/43364360.gif' width='658' height='30' /></a></div>");
}

function ShowBottomAd(){
  document.write("    <div class='ad1'><a href='http://www.zuqiubifen.com' target=_blank><img title='今日波胆3：4' src='upload/fixup/52483391.gif' width='620' height='46' /></a></div>");
}

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 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 ShowCHWindow(str,matchnum)
{
imagewidth=630;
imageheight=28+36*matchnum ;
var st

st="<table width=630 border=0 cellpadding=1 cellspacing=0 bgcolor=#006699 background=bbg.gif>"
st=st + "  <tr><td><table width=628 border=0 cellpadding=0 cellspacing=0>"
st=st + "      <tr><td colspan=8  width=630 height=28 background=bbg.gif><center><font color=#ffffff>足球比分进球提示-zuqiubifen.com</font></center></td></tr>"
st=st + str
st=st + "    </table></td>"
st=st + "  </tr>"
st=st + "</table>"

st=st + "<style type='text/css'>"
st=st + "td {font-family: 'Tahoma', '宋体';font-size: 12px;}"
st=st + ".line td { border-bottom:solid 1px #006699; line-height:17px; filter:alpha(opacity=90);}"
st=st + "</style>"

oPopup = window.createPopup();
oPopupBody = oPopup.document.body;
oPopupBody.bgColor="white";

oPopupBody.innerHTML = st
x=200;
y=1;
var winLoc=document.getElementById("winLocation").options[document.getElementById("winLocation").selectedIndex].value;
switch(winLoc)
{
    case "0":
        x=(screen.width-imagewidth)/2;
        y=1;
        break;
    case "1":
        x=(screen.width-imagewidth)/2;
        y=screen.height-imageheight-30;
        break;
    case "2":
        x=2;
        y=(screen.height-imageheight)/2;
        break;
    case "3":
        x=screen.width-imagewidth-2;
        y=(screen.height-imageheight)/2;
        break;
    case "4":
        x=1;
        y=1;
        break;
    case "5":
        x=screen.width-imagewidth-2;
        y=1;
        break;
    case "6":
        x=1;
        y=screen.height-imageheight-30;
        break;
    case "7":
        x=screen.width-imagewidth-2;
        y=screen.height-imageheight-30;
        break;
}
oPopupBody.style.cursor="pointer";
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=100;
pop();
}

function pop(){
  try{
	oPopup.show(x,y,imagewidth, imageheight);
	startani_A=setTimeout("pop()",100);  //显示15秒
	if(pop_TC<0){dismisspopup();};
	pop_TC=pop_TC-1;
  }catch(e){}
}
function dismisspopup()
{	clearTimeout(startani_A);
	oPopup.hide();
}

function showgoallist(ID)
{
	window.open("detail/detail.php?" + ID , "","scrollbars=yes,resizable=yes,width=668, height=720");
}
function  analysis(ID)
{
	var theURL="detail/analysis.php?" + ID;
	window.open(theURL);
}
function AsianOdds(ID)
{
	var theURL="detail/AsianOdds_n.php?" + ID;
	window.open(theURL);
}

function EuropeOdds(ID)
{
	var theURL="detail/oddslist.php?" + ID;
	window.open(theURL);
}

function TeamPanlu_10(ID)
{
    var	theURL="detail/panlu.php?" + ID;
	window.open(theURL,"","width=640,height=700,top=10,left=100,resizable=yes,scrollbars=yes");
}
function advices(ID)
{
    var	theURL="detail/LiveInformation.php?" + ID;
	window.open(theURL);
}



var zXml = {
    useActiveX: (typeof ActiveXObject != "undefined"),
    useXmlHttp: (typeof XMLHttpRequest != "undefined")
};

zXml.ARR_XMLHTTP_VERS = ["MSXML2.XmlHttp.6.0","MSXML2.XmlHttp.3.0"];

function zXmlHttp() {}

zXmlHttp.createRequest = function ()
{
    if (zXml.useXmlHttp)  return new XMLHttpRequest();

    if(zXml.useActiveX)  //IE < 7.0 = use ActiveX
    {
        if (!zXml.XMLHTTP_VER) {
            for (var i=0; i < zXml.ARR_XMLHTTP_VERS.length; i++) {
                try {
                    new ActiveXObject(zXml.ARR_XMLHTTP_VERS[i]);
                    zXml.XMLHTTP_VER = zXml.ARR_XMLHTTP_VERS[i];
                    break;
                } catch (oError) {}
            }
        }
        if (zXml.XMLHTTP_VER) return new ActiveXObject(zXml.XMLHTTP_VER);
    }
    alert("对不起，您的电脑不支持 XML 插件，请安装好或升级浏览器。");
};
