var IdxOldMenuMouseIn = -1;
var IdxMenuHotSpot = 0;

var StartLeft, StartTop, StartWidth, StartHeight;
var EndLeft = -1;
var EndTop = -1;
var EndWidth = -1;
var EndHeight = -1;
var TStepValue;
var TValue = 0;

var MenuHotSpotTimerId = null;


function MenuHotSpotTimerAnimation()
{    
    var Left, Top, Width, Height;
    var objGlowStyle;
    var StopTimer = false;
    
    if (TValue == 1.0)
    {
        StopTimer = true;
    }
                        
    Left = StartLeft + (EndLeft - StartLeft) * TValue;
    Top = StartTop + (EndTop - StartTop) * TValue;
    Width = StartWidth + (EndWidth - StartWidth) * TValue;
    Height = StartHeight + (EndHeight - StartHeight) * TValue;                                                

    objGlowStyle = document.getElementById('WhiteGlowMenu').style;
    
    objGlowStyle.left = Left;
    objGlowStyle.top = Top;
    objGlowStyle.width = Width;
    objGlowStyle.height = Height;

    //document.title = objGlowStyle.left + ' ' + objGlowStyle.top + ' ' + objGlowStyle.width + ' ' + objGlowStyle.height;                                                                

    TValue += TStepValue;

    if (TValue > 1.0)
    {
        TValue = 1.0;
    }
    
    if (StopTimer == true)
    {
        clearInterval(MenuHotSpotTimerId);
    }
}

function MenuHotSpotMouseOver(IdxMenuHotSpot, HotSpotLeft, HotSpotTop, HotSpotWidth, HotSpotHeight)
{
    return 1;

    document.title = 'IN ' + IdxMenuHotSpot;
    
    if (IdxOldMenuMouseIn != -1)
    {
        //document.getElementById('MenuVoice' + IdxOldMenuMouseIn).style.color = '#FFFFFF';
    }                                

    IdxOldMenuMouseIn = IdxMenuHotSpot;

    //document.getElementById('MenuVoice' + IdxMenuHotSpot).style.color = '#000000';

    
    //------------------------------------------------------------------------------------------------------------
    

    if (EndLeft != -1)
    {
        StartLeft = EndLeft;
        StartTop = EndTop;
        StartWidth = EndWidth;
        StartHeight = EndHeight;
        
        StartTimer = true;
    }
    
    EndLeft = HotSpotLeft;
    EndTop = HotSpotTop;
    EndWidth = HotSpotWidth;
    EndHeight = HotSpotHeight;
    
    TStepValue = 1 / 20;                  
    
    

    if (StartTimer == true)
    {
        /*
        objGlowStyle = document.getElementById('WhiteGlowMenu').style;
        objGlowStyle.display = 'block';
        */

        TValue = 0;
        clearInterval(MenuHotSpotTimerId);
        MenuHotSpotTimerId = setInterval('MenuHotSpotTimerAnimation()', 17);
    }
    else
    {
        
        objGlowStyle = document.getElementById('WhiteGlowMenu').style;
        objGlowStyle.left = EndLeft;
        objGlowStyle.top = EndTop;
        objGlowStyle.width = EndWidth;
        objGlowStyle.height = EndHeight;
        objGlowStyle.display = 'block';
        
    }
    //------------------------------------------------------------------------------------------------------------                

}

function MenuHotSpotMouseOut(IdxMenuHotSpot)
{
    return 1;

    document.title = 'OUT ' + IdxMenuHotSpot;

    if (IdxOldMenuMouseIn != -1)
    {
        //document.getElementById('MenuVoice' + IdxOldMenuMouseIn).style.color = '#FFFFFF';
    }
    
    objGlowStyle = document.getElementById('WhiteGlowMenu').style;                
    //objGlowStyle.display = 'none';
    //EndLeft = -1;
    
    IdxOldMenuMouseIn = -1;
}
