var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements(lid)
{
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bExplorer4plus ) {  // IE ¿ë ¼³Á¤
                //yButtonFrom = parseInt (divLinkButton.style.top, 10);
                //yButtonTo   = document.body.scrollTop + document.body.clientHeight - 55;
                yMenuFrom   = parseInt (document.getElementById(lid).style.top, 10);
                yMenuTo     = document.body.scrollTop + 110; // À§ÂÊ À§Ä¡
        }

        timeoutNextCheck = 100;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
				var fn = function(){ CheckUIElements(lid); } 
				setTimeout (fn, timeoutNextCheck);
                return;
        }


        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bExplorer4plus )
                        document.getElementById(lid).style.top = parseInt (document.getElementById(lid).style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        var fn = function(){ CheckUIElements(lid); } 
		setTimeout (fn, timeoutNextCheck);
}

function Slide(lid)
{
        var y;

        // Æä¿¡Áö ·Îµù½Ã Æ÷Áö¼Ç
        if ( bExplorer4plus ) {
                document.getElementById(lid).style.top = document.body.scrollTop;
                document.getElementById(lid).style.visibility = "visible";
        }

        CheckUIElements(lid);
        
        return true;
}
