



var Webmenu_DisplayFlag = 0;
var Webmenu_DisplayMenuId = "";

//function Webmenu_ShowMenu(ctrlId)
//{
////alert ("control=" + ctrlId)
//    if (Webmenu_DisplayMenuId != "")
//    {
//        Webmenu_HideMenu3();
//    }
//    //alert ("control=" + ctrlId)
//    var ctrl = document.getElementById(ctrlId);
//    //alert ("display=" + ctrl.style.display)
//    ctrl.style.display = "block";
//    Webmenu_DisplayFlag = 1;
//}


//function Webmenu_HideMenu(ctrlId)
//{
//   Webmenu_DisplayFlag = 0;
//   Webmenu_DisplayMenuId = ctrlId;
//   setTimeout("Webmenu_HideMenu2()",500)
//    
//}

function Webmenu_ShowMenu(p_cell, p_color, ctrlId)
{
//alert ("control=" + ctrlId)
    if (p_cell)
    {
        p_cell.style.backgroundColor = p_color;
    }
    if (Webmenu_DisplayMenuId != "")
    {
        Webmenu_HideMenu3();
    }
    //alert ("control=" + ctrlId)
    var ctrl = document.getElementById(ctrlId);
    //alert ("display=" + ctrl.style.display)
    ctrl.style.display = "block";
    Webmenu_DisplayFlag = 1;
}


function Webmenu_HideMenu(p_cell, p_color, ctrlId)
{
    if (p_cell)
    {
        p_cell.style.backgroundColor = p_color;
    }
   Webmenu_DisplayFlag = 0;
   Webmenu_DisplayMenuId = ctrlId;
   setTimeout("Webmenu_HideMenu2()",500)
    
}

function Webmenu_HideMenu2()
{
    if (Webmenu_DisplayFlag == 0)
    {
        Webmenu_HideMenu3()
    }
}
function Webmenu_HideMenu3()
{
   
    //alert ("control=" + Webmenu_DisplayMenuId)
    if (Webmenu_DisplayMenuId != "")
    {
        var ctrl = document.getElementById(Webmenu_DisplayMenuId);
        //alert ("display=" + ctrl.style.display)
        ctrl.style.display = "none";
        Webmenu_DisplayMenuId = "";
    }
}

function Webmenu_NavigateTo(p_url)
{

    location.href = p_url;
}



function Webmenu_ChangeTabImage(p_cell, p_image)
{
    //alert(p_image);
    
      p_cell.style.backgroundImage = "url(" + p_image + ")";
}

