document.write("
"); document.write("
"); document.write(" 都灵城"); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); /*开始右边的广告*/ document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); var marginTop = 5;//到顶部的距离 var marginFoot = 100;//广告顶到底部距离 var marginLeft = 5;//靠边的距离 var apicWidth = 54; var apicLeftDiv = document.getElementById("apicLeftDiv"); var apicRightDiv = document.getElementById("apicRightDiv"); var apicFootLeftDiv = document.getElementById("apicFootLeftDiv"); var apicFootRightDiv = document.getElementById("apicFootRightDiv"); /******************************* 全局变量设置结束 ********************************/ //程序开始 var navUserAgent = navigator.userAgent;//取浏览器名 if (navUserAgent.indexOf("Firefox") >= 0 || navUserAgent.indexOf("Opera") >= 0) var NS = true;//fireFox或Opera等非IE浏览器; else var IE = true;//IE浏览器; function loadFloat() { judgeFloat(); moveFloat(); } function moveFloat() { judgeFloat(); setTimeout("moveFloat();",80) } function judgeFloat() { //取当前滚动的高度 var scrollTop = document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop; //取当前客户端的分辨率 if (NS) { var clientHeight = (document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight; var clientWidth = (document.body.clientWidth > document.documentElement.clientWidth)?document.body.clientWidth:document.documentElement.clientWidth; } if (IE) { var clientHeight = (document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight; var clientWidth = (document.documentElement.clientWidth == 0)?document.body.clientWidth:document.documentElement.clientWidth; } //如果有左边广告设置广告位置 if (apicLeftDiv != "") { apicLeftDiv.style.top = scrollTop + marginTop + 'px'; apicLeftDiv.style.left = marginLeft + 'px'; } //如果有名边广告设置广告位置 if (apicRightDiv != "") { apicRightDiv.style.top = scrollTop + marginTop + 'px'; apicRightDiv.style.left = clientWidth - apicWidth - marginLeft + 'px'; } //如果有底部左边广告位置 if (apicFootLeftDiv != "") { apicFootLeftDiv.style.top = scrollTop + clientHeight - marginFoot + 46 + 'px'; apicFootLeftDiv.style.left = marginLeft + 'px'; } //如果有底部右边广告位置 if ("" != apicFootRightDiv) { apicFootRightDiv.style.top = scrollTop + clientHeight - marginFoot + 'px'; apicFootRightDiv.style.left = clientWidth - apicWidth - marginLeft - 18 + 'px'; } } loadFloat(); /*****************************************/