<!--×ó²àtop°´Å¥-->
var menuTopMargin = 0; 
var menuSpeed = 0;
var timerSpeed = 0;
var timer;
var heightLimit = 0;

function checkMenu() {
var eMenu = document.getElementById('sMenu'); 
if(document.body.offsetHeight > heightLimit) {
   var reTimer = timerSpeed;
   var startPoint = parseInt(eMenu.style.top,10);
   var endPoint = document.body.scrollTop;
   endPoint = (menuTopMargin <= endPoint ) ? endPoint - menuTopMargin : 0;
   if(startPoint != endPoint) {
    moveAmount = Math.ceil(Math.abs(endPoint - startPoint) / 5);
    eMenu.style.top = parseInt(eMenu.style.top,10) + ((endPoint<startPoint) ? -moveAmount : moveAmount);
    reTimer = menuSpeed;
   }
} else eMenu.style.top = 0;
timer = setTimeout("checkMenu();",reTimer);
}

function initMenu() {
if(document.body.offsetHeight > heightLimit) document.getElementById('sMenu').style.top = document.body.scrollTop;
checkMenu();
}
