±è¼º³â |
|
|
½ÅûÆ÷ÀÎÆ® : [ 2000 ] | »óÅ : [ ] |
|
|
function heartBeat() {
if(IE) {
diffY = document.body.scrollTop;
diffX = 0;
}
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.floater.style.pixelTop += percent;
if(NS) document.floater.top += percent;
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.floater.style.pixelLeft += percent;
if(NS) document.floater.top += percent;
lastScrollY = lastScrollY + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat()",1);
// Quick menu
function QuickSize() {
offX = document.body.clientWidth;
scrWidth = 847;
scrX = Math.abs(offX - scrWidth) / 2;
if(offX > scrWidth) {
document.getElementById("floater").style.left = scrX + scrWidth;
} else {
document.getElementById("floater").style.left = 912;
}
}
QuickSize();
function onResizeTo() {
posLeftStart();
QuickSize();
}
window.onresize = onResizeTo;
//-->
|