var downLayerId;  
var dropDegree = 5; // ¼ÓµµÁ¶Àý  
var doDirect;  
var DirectTerm = 3000; // ½Ã°£Á¶Àý  
var curDropIdx = 0;  
function DirectUp()  
{  
    clearInterval(doDirect);  
    clearInterval(downLayerId);  
    var tempIdx = 0;  
    for(i = 0; i < document.all["hitProduct"].length; i++)  
    {  
        tempIdx = (document.all["hitProduct"].length + curDropIdx - i) % document.all["hitProduct"].length;  
        document.all["hitProduct"][tempIdx].style.posTop = i * document.all["hitProduct"][tempIdx].style.posHeight;  
    }  
    var temp = 'setInterval("UpLayer()", 20)';  
    downLayerId = eval(temp);  
    direction = "up";  
}  
function UpLayer()  
{  
    var tempIdx = 0;  
    if(document.all["hitProduct"][curDropIdx].style.posTop < document.all["hitProduct"][curDropIdx].style.posHeight && document.all["hitProduct"][curDropIdx].style.posTop > document.all["hitProduct"][curDropIdx].style.posHeight * (-1))  
    {  
        for(j = 0 ;j < document.all["hitProduct"].length; j++)  
        {  
            tempIdx = (document.all["hitProduct"].length + curDropIdx - j) % document.all["hitProduct"].length;  
            document.all["hitProduct"][tempIdx].style.posTop -= dropDegree;  
        }  
    }  
    else  
    {  
        clearInterval(downLayerId);  
        for(j = 0; j < document.all["hitProduct"].length; j++)  
        {  
            tempIdx = (document.all["hitProduct"].length + curDropIdx - j) % document.all["hitProduct"].length;  
            document.all["hitProduct"][tempIdx].style.posTop = (j - 1) * (document.all["hitProduct"][tempIdx].style.posHeight);  
        }  
        curDropIdx = (curDropIdx - 1) ;  
        curDropIdx = curDropIdx < 0 ? document.all["hitProduct"].length - 1 : curDropIdx;  
        var temp = 'setInterval("DirectUp()",DirectTerm)';  
        doDirect = eval(temp);  
    }  
}
