var adimg,adwidth,adheight,adurl,adimg1,adurl1
if(adimg!='')
{
suspendcode="<DIV id=lovexin1 style='Z-INDEX: 10; LEFT: 6px; POSITION: absolute; TOP: 105px; width: "+ adwidth +"px; height: "+ (adheight+15) +"px;'><img src='http://www.soojs.com/upload/2007/8/3/02_close.gif' onClick='hide(1);' width='"+ adwidth +"' height='14' border='0' vspace='3' alt='关闭对联广告'><a href='"+ adurl +"' target='_blank'><img src='"+ adimg +"' width='"+ adwidth +"' height='"+ adheight +"' border='0'></a></DIV>"
document.write(suspendcode);

suspendcode="<DIV id=lovexin2 style='Z-INDEX: 10; LEFT: "+ (window.screen.width-adwidth-5-20) +"px; POSITION: absolute; TOP: 105px; width: "+ adwidth +"px; height: "+ (adheight+15) +"px;'><img src='http://www.soojs.com/upload/2007/8/3/02_close.gif' onClick='hide(2);' width='"+ adwidth +"' height='14' border='0' vspace='3' alt='关闭对联广告'><a href='"+ adurl1 +"' target='_blank'><img src='"+ adimg1 +"' width='"+ adwidth +"' height='"+ adheight +"' border='0'></a></DIV>"
document.write(suspendcode);

//flash格式调用方法
//<EMBED src='flash.swf' quality=high  WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=ad wmode=opaque></EMBED>

lastScrollY=0;
}
function heartBeat(){
diffY=document.body.scrollTop;
percent=.3*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin1.style.pixelTop+=percent;
document.all.lovexin2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide(a)
{   
	//a.style.visibility="hidden";
	document.getElementById('lovexin'+a).style.visibility="hidden";
	
}
if(adimg!='')
{
window.setInterval("heartBeat()",1);
}