var 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*/}    
         
percent=.1*(diffY-lastScrollY);      
if(percent>0)percent=Math.ceil(percent);      
else percent=Math.floor(percent);      
document.getElementById("adleft").style.top=parseInt(document.getElementById("adleft").style.top)+percent+"px";    
document.getElementById("adright").style.top=parseInt(document.getElementById("adright").style.top)+percent+"px";    
lastScrollY=lastScrollY+percent;      
}    
   
function adhide(names){document.getElementById(names).style.display='none';}    
function screencl(names){if(screen.width<=800){adhide(names);}}    
zcode="<div id='adleft' style='left:2px;position: absolute;z-index:1;top:300px;border:#999 solid 0px;'><div style='width:170px;height:98px;background:#ccc;border:#999 solid 1px;'><a href='http://wpa.qq.com/msgrd?v=3&uin=2292817144&site=qq&menu=yes' target='_blank'><img src='images/gaoqinghudong.gif' width='170' height='98' border='0' /></a></div><div style='width:170px;height:12px;background:#ccc;border:#999 solid 1px;margin:-2px 0px 0px 0px;'><a href='http://weibo.com/nhgd' target='_blank'><img src='images/gaoqinghudongW.gif' width='170' height='12' border='0' /></a></div><div align='right' style='font-size:0px;'>¡¡<img src='images/close.gif' title='¹Ø±Õ' onclick=adhide('adleft') style='cursor:pointer'></div></div>";    
ycode="<div id='adright' style='right:2px;position: absolute;z-index:1;top:300px;border:#999 solid 0px;'><div style='width:170px;height:110px;background:#ccc;border:#999 solid 1px;'><a href='http://www.homecin.com' target='_blank'><img src='images/vodfu.gif' width='170' height='110' border='0' /></a></div><div align='right' style='font-size:0px;'>¡¡<img src='images/close.gif' title='¹Ø±Õ' onclick=adhide('adright') style='cursor:pointer'></div></div>";    
document.write(zcode);    
document.write(ycode);    
screencl('adleft');    
screencl('adright');    
window.setInterval("heartBeat()",1);
