var activeMenu = false;
var timeCounter = false;

function showDropDown(ddMenuID)
{
    if (document.getElementById)
    {
        obj = document.getElementById(ddMenuID);
        if (activeMenu)
        {
            hideDropDown();
        }
        if (! obj)
        {
            return;
        }
        
        
        activeMenu = ddMenuID;
        obj.style.visibility = 'visible';
    }
}

function enterDropDown()
{
    //alert(activeMenu)
	clearTimeout(timeCounter); // Need to stop timeout on menu. /JRG
}

function leaveDropDown()
{
    if (timeCounter)
    {
        clearTimeout(timeCounter);
    }
    timeCounter = setTimeout("hideDropDown()", 700);
}

function leaveButton()
{
    
	if (activeMenu)
    { 	
        if (timeCounter)
        {
            clearTimeout(timeCounter);
        }
		timeCounter = setTimeout("hideDropDown()", 700);
    }
}

function hideDropDown()
{
    if (document.getElementById)
    {
        if (activeMenu)
        {
            document.getElementById(activeMenu).style.visibility = 'hidden';
            activeMenu = false;
        }
        if (timeCounter)
        {
            clearTimeout(timeCounter); // Need to stop timeout on menu. /JRG
        }
    }
}

