// 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
    {/*Netscape stuff*/}
 
//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";
document.getElementById("lovexin14").style.top=parseInt(document.getElementById

("lovexin12").style.top)+percent+"px";

lastScrollY=lastScrollY+percent; 
//alert(lastScrollY);
}
suspendcode12="<DIV id=\"lovexin12\" style='left:2px;POSITION:absolute;TOP:120px;display:none;'><div align='center'><img src='/images/clo.gif' onClick='javascript:window.hide(\"lovexin12\");' style='cursor:pointer;' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'></div><div id=\"ad1\">ad1</div></div>";
suspendcode14="<DIV id=\"lovexin14\" style='right:2px;POSITION:absolute;TOP:120px;display:none;'><div align='center'><img src='/images/clo.gif' onClick='javascript:window.hide(\"lovexin14\");' style='cursor:pointer;' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'></div><div id=\"ad2\">ad2</div></div>";
document.write(suspendcode12); 
document.write(suspendcode14);

function hide(d) { document.getElementById(d).style.display="none";}
window.setInterval("heartBeat()",1);






//////////////////////////////////////////////////////////////////////////////////////////////////////////
//lastScrollY=0;
//function heartBeat(src,url,alt,ad1,ad2){ 
//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").style.top=parseInt(document.getElementById
//
//("lovexin12").style.top)+percent+"px";
//document.getElementById("lovexin14").style.top=parseInt(document.getElementById
//
//("lovexin12").style.top)+percent+"px";
//
//lastScrollY=lastScrollY+percent; 
////alert(lastScrollY);
//}
//suspendcode12="<DIV id=\"lovexin12\" style='left:2px;POSITION:absolute;TOP:120px;'><div align='center'><img src='images/close.gif' onClick='javascript:window.hide(\"lovexin12\");' style='cursor:pointer;' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'></div><div id=\"ad\"><a href='"+url+"'><img src='"+src+"' alt='点击查看"+alt+"' width='120' height='300' border='0'></a></div></div>";
//suspendcode14="<DIV id=\"lovexin14\" style='right:2px;POSITION:absolute;TOP:120px;'><div align='center'><img src='images/close.gif' onClick='javascript:window.hide(\"lovexin14\");' style='cursor:pointer;' width='100' height='14' border='0' vspace='3' alt='关闭对联广告'></div><div id=\"ad\"><a href='"+url+"'><img src='images/ad_100x300.jpg' alt='点击查看"+alt+"' width='120' height='300' border='0'></a></div></div>";
//if(ad1==true){document.write(suspendcode12); }
//if(ad2==true){document.write(suspendcode14); }
//
//function hide(d) { document.getElementById(d).style.display="none";}
// 
//window.setInterval("heartBeat('images/ad_100x300.jpg','http://www.163.com','欢迎光临',true,true)",1);