if (document.all)
{
  n=0;
  ie=1;
  fShow="visible";
  fHide="hidden";
  menuSubItemStyleClass="clsSubMenuItemIE";
  menuHeaderStyleClass="clsMenuHeaderStyleIE";
}
else if (document.layers)
{
  n=1;
  ie=0;
  fShow="show";
  fHide="hide";
  menuSubItemStyleClass="clsSubMenuItemNS";
  menuHeaderStyleClass="clsMenuHeaderStyleNS";
}
else
{
  n=0;
  ie=0;
}

function ttnbRefreshMenuStructure()
{
  if (n) // for Netscape only
  {
    var menubarIndex = 0;   // ignore "Home"
    for (index=0;index < top.document.layers.length;index++) {
      if (top.document.layers[index].id.indexOf("submenu") != -1) {
        layerHTMLstring = "";
        layerHTMLstring += "<table border="+menubar.subMenuPaneBorder+" bgcolor="+menubar.bgColor+">\n";
        
        for (itemIndex=0;itemIndex < top.document.layers[index].document.links.length;itemIndex++) {
          /* Now rewrite the layer using our stored text. */
          layerHTMLstring += "<tr><td><a class="+menuSubItemStyleClass+" title='' href='";
          layerHTMLstring += menubar.subMenuLayerDataArray[menubarIndex][itemIndex].location;
          layerHTMLstring += "'>";
          layerHTMLstring += menubar.subMenuLayerDataArray[menubarIndex][itemIndex].text;
          layerHTMLstring += "&nbsp;</a></td></tr>\n";
        }
        layerHTMLstring += "</table>\n";
        top.document.layers[index].document.open();
        top.document.layers[index].document.write(layerHTMLstring);
        top.document.layers[index].document.close();
        top.document.layers[index].onMouseOver = setCurMenuVisible2;
        top.document.layers[index].onMouseOut = setCurMenuInvisible;
        top.document.layers[index].document.linkColor = "#FFFFFF";
        top.document.layers[index].document.vlinkColor = "#87AFBF";
        top.document.layers[index].document.alinkColor = "#87AFBF";
        top.document.layers[index].document.hlinkColor = "#87AFBF";
        menubarIndex++;
      }
      if (top.document.layers[index].id.indexOf("menuheader") != -1) {
        top.document.layers[index].visibility = fShow;
      }
    }
  }
}

function MenuLayerData()
{
  // no code needed
}

function addItem(idItem, text, location, altLocation)
{
  var Lookup = "<!-- ITEM "+idItem+" -->";
  if (HTMLstr.indexOf(Lookup) != -1)
  {
    alert(idItem + " already exist");
    return;
  }

  var MENUitem = "\n<!-- ITEM "+idItem+" -->\n";
  
  /* New code that calculates the width of each menu heading individually depending on heading text. */
  this.menuHeaderPaneWidth = (text.length + 2) * this.menuHeaderPaneWidthFactor;

  /* This is a more robust way of making sure that menubar headers don't wrap onto a second line. */
  /* But take it out again because it causes other problems. */
  //text = text.replace(" ", "&nbsp;");

  if (n)
  {
    var index = this.subMenuLayerDataArray.length;
    this.subMenuLayerDataArray[index] = new Array();
    this.menuHeaderLayerDataArray[idItem] = new MenuLayerData();
    this.menuHeaderLayerDataArray[idItem].location = location;

    MENUitem += "<td width="+this.menuHeaderPaneWidth+" height="+this.subMenuPaneHeight+">\n";
    MENUitem += "<ilayer name="+idItem+"menuheader" + " width="+this.menuHeaderPaneWidth+" visibility=hide>";
    MENUitem += "<a title='" + text + "' href='"+location+"' class="+menuHeaderStyleClass;
    MENUitem += " onMouseOver='displaySubMenu(";
    MENUitem += '"';
    MENUitem += idItem;
    MENUitem += '"';
    MENUitem += ")' onMouseOut='setCurMenuInvisible2();' onclick='return true;'>";
    MENUitem += "&nbsp;&nbsp;";
    MENUitem += text;
    MENUitem += "&nbsp;";
    MENUitem += "</a>";
    MENUitem += "</ilayer>";
    MENUitem += "</td>\n";
  }
  else if (ie)
  {
    MENUitem += "<td  height="+this.subMenuPaneHeight+">\n";
    /* the menuHeaderStyle on the DIV seems to affect vertical positioning of the header menubar text? */
    MENUitem += "<div width="+this.menuHeaderPaneWidth+" id='"+idItem+"' style='position:relative; "+this.menuHeaderStyle+"' "
    MENUitem += 'onMouseOver="';
    MENUitem += "displaySubMenu('"+idItem+"')";
    MENUitem += '" ';
    MENUitem += "onMouseOut='setCurMenuInvisible();'>\n";
    //MENUitem += "<a class="+menuHeaderStyleClass+" title='"+text+"'";
    MENUitem += "<a class="+menuHeaderStyleClass+" title=''";
    if (location != null)
    {
      MENUitem += "href='"+location+"' onClick='hideCurrentMenu()'";
    }
    else
    {
      if (altLocation != null)
      {
        MENUitem += "href='"+altLocation+"' ";
      }
      else
      {
        MENUitem += "href='.' ";
      }
      MENUitem += "onClick='return false;'"
    }
    MENUitem += ">";
    MENUitem += "&nbsp;&nbsp;";
    MENUitem += text;
    MENUitem += "&nbsp;";
    MENUitem += "</a>\n";
    MENUitem += "</div>\n";
    MENUitem += "</td>\n";
  }

  MENUitem += "<!-- END OF ITEM "+idItem+" -->\n";
  MENUitem += "<!-- MAIN_MENU -->\n";

  HTMLstr = HTMLstr.replace("<!-- MAIN_MENU -->\n", MENUitem);
}

function addSubMenuLine(idParent)
{
  var MENUitem = "";

  if (n)
  {
  return;
  }

  Lookup = "<!-- ITEM "+idParent+" -->";
  if (HTMLstr.indexOf(Lookup) == -1)
  {
    alert(idParent + " not found");
    return;
  }

  Lookup = "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->";
  if (HTMLstr.indexOf(Lookup) == -1)
  {
    MENUitem += "\n\n\n\n<!-- SUB_MENU -->\n";
    HTMLstr = HTMLstr.replace("<!-- SUB_MENU -->\n", MENUitem);
  }

  MENUitem = "<tr><td><HR STYLE='color:black' SIZE=1></td></tr>\n";
  MENUitem += Lookup;
  HTMLstr = HTMLstr.replace(Lookup, MENUitem);
}


function addSubItem(idParent, text, location)
{
  var MENUitem = "";
  Lookup = "<!-- ITEM "+idParent+" -->";
  if (HTMLstr.indexOf(Lookup) == -1)
  {
    alert(idParent + " not found");
    return;
  }
  Lookup = "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->";
  if (HTMLstr.indexOf(Lookup) == -1)
  {
    MENUitem += "\n";
    if (n)
    {
      MENUitem += "<layer id='"+idParent+"submenu' visibility=hide bgcolor='"+this.bgColor;
      MENUitem += " onMouseOut='setCurMenuInvisible();' onMouseOver='setCurMenuVisible2();'";
      MENUitem += "'>\n";
      MENUitem += "<table border="+this.subMenuPaneBorder+" bgcolor="+this.bgColor+">\n";
      MENUitem += "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->\n";
      MENUitem += "</table>\n";
      MENUitem += "</layer>\n";
    }
    if (ie)
    {
      MENUitem += "<span bgcolor=black id='"+idParent+"submenu' onMouseOut='setCurMenuInvisible();'";
      MENUitem += " onMouseOver='setCurMenuVisible();'";
      MENUitem += " style='background-color:"+this.bgColor+"; position:absolute; visibility: hidden '>\n";
      MENUitem += "<table border="+this.subMenuPaneBorder+" bgcolor="+this.bgColor+">\n";
      MENUitem += "<!-- NEXT ITEM OF SUB MENU "+ idParent +" -->\n";
      MENUitem += "</table>\n";
      MENUitem += "</span>\n";
    }
    MENUitem += "\n";
    MENUitem += "<!-- SUB_MENU -->\n";
    HTMLstr = HTMLstr.replace("<!-- SUB_MENU -->\n", MENUitem);
  }

  if (n)
  {
      var currentMenuIndex = this.subMenuLayerDataArray.length - 1;
      var index = this.subMenuLayerDataArray[currentMenuIndex].length;
      this.subMenuLayerDataArray[currentMenuIndex][index] = new MenuLayerData();
      this.subMenuLayerDataArray[currentMenuIndex][index].text = text;
      this.subMenuLayerDataArray[currentMenuIndex][index].location = location;
  }
  MENUitem = "<tr><td><a class="+menuSubItemStyleClass+" title='' href='"+location+"'>"+text+"&nbsp;</a></td></tr>\n";
  //MENUitem = "<tr><td><a style="+menuSubItemStyle+" title='' href='"+location+"'>"+text+"&nbsp;</a></td></tr>\n";
  //MENUitem = "<tr><td><a class="+menuSubItemStyleClass+" title='"+text+"' href='"+location+"'>"+text+"&nbsp;</a></td></tr>\n";
  MENUitem += Lookup;
  HTMLstr = HTMLstr.replace(Lookup, MENUitem);

}

function showMenuBar()
{
  document.writeln(HTMLstr);
}


function MenuBar()
{
   this.bgColor = "#6699CC";   /* #00000 for black, #6699CC for cyan */
  if (ie)
  {
    /* style (as well as styleClass) needed for IE DIV */
    this.menuHeaderStyle = "font: bold 7pt Verdana, Arial, Helvetica; color: white; text-decoration: none;";
    //this.subMenuPaneWidth = subMenuPaneWidth;
    this.menuHeaderPaneWidthFactor = 15;
    this.subMenuPaneHeight = 18;
    this.menuHeaderIndent = 7;
    this.rightmargin = 1;
  }
  else if (n)
  {
    this.subMenuLayerDataArray = new Array();
    this.menuHeaderLayerDataArray = new Array();
    
    this.menuHeaderStyle = "font: bold 8pt Verdana, Arial, Helvetica; color: white; text-decoration: none;";
    //this.subMenuPaneWidth = subMenuPaneWidth - 9;
    this.menuHeaderPaneWidthFactor = 6;
    this.subMenuPaneHeight = 18;
    this.menuHeaderIndent = 1;
    if ("live article" != "newspaper edition") {
      this.rightMargin = 1;
    } else {
      this.rightMargin = 400;
    }
  }
  this.mainPaneBorder = 0;
  this.subMenuPaneBorder = 0;

  this.addItem    = addItem;
  this.addSubItem = addSubItem;
  this.addSubMenuLine = addSubMenuLine;
  this.showMenuBar   = showMenuBar;

  lastMenu = null;
  lastMenuHeading = null;

  HTMLstr = "<!-- MENU PANE DECLARATION BEGINS -->\n";
  HTMLstr += "\n";
  HTMLstr += "<table width=100% cellpadding=0 height=14 cellspacing=0 bgcolor="+this.bgColor+" border="+this.mainPaneBorder+">\n";
  HTMLstr += "<tr>";
  HTMLstr += "<td width='"+this.menuHeaderIndent+"'><font face='verdana,arial,sans-serif' size='1' color='#ffffff'>&nbsp;</font></td>";
  HTMLstr += "<!-- MAIN MENU STARTS -->\n";
  HTMLstr += "<!-- MAIN_MENU -->\n";
  HTMLstr += "<!-- MAIN MENU ENDS -->\n";
  HTMLstr += "<td width='"+this.rightMargin+"'><font face='verdana,arial,sans-serif' size='1' color='#ffffff'>&nbsp;</font></td>";
  HTMLstr += "</tr>\n";
  HTMLstr += "</table>\n";
  HTMLstr += "\n";
  HTMLstr += "<!-- SUB MENU STARTS -->\n";
  HTMLstr += "<!-- SUB_MENU -->\n";
  HTMLstr += "<!-- SUB MENU ENDS -->\n";
  HTMLstr += "\n";
  HTMLstr += "<!-- MENU PANE DECLARATION ENDS -->\n";
}

function displaySubMenu(idMainMenu)
{
  var menu;
  var submenu;
  //alert(eval("nav" + idMainMenu));
  
  if (n)
  {
    idMainMenuLayerName = idMainMenu + "menuheader";
    menu = document.layers[idMainMenuLayerName];

     if (document.layers[idMainMenu+"submenu"] != null)
    {
      submenu = document.layers[idMainMenu+"submenu"];
      if (lastMenu != null && lastMenu != submenu) hideCurrentMenu();
      
      submenu.left = document.layers[idMainMenuLayerName].pageX + 3;
      submenu.top  = document.layers[idMainMenuLayerName].pageY +
      document.layers[idMainMenuLayerName].clip.height;
        if (eval("nav" + idMainMenu)) {
            submenu.visibility = fShow;
        }

      submenu.onMouseOut=hideCurrentMenu;
    } else
    {
      if (lastMenu != null) hideCurrentMenu();
    }
  }
  else if (ie)
  {
     if (document.all.item(idMainMenu+"submenu") != null)
    {
      menu = eval(idMainMenu);
      submenu = eval(idMainMenu+"submenu.style");

      var totalOffset = 0;
      var item = menu;
      do
      {
        totalOffset += eval('item.offsetLeft');
        item = eval('item.offsetParent');
      } while (item != null);
      submenu.left = totalOffset+3;

      submenu.top  = menu.style.top;
      if (eval("nav" + idMainMenu)) {
            submenu.visibility = fShow;
        }
      
    }

    if (lastMenu != null && lastMenu != submenu)
    {
      hideCurrentMenu();
    }

  }
  
  setCurMenuVisible();
  lastMenu = submenu;
  lastMenuHeading = menu;

}

function hideCurrentMenu()
{
  if (lastMenu != null)
  {
    lastMenu.visibility = fHide;
    lastMenu = null;
    lastMenuHeading = null;
  }
}

var timeOutID = null;
function setCurMenuVisible()
{
   if (timeOutID)
  {
    clearTimeout(timeOutID);
    timeOutID = null;
  }
}

function setCurMenuVisible2()
{
   if (timeOutID)
  {
    clearTimeout(timeOutID);
    timeOutID = null;
  }

  /* This timeout when executed should clear out any hide timeout set by leaving the menu bar. (?) */  
  timeOutID = setTimeout("setCurMenuVisible()", 300)
  
}

function setCurMenuInvisible()
{
   if (ie || 
         (n && lastMenuHeading && lastMenu &&
          lastMenuHeading.name+"submenu" != lastMenu.name))
  {
    timeOutID = setTimeout("hideCurrentMenu()", 500)
  }
}

function setCurMenuInvisible2()
{
   if (n)
  {
    timeOutID = setTimeout("hideCurrentMenu()", 500)
  }
}

var menubar = new MenuBar();

//What's New
menubar.addItem('WhatsNewMenu', 'What\'s New', 'http://www.elitesoft.com/web/newsroom/index.htm', null);
       menubar.addSubItem('WhatsNewMenu', 'Newsroom', 'http://www.elitesoft.com/web/newsroom/index.htm');
       menubar.addSubMenuLine('WhatsNewMenu');
       menubar.addSubItem('WhatsNewMenu', 'Dpipe', 'http://www.elitesoft.com/web/plumbing/elite_dpipe_info.html');
       menubar.addSubItem('WhatsNewMenu', 'HSYM', 'http://www.elitesoft.com/web/hvacr/elite_hsym_info.html');
       menubar.addSubItem('WhatsNewMenu', 'Light', 'http://www.elitesoft.com/web/electrical/elite_light_info.html');
       menubar.addSubItem('WhatsNewMenu', 'Drawing Board', 'http://www.elitesoft.com/web/hvacr/DrawingBoard.htm');
       menubar.addSubItem('WhatsNewMenu', 'AUDIT', 'http://www.elitesoft.com/web/hvacr/elite_auditw_info.html');
       menubar.addSubItem('WhatsNewMenu', 'SPIPE', 'http://www.elitesoft.com/web/plumbing/elite_spipe_info.html');     
       menubar.addSubItem('WhatsNewMenu', 'HVAC Solution', 'http://www.elitesoft.com/web/hvacr/hvacsolution.htm'); 
       menubar.addSubItem('WhatsNewMenu', 'CHVAC Loads', 'http://www.elitesoft.com/web/hvacr/chvacx.html');       
       menubar.addSubItem('WhatsNewMenu', 'RHVAC Loads', 'http://www.elitesoft.com/web/hvacr/elite_rhvacw_info.html');
       menubar.addSubItem('WhatsNewMenu', 'Heavent', 'http://www.elitesoft.com/web/hvacr/heavent.htm');       
       menubar.addSubItem('WhatsNewMenu', 'ECOORD', 'http://www.elitesoft.com/web/electrical/elite_ecoord_info.html');
       menubar.addSubItem('WhatsNewMenu', 'REFRIG', 'http://www.elitesoft.com/web/hvacr/elite_refrig_info.html');
       menubar.addSubItem('WhatsNewMenu', 'Plumbing CAD Details', 'http://www.elitesoft.com/web/hvacr/plumbcaddetails.htm');
       menubar.addSubMenuLine('WhatsNewMenu');
       menubar.addSubItem('WhatsNewMenu', 'Year 2000', 'http://www.elitesoft.com/web/newsroom/year2000.html');
       menubar.addSubItem('WhatsNewMenu', 'Newsletter Sign-up', 'http://www.elitesoft.com/web/email/email.html');   
       var navWhatsNewMenu = true;


//HVACR
menubar.addItem('HVACRMenu', 'HVAC/R', 'http://www.elitesoft.com/web/hvacr/elite_hvacr_ndx.html', null);
       //Load Calcs-CHVAC, RHVAC, REFRIG
       menubar.addSubItem('HVACRMenu', 'Chvac - Commercial HVAC Loads', 'http://www.elitesoft.com/web/hvacr/chvacx.html');
       menubar.addSubItem('HVACRMenu', 'Rhvac - Residential HVAC Loads', 'http://www.elitesoft.com/web/hvacr/elite_rhvacw_info.html');
       menubar.addSubItem('HVACRMenu', 'Refrig - Refrigeration Box Loads', 'http://www.elitesoft.com/web/hvacr/elite_refrig_info.html');
       menubar.addSubMenuLine('HVACRMenu');

       //Energy Analysis-AUDIT, EZDOE
       menubar.addSubItem('HVACRMenu', 'Audit - Residential Energy Analysis', 'http://www.elitesoft.com/web/hvacr/elite_auditw_info.html');
       menubar.addSubItem('HVACRMenu', 'HVAC Solution - HVAC Schematic Design', 'http://www.elitesoft.com/web/hvacr/hvacsolution.htm');
       menubar.addSubItem('HVACRMenu', 'Ezdoe - Commercial Energy Analysis', 'http://www.elitesoft.com/web/hvacr/elite_ezdoe_info.html');
       menubar.addSubItem('HVACRMenu', 'Ductsize - Duct Sizing', 'http://www.elitesoft.com/web/hvacr/duct60.html');
       menubar.addSubMenuLine('HVACRMenu');

       //Assorted
       menubar.addSubItem('HVACRMenu', 'HVAC CAD Details Package', 'http://www.elitesoft.com/web/hvacr/caddetails.htm');
       menubar.addSubItem('HVACRMenu', 'Drawing Board - Simple HVAC Drawings', 'http://www.elitesoft.com/web/hvacr/DrawingBoard.htm');
       menubar.addSubItem('HVACRMenu', 'Eca - Earth Coupled Pipe Loop Sizing', 'http://www.elitesoft.com/web/hvacr/ecaw.html');
       menubar.addSubItem('HVACRMenu', 'Gasvent - Gas Vent Sizing', 'http://www.elitesoft.com/web/hvacr/elite_gasventw_info.html');
       menubar.addSubItem('HVACRMenu', 'Heavent - Industrial Exhaust Ventilation', 'http://www.elitesoft.com/web/hvacr/heavent.htm');
       menubar.addSubItem('HVACRMenu', 'Hsym - Chilled & Hot Water Pipe Analysis', 'http://www.elitesoft.com/web/hvacr/elite_hsym_info.html');
       menubar.addSubItem('HVACRMenu', 'HVAC Tools - Collection of HVAC Utilities', 'http://www.elitesoft.com/web/hvacr/elite_htools_info.html');
       menubar.addSubItem('HVACRMenu', 'IAQ Tools - Indoor Air Quality Tools', 'http://www.elitesoft.com/web/hvacr/iaqtools.htm');
       menubar.addSubItem('HVACRMenu', 'Indoor Humidity Tools', 'http://www.elitesoft.com/web/hvacr/inhumid.htm');
       menubar.addSubItem('HVACRMenu', 'Life - Multi-phased Life Cycle Cost Analysis', 'http://www.elitesoft.com/web/hvacr/elite_life_info.html');
       menubar.addSubItem('HVACRMenu', 'Psychart - Psychrometric Analysis', 'http://www.elitesoft.com/web/hvacr/psywindows.htm');
       menubar.addSubItem('HVACRMenu', 'Quote - HVAC Estimating and Sales', 'http://www.elitesoft.com/web/hvacr/quotex.html');
       menubar.addSubItem('HVACRMenu', 'Shadow - Glass shading Analysis', 'http://www.elitesoft.com/web/hvacr/elite_shadow_info.html');
       menubar.addSubItem('HVACRMenu', 'Ventilation Tools', 'http://www.elitesoft.com/web/hvacr/ventools.htm');
       var navHVACRMenu = true;

//Electrical
menubar.addItem('ElectricalMenu', 'Electrical', 'http://www.elitesoft.com/web/electrical/elite_electrical_design_ndx.html', null);
       menubar.addSubItem('ElectricalMenu', 'Ecoord - Fuse and Breaker Coordination', 'http://www.elitesoft.com/web/electrical/elite_ecoord_info.html');
       menubar.addSubItem('ElectricalMenu', 'Panel - Panel Design & Component Sizing', 'http://www.elitesoft.com/web/electrical/elite_panel_info.html');
       menubar.addSubItem('ElectricalMenu', 'Short - Short Circuit Analysis', 'http://www.elitesoft.com/web/electrical/elite_short_info.html');
       menubar.addSubItem('ElectricalMenu', 'Vdrop - Voltage Drop Analysis', 'http://www.elitesoft.com/web/electrical/elite_vdrop_info.html');
       menubar.addSubMenuLine('ElectricalMenu');
       menubar.addSubItem('ElectricalMenu', 'ELEC Tools - Collection of Electrical Utilities', 'http://www.elitesoft.com/web/electrical/elite_etools_info.html');
       menubar.addSubItem('ElectricalMenu', 'Light - Zonal Cavity Lighting Calcs', 'http://www.elitesoft.com/web/electrical/elite_light_info.html');
       menubar.addSubItem('ElectricalMenu', 'Inpoint/Outpoint - Point by Point Lighting Design', 'http://www.elitesoft.com/web/electrical/elite_inpoint_outpoint_info.html');
      
       var navElectricalMenu = true;

//Plumbing
menubar.addItem('PlumbingMenu', 'Plumbing', 'http://www.elitesoft.com/web/plumbing/elite_plumbing_design_ndx.html', null);
       menubar.addSubItem('PlumbingMenu', 'Spipe - Service Supply Pipe Sizing', 'http://www.elitesoft.com/web/plumbing/elite_spipe_info.html');
       menubar.addSubItem('PlumbingMenu', 'Dpipe - Drainage Supply Pipe Sizing', 'http://www.elitesoft.com/web/plumbing/elite_dpipe_info.html');
       menubar.addSubMenuLine('PlumbingMenu');
       menubar.addSubItem('PlumbingMenu', 'Fire - Fire Sprinkler Hydraulic Calcs', 'http://www.elitesoft.com/web/fire/elite_fire_info.html');
       menubar.addSubMenuLine('PlumbingMenu');
       menubar.addSubItem('PlumbingMenu', 'Hsym - Chilled & Hot Water Pipe Analysis', 'http://www.elitesoft.com/web/hvacr/elite_hsym_info.html');
       menubar.addSubMenuLine('PlumbingMenu');
       menubar.addSubItem('PlumbingMenu', 'Sprinkler CAD Details Package', 'http://www.elitesoft.com/web/plumbing/firecaddetails.htm');
       menubar.addSubItem('PlumbingMenu', 'Plumbing CAD Details Package', 'http://www.elitesoft.com/web/hvacr/plumbcaddetails.htm');
       var navPlumbingMenu = true;


//Prices & Ordering
menubar.addItem('OrderMenu', 'Prices/Orders/Training', 'http://www.elitesoft.com/web/prices/elite_order_info.html', null);
       menubar.addSubItem('OrderMenu', 'Price List', 'http://www.elitesoft.com/web/prices/elite_order_info.html');
       menubar.addSubItem('OrderMenu', 'Online Ordering', 'http://www.elitesoft.com/web/orders/OrderForm.htm');
       menubar.addSubItem('OrderMenu', 'Customer&nbsp;Testimonials', 'http://www.elitesoft.com/web/homepage/elite_testimonial.html');
       menubar.addSubItem('OrderMenu', 'Training Services', 'http://www.elitesoft.com/web/training/welcome.html');
       var navOrderMenu = true;

//Downloads
menubar.addItem('DownloadMenu', 'Downloads', 'http://www.elitesoft.com/web/homepage/elite_demo_list.html', null);
       menubar.addSubItem('DownloadMenu', 'Software Demos', 'http://www.elitesoft.com/web/homepage/elite_demo_list.html');
       menubar.addSubItem('DownloadMenu', 'Program Updates', 'http://www.elitesoft.com/web/updates/elite_update_list.html');
       menubar.addSubItem('DownloadMenu', 'Articles', 'http://www.elitesoft.com/web/newsroom/stories.htm');
       var navDownloadMenu = true;

//Contact Us
menubar.addItem('ContactMenu', 'Contact Us', 'http://www.elitesoft.com/web/homepage/elite_contact_info.html', null);
       menubar.addSubItem('ContactMenu', 'Contact Information', 'http://www.elitesoft.com/web/homepage/elite_contact_info.html');
       menubar.addSubItem('ContactMenu', 'Newsletter Sign-up', 'http://www.elitesoft.com/web/email/email.html');
       menubar.addSubItem('ContactMenu', 'Hot Links', 'http://www.elitesoft.com/web/links/elite_links.html');
       menubar.addSubItem('ContactMenu', 'Training Services', 'http://www.elitesoft.com/web/training/welcome.html');
       menubar.addSubItem('ContactMenu', 'About Elite Software', 'http://www.elitesoft.com/web/homepage/about_elite_software.html');
       var navContactMenu = true;
    
// Home Page
menubar.addItem('Home', 'HOME', 'http://www.elitesoft.com', null);

menubar.showMenuBar();

if (ie)
{
  document.body.onclick=hideCurrentMenu;
  document.body.onscroll=hideCurrentMenu;
}
else if (n)
{
  document.onmousedown=hideCurrentMenu;
  window.captureEvents(Event.MOUSEMOVE);
}