   ie = document.all ? 1: 0
   n  = document.layers ? 1: 0

   numberOfMenus = 9     //Number of menus?
   var hideAll   = true  //Hide other submenus when a new one is clicked?

   function makeMenuBar(obj,nest,vis)
      {
      nest = (!nest) ? '': 'document.' + nest + '.'

      this.css    = (n) ? eval(nest + 'document.' + obj): eval(obj + '.style')
      this.hideIt = b_hideIt;
      this.showIt = b_showIt;
					
      if (ie && vis)
         this.css.visibility='hidden'

      this.evnt   = (n)? eval(nest + 'document.' + obj): eval(obj);	
      this.go     = 0;
      this.height = n?this.css.document.height: eval(obj + '.offsetHeight');
      this.top    = b_gettop
      this.obj    = obj + "Object";

      eval(this.obj + "=this")	
      }

   function b_gettop()
      {
      var gleft=(n) ? eval(this.css.top): eval(this.css.pixelTop);
      return gleft;
      }

   function b_showIt()
      {
      this.css.visibility = "visible"
      }

   function b_hideIt()
      {
      this.css.visibility = "hidden"
      }

   function menuBarInit()
      {
      oSub = new Array();
      oTop = new Array();

      for (i=1; i<numberOfMenus; i++)
         {
         oTop[i] = new makeMenuBar('divTop' + i, 'divBg');

         if (i < numberOfMenus - 1)
            {
            oSub[i] = new makeMenuBar('divSub' + i, 'divBg.document.divTop' + i, 1);
            oSub[i].evnt.onmouseout = evOut;
            }
         }

      oMenu         = new makeMenuBar('divBg');
      scrolled      = n?"window.pageYOffset":"document.body.scrollTop";
      oMenu.css.top = eval(scrolled);
      }

   function evOut()
      {
      if (ie)
         this.style.visibility = 'hidden'
      else if(n) this.visibility = 'hidden'
      }

   function ieShow(num)
      {
      if (ie)
         {
         oSub[num].showIt();
         window.event.cancelBubble = true;
	 }
      }

   function extract(num)
      {
      try
         {
            if (hideAll)
               {
               for (i=1; i<oSub.length; i++)
                  {
                  if (num != i)
                     oSub[i].hideIt()
                  }
               }
      
      
            if (num > 0)
               {
               oSub[num].showIt();
               }
         }
      catch(e)
         {
         //oSub is not initialized yet (menuBarInit is not called)         
         }
      }