// ¶ÔÁªjs

// 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("floatLeft").style.top=parseInt(document.getElementById("floatLeft").style.top)+percent+"px";
document.getElementById("floatRight").style.top=parseInt(document.getElementById("floatRight").style.top)+percent+"px";

lastScrollY=lastScrollY+percent; 
//alert(lastScrollY);
}

window.setInterval("heartBeat()",1);

// Æ¯¸¡js

var x=60,y=80
var xin=true,yin=true
var step=2
var delay=20
var obj=document.getElementById("float")
function floatAD(){
var L=T=0
var R=document.body.clientWidth-obj.offsetWidth
var B=document.body.clientHeight-obj.offsetHeight
obj.style.left=x+document.body.scrollLeft
obj.style.top=y+document.body.scrollTop
x=x+step*(xin?1:-1)
if(x<L){xin=true;x=L}
if(x>R){xin=false;x=R}
y=y+step*(yin?1:-1)
if(y<T){yin=true;y=T}
if(y>B){yin=false;y=B}
}
var itl=setInterval("floatAD()",delay)
obj.onmouseover=function(){clearInterval(itl)}
obj.onmouseout=function(){itl=setInterval("floatAD()",delay)}
