﻿<!--

var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";

function getRef(id) {
    if (isDOM) return document.getElementById(id);
    if (isIE4) return document.all[id];
    if (isNS4) return document.layers[id];
}

function moveRightEdge() {
    var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
    if (isDOM) {
        yMenuFrom   = parseInt (divMenu.style.top, 10);
        yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop)+93; // 위쪽 위치
    }
    timeoutNextCheck = 500;

    if (yMenuFrom != yMenuTo) {
        yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
        if (yMenuTo < yMenuFrom)
            yOffset = -yOffset;
        if (isNS4)
            divMenu.top += yOffset;
        else if (isDOM)
            divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;
            
            timeoutNextCheck = 5;
    }
    setTimeout ('moveRightEdge()', timeoutNextCheck);
}

function moveRightBottom() {
    var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
    if (isDOM) {
        yMenuFrom   = parseInt (divTop.style.top, 10);
        //yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop)+document.body.clientHeight-467 // 위쪽 위치
        yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) // 위쪽 위치
    }
    timeoutNextCheck = 500;

    if (yMenuFrom != yMenuTo) {
        yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
        if (yMenuTo < yMenuFrom)
            yOffset = -yOffset;
        if (isNS4)
            divTop.top += yOffset;
        else if (isDOM)
            divTop.style.top = parseInt (divTop.style.top, 10) + yOffset;
            
            timeoutNextCheck = 5;
    }
    setTimeout ('moveRightBottom()', timeoutNextCheck);
}

//-->


