<SCRIPT FOR=window EVENT=onload LANGUAGE="javascript">
initAd();//载入页面后,调用函数initAd()
</SCRIPT>
<script language="javascript">
<!--
function initAd() {
document.all.AdLayer.style.posTop = -200;
//设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.AdLayer.style.visibility = 'visible'//设置层为可见
MoveLayer('AdLayer');//调用函数MoveLayer()
}
function MoveLayer(layerName) {
var x = 0;//浮动广告层固定于浏览器的x方向位置
var y = 360;//浮动广告层固定于浏览器的y方向位置
var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posright = x");//移动广告层
setTimeout("MoveLayer('AdLayer');", 0);//设置20毫秒后再调用函数MoveLayer()
}
//-->
</script>
<!--下面为一个ID为AdLayer的层(如ID名不为AdLayer,
上面MoveLayer()内的AdLayer也要作相应修改),包括一张带链接的图片-->
<div id=AdLayer style='position:absolute; width:61px; height:59px; z-index:20; visibility:hidden;; right: 10px; top: 100px'>
<a href="addxinxi.asp"><img border="0" src="images/fb.jpg" width="100" height="40"></a></div>