﻿
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; 

}
suspendcode12="<DIV id=\"lovexin12\" style='left:2px;z-index: 100;POSITION:absolute;TOP:250px;'></div>"
suspendcode14 = "<img id=\"lovexin14\" style=\"right:2px;z-index: 100;POSITION:absolute;TOP:250px; border:none\" src=\"/images/home.gif\" alt=\"拓展者官方主站\" usemap=\"#Map3\" /><map name=\"Map3\" id=\"Map3\"><area alt=\"关闭悬浮窗口\" shape=\"rect\" coords=\"170,1,200,20\" onclick=\"closeBanner();\"/><area alt=\"跳转到攀岩墙主站\" shape=\"rect\" coords=\"1,1,200,160\" href=\"http://www.panyanqiang.com\" target=\"_blank\" /></map>"
document.write(suspendcode12); 
document.write(suspendcode14); 
window.setInterval("heartBeat()",1);
function closeBanner() {
    document.getElementById("lovexin14").style.display = 'none';
   
}
