var lastScrollY = 0;
var ScrollBarHeight = 334;

function heartBeat(){ 
	
var diffY  =0;
var percent =0;

if (document.documentElement && document.documentElement.scrollTop){
	diffY = document.documentElement.scrollTop;	
}else if (document.body){
 	diffY = document.body.scrollTop;	
}

percent=0.1*(diffY-lastScrollY); 

if(percent>0){
	percent=Math.ceil(percent); 		
}else{
	percent=Math.floor(percent); 
}


//var iTop = parseInt(document.getElementById("fd").style.top)+percent;
//
//if(iTop > document.body.clientHeight-ScrollBarHeight)
//{
//	return;
//}

//alert(document.body.clientWidth);
document.getElementById("fd").style.top="145px";
//document.getElementById("fd").style.right=(parseInt(document.body.clientWidth)-1220)/2+"px";
document.getElementById("fd").style.left="0px";
lastScrollY=lastScrollY+percent; 
//window.status = "";
}
var sWidth = window.screen.width;
//if (sWidth<1025){
//	document.getElementById("fd").style.paddingTop=204+"px";
//}
//下面这段删除后，对联将不跟随屏幕而移动。
window.setInterval("heartBeat()",1);


