两侧浮动代码广告

<script language="JavaScript" type="text/javascript" >

lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}

//alert(diffY);
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("lovexin12_1").style.top=parseInt(document.getElementById("lovexin12_1").style.top)+percent+"px";
document.getElementById("lovexin14_1").style.top=parseInt(document.getElementById("lovexin12_1").style.top)+percent+"px";

lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}
suspendcode12_1="<DIV id=\"lovexin12_1\" style='left:0px;PosITION:absolute;TOP:0px;'><a href=http://www.0378job.com/ target=_blank><img src=image/kf/ad/kfgg.gif   border=0></a></div>"
suspendcode14_1="<DIV id=\"lovexin14_1\" style='right:0px;PosITION:absolute;TOP:0px;'><a href=http://www.0378job.com/ target=_blank><img src=image/kf/ad/kfgg.gif   border=0></a></div>"
document.write(suspendcode12_1);
document.write(suspendcode14_1);
window.setInterval("heartBeat()",1);

</script>
posted @ 2009-05-02 11:33  超越自我~_~!!  阅读(483)  评论(0编辑  收藏  举报