// Fly out two level menu control function

var  menuMain = null; 
var  menuTab = null; 

function showMenu(id)
{
    if (!get()) { return; }
    var menu = document.getElementById("Menu" + id);
    var menus = document.getElementById("menuMain");
    if (!menus) return;

    var submenu = menus.getElementsByTagName("ul").item(id);
    if (menuTab == null) {
        submenu.style.visibility = "visible";
        
    } else {
        menuTab.style.visibility = "hidden";
        submenu.style.visibility = "visible";
        
    }
    if (menuMain == null) {
        menu.style.backgroundColor = "#dab037";
  
    } else {
        menuMain.style.backgroundColor = "transparent";
        menu.style.backgroundColor = "#dab037";

        
    }
    menuMain = menu;
    menuTab = submenu;
}

function get()
{
    return document.getElementById && document.getElementsByTagName;
}
