// JavaScript functions to show and hide drop-down menus.
// In SimpleNavBar.html we call ShowMenuDiv each time the mouse goes over 
// either the menu title or the submenu itself, and call HideMenuDiv when the
// mouse goes out of the menu title or the submenu iteslf (onMouseOut).

function ShowItem (itemID) {
  var x = document.getElementById(itemID);
  if (x)
    x.style.visibility = "visible";
  return true;
}

function Show2Items (itemID, itemID2) {
  var x = document.getElementById(itemID);
  if (x)
    x.style.visibility = "visible";
  
    var y = document.getElementById(itemID2);
    if (y)
      y.style.visibility = "visible";
  return true;
}

function HideItem (itemID) { 
  var x = document.getElementById(itemID);
  if (x)
     x.style.visibility = "hidden";
  return true;
}


function Hide2Items (itemID, ItemID2) { 
  var x = document.getElementById(itemID);
  if (x)
     x.style.visibility = "hidden";
     
  var y = document.getElementById(ItemID2);
  if (y)
     y.style.visibility = "hidden";
  return true;
}


function DisplayItem (itemID) {
  var x = document.getElementById(itemID);
  if (x)
    x.style.display = "inline";
  return true;
}

function UnDisplayItem (itemID) { 
  var x = document.getElementById(itemID);
  if (x)
     x.style.display = "none";
  return true;
}


function UnDisplayItems (itemID, itemID2, itemID3) { 
  var x = document.getElementById(itemID);
  if (x)
     x.style.display = "none";
     
  var y = document.getElementById(itemID2);
  if (y)
     y.style.display = "none";
     
  var z = document.getElementById(itemID3);
  if (z)
     z.style.display = "none";
  return true;
}



//    As noted in the SimpleNavBarStyles.css file, using x.style.visibility as
//    seen below seemed to have better cross browser support than using 
//    x.style.display="block" and x.style.display="none" to show and hide 
//    the menu.
