/* ******************************
** Function Name: showMenu(menu)
** Arguments in: child menu to hide
**    menu = name of menu to hide
** Last Edit: August 5, 2007
****************************** */
function hideMenu(menu)
{
  //document.getElementById(menu).style.display = 'none';
}
/* ******************************
** Function Name: showMenu(menu, direction, parent)
** Arguments in:
**    menu = name of menu to display
**    direction = direction child menu displayes (relation to parent)
**    parent = parent menu calling the function
** Last Edit: August 5, 2007
****************************** */
function showMenu(menu, direction, parent)
{
  //Object for menu, 
  
  //Object for sub menu
  var subMenu = document.getElementById(menu);
  //setTimeout(displayMenu, 1000);
  displayMenu();
  function displayMenu()
  {
        var parentMenu = document.getElementById(parent).style;
        var parentMenuLeft = parseInt(parentMenu.left);
        var parentMenuTop = parseInt(parentMenu.top);
        
    switch (direction)
    {
      case "left":
        break;
      case "down":
        //If the sub menu is to be displayed down
        //then base it off the bottom-left corner
        // of the parent menu
        var parentMenuHeight = parseInt(parentMenu.height);
        subMenu.style.top = parentMenuTop + parentMenuHeight + 10;  
        subMenu.style.left = parentMenuLeft;
        
        subMenu.style.display = '';
        break;
    }
  }
}

