var currentMenu = "main";

function getElementById_s(id){
  var obj = null;
  if(document.getElementById){
    /* Prefer the widely supported W3C DOM method, if
      available:-
    */
    obj = document.getElementById(id);
  }

  if(obj == null){
    if(navigator.userAgent.indexOf("Firefox") > -1 || document.all){
      /* Branch to use document.all on document.all only
      browsers. Requires that IDs are unique to the page
      and do not coincide with NAME attributes on other
      elements:-
      */
      obj = document.all[id];
    }
  }
  /* If no appropriate element retrieval mechanism exists on
  this browser this function always returns null:-
  */
//  alert("rtn : " + obj)
  return obj;
}

function updateMenuStyle(mi, style){
  var cellEl = getElementById_s(mi + "Cell");
//  alert("before: " + cellEl.className);
  cellEl.className = style;
//  alert("after: " + cellEl.className);
  return true;
}

function mmiH(mi){ // Main Menu Item Highlight
  return updateMenuStyle(mi, "mainMenuItemActive");
}
function mmiR(mi){ // Main Menu Item Reset
  return updateMenuStyle(mi, "mainMenuItemInactive");
}
function smiH(mi){ // Sub Menu Item Highlight
//  return updateMenuStyle(mi, "mainMenuItemActive");
  return updateMenuStyle(mi, "subMenuItemActive");
}
function smiR(mi){ // Sub Menu Item Reset
//  return updateMenuStyle(mi, "mainMenuItemInactive");
  return updateMenuStyle(mi, "subMenuItemInactive");
}
