function menuControl(menu) {

  /* variable to handle the display state of sub menu's */
  var displayState;

  docRoot = document.getElementById(menu);

  /** If statement to ensure compatibility across major browsers **/
  if (docRoot.currentStyle) { 
    displayState = docRoot.currentStyle["display"];
  }
  else if (window.getComputedStyle) {
    displayState = document.defaultView.getComputedStyle(docRoot, null).getPropertyValue("display");
  }

  /* If statement to determine whether the click should show or hide menu */
  if (displayState != 'none') {
    document.getElementById(menu).style.display = 'none';					/* Hide the menu */
  }
  else {
    document.getElementById(menu).style.display = 'block';				/* Show the menu */
  }

  return false;

} // End function menuControl.