//<!--
//===== BEGIN OF EDITABLE/CONFIGURABLE SECTION =============================
// list the id's (i.e., id="category") of the main categories/buttons/links
// in the left navigation column
var categories = new Array('mug', 'news', 'download', 'doc', 'support', 'inquiry', 'policies', 'changelog');

// specify the how much time (in milliseconds) to delay after the mouse leaves
// a popup menu (and does not mouseover another navigation button/category)
// before the popup menu is made hidden - this makes the popup menus a little
// easier to use
var delay = 1000;  // milliseconds
//===== END OF EDITABLE/CONFIGURABLE SECTION =============================

//=========== !! DO NOT MODIFY ANYTHING BELOW THIS LINE !! =================
var showsubmenu = 'table';                  // SET TO DISPLAY: TABLE; FOR ALL NON-IE BROWSERS
if (document.all&&document.getElementById) {  // IE ONLY
  showsubmenu = 'block';                   // SET TO DISPLAY: BLOCK; FOR IE ONLY
}
var timerID;

//===============================================================================
// BEGIN OF FUNCTION SECTION 
//===============================================================================
//-------------------------------------------------------------------------------
function showMenu(menu) {
  window.clearTimeout(timerID);  // REMOVE ANY DELAY TIMERS
  hideAll();                    // HIDE ALL MENUS FIRST, BEFORE SHOWING DESIRED POPUP MENU
  var exists = 'true';
  try { var node = menu.firstChild.nextSibling.nextSibling; } 
  catch(excptn) { exists = 'false';  }
  finally {
    if (exists == 'true') {
      node.style.display=showsubmenu;
    }
  }
}

//-------------------------------------------------------------------------------
function hideAll() {
  // hide all popup menus
  for (i in categories) {
    var exists = 'true';
    try { var node = document.getElementById(categories[i]).firstChild.nextSibling.nextSibling; } 
    catch(excptn) { exists = 'false';  }
    finally {
      if (exists == 'true') {
        node.style.display="none";
      }
    }
  }
}

//-------------------------------------------------------------------------------
function hideMenu() {
  // hide popup menu, after the specified delay
  timerID = setTimeout('hideAll()', delay);
}

//--------------------------------------------------------------------------------
//startList = function() {
function startList() {
  // Set onMouseOver and onMouseOut events for navigation categories/buttons/links
  var command;
  for (i=0; i < categories.length; i++) {
    command = 'document.getElementById(categories[' + i + ']).onmouseover=function() {showMenu(document.getElementById(categories[' + i + ']));}';
    eval(command);
    command = 'document.getElementById(categories[' + i + ']).onmouseout=function() {hideMenu();}';
    eval(command);
  }
}

//===============================================================================
// END OF FUNCTIONS
//===============================================================================

//window.onload=startList;
//-->