var iZone = 17; var iAD = 119; var iLink = 27; var iType = 25; var iStyle = 1; var ifAD = true; var iXML = "/ads/Demo/Xml/2009-04/2009042408531068935.xml"; var iWidth = 749; var iHeight = 97; //获取客户端信息 function client_info(){ var ref = top.document.referrer; var encode = isGB(ref); ref = encodeURIComponent(ref); var color = screen.colorDepth; //屏幕颜色 var swidth = screen.width; //Width var sheight = screen.height; //Height var strInfo; strInfo = "&ref=" + ref + "&color=" + color + "&size=" + swidth + "*" + sheight + "&encode=" + encode; return strInfo; } function isGB(ref){ var a = ref; try{ decodeURIComponent(a); } catch(e){ return 1; //GB编码 }; return 0; //UTF8编码 } var adUrl = "http://ads.sxjs.gov.cn/ads/Demo/Para/Para.asp?aid=" + iAD + "&zid=" + iZone + "&lid=" + iLink + "&tid=" + iType + "&sid=" + iStyle + "&xml=" + iXML + "&ifad=" + ifAD + client_info(); //document.write(adUrl); //固定位置广告 if ((iStyle == 1) || (iStyle == 2) || (iStyle == 3)){ document.write (""); } //弹窗 else if (((iStyle == 4) || (iStyle == 5)) && (ifAD == true)){ window.open(adUrl,"","left=" + (window.screen.width - iWidth) / 2 + ",top=" + (window.screen.Height - iHeight) / 2+",width=" + iWidth + ",height=" + iHeight + ",status=1,resizable=no,scrollbars=no"); } //浮动 else if ((iStyle == 6) && (ifAD == 1)){ document.write("
") var xPos = 0;var yPos = 0;var step = 1;var delay = 10;var height = 0;var Hoffset = 0;var Woffset = 0;var yon = 0;var xon = 0;var xon = 0;var interval; var flydiv = document.getElementById("flydiv"); flydiv.style.top = 0; start(); } //全屏 else if ((iStyle == 7) && (ifAD == 1)){ document.write("
"); } //左对联 else if (((iStyle == 8) || (iStyle == 14)) && (ifAD == true)){ document.write("
") //跟随页面滚动 if (iStyle == 14){ var fly1 = setInterval('keepIt("divDouble1",130)',1); } } //右对联 else if (((iStyle == 9) || (iStyle == 15)) && (ifAD == true)){ var left2 = document.body.clientWidth - 6 - iWidth; document.write("
") //跟随页面滚动 if (iStyle == 15){ var fly2 = setInterval('keepIt("divDouble2",130)',true); } } //仿QQMSN广告 else if ((iStyle == 10) && (ifAD == 1)){ document.write("
"); window.onload = new Function("showQQ()"); setInterval('keepIt("QQLayer",' + (document.body.clientHeight - iHeight - 2) +')',1); } //透明Flash广告 else if ((iStyle == 11) && (ifAD == 1)){ document.write("
"); setTimeout("hideTranFlash()",12000);//广告显示的时间 } //左下角右下角浮动 else if (((iStyle == 12) || (iStyle == 13)) && (ifAD == true)){ var ftop = document.body.clientHeight - iHeight - 10; var fname; if (iStyle == 13){ var fleft = document.body.clientWidth - iWidth - 6; fname = "rightdiv" } else{ var fleft = 6; fname = "leftdiv" } document.write("
") setInterval('keepIt("' + fname + '",' + ftop +')',1); } //********************************************************************** //浮动广告相关函数 //********************************************************************** function changePos(){ width = document.body.clientWidth; height = document.body.clientHeight; Hoffset = flydiv.offsetHeight; Woffset = flydiv.offsetWidth; flydiv.style.left = xPos + document.body.scrollLeft; flydiv.style.top = yPos + document.body.scrollTop; if (yon){ yPos = yPos + step; }else{ yPos = yPos - step; } if (yPos < 0){ yon = 1; yPos = 0; } if (yPos >= (height - Hoffset)){ yon = 0; yPos = (height - Hoffset); } if (xon){ xPos = xPos + step; } else{ xPos = xPos - step; } if (xPos < 0){ xon = 1; xPos = 0; } if (xPos >= (width - Woffset)){ xon = 0; xPos = (width - Woffset); } } function start(){ flydiv.visibility = 'visible'; interval = setInterval('changePos()', delay); } function mystop(){ clearInterval(interval); } //********************************************************************** //********************************************************************** //全屏广告相关函数 //********************************************************************** function ShowLayer() { document.getElementById("FlatLayer").style.display = ""; } function CloseLayer() { document.getElementById("FlatLayer").style.display = "none"; } function LoadLayer(f){ ShowLayer(); setTimeout("CloseLayer()",8000);//广告显示的时间 } //********************************************************************** //********************************************************************** //双飞燕广告相关函数 //********************************************************************** function keepIt(theName,theWantTop){ theRealTop = parseInt(document.body.scrollTop); theTureTop = theWantTop + theRealTop; document.getElementById(theName).style.top = theTureTop; } function CloseDouble1(){ document.getElementById("divDouble1").style.display = 'none'; } function CloseDouble2(){ document.getElementById("divDouble2").style.display = 'none'; } //********************************************************************** //********************************************************************** //仿QQMSN广告相关函数 //********************************************************************** function showQQ(){ document.getElementById("QQLayer").style.display = ''; } function hideQQ(){ document.getElementById("QQLayer").style.display = 'none'; } function keepQQ(theName,theWantTop){ theRealTop = parseInt(document.body.scrollTop); theTureTop = theWantTop + theRealTop; document.getElementById(theName).style.top = theTureTop; } //********************************************************************** //********************************************************************** //左下角右下角浮动 //********************************************************************** function keepFloat(theName,theWantTop){ theRealTop = parseInt(document.body.scrollTop); theTureTop = theWantTop + theRealTop; document.getElementById(theName).style.top = theTureTop; } //********************************************************************** //********************************************************************** //透明Flash //********************************************************************** function hideTranFlash(iframeID){ document.getElementById("tranflash").style.display = "none"; } //**********************************************************************