// JavaScript Document

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

    {/*方便扩展*/}

	//alert(diffY);

percent=.1*(diffY-lastScrollY); 

if(percent>0)percent=Math.ceil(percent); 

else percent=Math.floor(percent); 
document.getElementById("lovexin12").style.top=parseInt(document.getElementById("lovexin12").style.top)+percent+"px";
lastScrollY=lastScrollY+percent; 
document.getElementById("lovexin14").style.top=parseInt(document.getElementById("lovexin14").style.top)+percent+"px";
lastScrollY=lastScrollY+percent; 
document.getElementById("lovexin16").style.top=parseInt(document.getElementById("lovexin16").style.top)+percent+"px";
lastScrollY=lastScrollY+percent; 
document.getElementById("lovexin17").style.top=parseInt(document.getElementById("lovexin17").style.top)+percent+"px";
lastScrollY=lastScrollY+percent; 
alert(lastScrollY);
}
suspendcode12="<DIV id=\"lovexin12\" style='left:6px;POSITION:absolute;TOP:320px;'><a href='/guanggao/zt.html'  target='_blank'><img src='/guanggao/健康服务进社区2.gif' width='96' height='139' border='0'></a></div>"

suspendcode14="<DIV id=\"lovexin14\" style='left:6px;POSITION:absolute;TOP:10px;'><a href='/kqpxbm/kqpxbm.asp'  target='_blank'><img src='/guanggao/网面授.jpg' width='96' height='139' border='0'></a></div>"

suspendcode16="<DIV id=\"lovexin16\" style='right:6px;POSITION:absolute;TOP:10px;'><a href='/modules/news/show.asp?id=9079'  target='_blank'><img src='/guanggao/123.gif' width='96' height='139' border='0'></a></div>"

suspendcode17="<DIV id=\"lovexin18\" style='right:6px;POSITION:absolute;TOP:320px;'><a href='/modules/news/show.asp?id=9132'  target='_blank'><img src='/guanggao/tzhi.gif' width='96' height='209' border='0'></a></div>"

document.write(suspendcode12); 

document.write(suspendcode14); 

document.write(suspendcode16); 

document.write(suspendcode17); 

window.setInterval("heartBeat()",1);
