    var isDOM = (document.getElementById ? true : false); 
    var isIE4 = ((document.all && !isDOM) ? true : false);
    var isNS4 = navigator.appName=='Netscape'&&!isDOM ? true : false;
    if(is_ie5 && isDOM)
    {
      isDOM = false;
      isIE4 = true;
    }

    // Hide timeout.
    var popTimer = 0;
    // Array showing highlighted menu items.
    var litNow = new Array();

    function getRef(id)
    {
      if (isDOM) return document.getElementById(id);
      if (isIE4) return document.all[id];
      if (isNS4) return document.layers[id];
    }

    function getSty(id)
    {
      return (isNS4 ? getRef(id) : getRef(id).style);
    }
 
    function popOver(menuNum, itemNum)
    {
      clearTimeout(popTimer);
      hideAllBut(menuNum);
      litNow = getTree(menuNum, itemNum);
      changeCol(litNow, true);
      targetNum = menu[menuNum][itemNum].target;
      if (targetNum > 0) 
      {
        thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
        thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);
        with (menu[targetNum][0].ref)
        {
          left = parseInt(thisX + menu[targetNum][0].x);
          top = parseInt(thisY + menu[targetNum][0].y);
          visibility = 'visible';
        }
      }
    }

    function popOut(menuNum, itemNum)
    {
      if ((menuNum == 0) && !menu[menuNum][itemNum].target)
      {
        hideAllBut(0)
      }
      else
      {
        popTimer = setTimeout('hideAllBut(0)', 500);
      }
    }

// Here - begin - added the following function
    function displayStatusMsg(msgStr)
    {
      if((msgStr != null) && (msgStr.length > 0))
        status=msgStr
      else
        status=document.title;
    }
  
    function preloadImages()
    {
      var d=document;
      if(d.images)
      {
        if(!d.MM_p) 
          d.MM_p=new Array();
        var i,j=d.MM_p.length,a=preloadImages.arguments;
        for(i=0; i<a.length; i++)
          if (a[i].indexOf("#")!=0)
          {
            d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
          }
      }
    }
  
// Here - end

    function getTree(menuNum, itemNum) 
    {
      // Array index is the menu number. The contents are null (if that menu is not a parent)
      // or the item number in that menu that is an ancestor (to light it up).
      itemArray = new Array(menu.length);
      
      while(1)
      {
        itemArray[menuNum] = itemNum;
        // If we've reached the top of the hierarchy, return.
        if (menuNum == 0) 
          return itemArray;
        itemNum = menu[menuNum][0].parentItem;
        menuNum = menu[menuNum][0].parentMenu;
      }
    }
    
    // Pass an array and a boolean to specify colour change, true = over colour.
    function changeCol(changeArray, isOver)
    {
      if (isNS4)
      {
        for (menuCount = 0; menuCount < changeArray.length; menuCount++) 
        {
          if (changeArray[menuCount]) 
          {
            newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;
            with (menu[menuCount][changeArray[menuCount]].ref) 
            {
              if (isNS4)
                bgColor = newCol
              else 
                backgroundColor = newCol;
            }
          }
        }
      }
    }

    function hideAllBut(menuNum)
    {
      var keepMenus = getTree(menuNum, 1);
      for (count = 0; count < menu.length; count++)
        if (!keepMenus[count])
          menu[count][0].ref.visibility = 'hidden';
      changeCol(litNow, false);
    }
    
    // *** MENU CONSTRUCTION FUNCTIONS ***

// Here - begin - added the argument 'alt' and 'sts' to the follwing function
    function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass, alt, sts) 
    {
      // True or false - a vertical menu?
      this.isVert = isVert;
      // The popout indicator used (if any) for this menu.
      this.popInd = popInd;
      // Position and size settings.
      this.x = x;
      this.y = y;
      this.width = width;
      // Colours of menu and items.
      this.overCol = overCol;
      this.backCol = backCol;
      // The stylesheet class used for item borders and the text within items.
      this.borderClass = borderClass;
      this.textClass = textClass;
      // Alternate text: hover text
      this.alt = alt;
      // Statusbar text
      this.sts = sts;
      // Parent menu and item numbers, indexed later.
      this.parentMenu = null;
      this.parentItem = null;
      // Reference to the object's style properties (set later).
      this.ref = null;
    }
// Here - end
    
// Here - begin - added the argument 'alt' and 'sts' to the follwing function
    function Item(text, href, frame, length, spacing, target, alt, sts)
    {
      this.text = text;
      this.href = href;
      this.frame = frame;
      this.length = length;
      this.spacing = spacing;
      this.target = target;
      this.alt = alt;
      this.sts = sts;
      // Reference to the object's style properties (set later).
      this.ref = null;
    }
// Here - end

// Here - begin - added the following function, which replaces the following in a string:
// '\n' with "<br>"
// '<' with "&lt;"
// '>' with "&gt"
    function parseHtmlToText(str)
    {
      retVal = "";
      for (index = 0; index < str.length; index++)
      {
        key = str.charAt(index);
        switch(key)
        {
          case '\n':
            retVal += "<br>\n";
            break;
          case '<':
            retVal += "&lt;";
            break;
          case '>':
            retVal += "&gt;";
            break;
          default:
            retVal += key;
        }
      }
      return retVal;
    }
// Here - end
    
    function writeMenus()
    {
// Begin - Just for test
/*
      var myBars     = 'directories=no,location=no,menubar=yes,status=no,titlebar=no,toolbar=yes';
      var myOptions  = 'scrollbars=yes,width=800,height=400,resizeable=yes';
      var myFeatures = myBars + ',' + myOptions;
      var newWin     = open('', 'myWin', myFeatures);
      if( isDOM )
        newWin.document.writeln('<pre><strong>isDOM</strong></pre>');
      if( isIE4 )
        newWin.document.writeln('<pre><strong>isIE4</strong></pre>');
      if( isNS4 )
        newWin.document.writeln('<pre><strong>isNS4</strong></pre>');
*/
// End - Just for test

      if (!isDOM && !isIE4 && !isNS4)
      {
        return;
      }

      for (currMenu = 0; currMenu < menu.length; currMenu++) with (menu[currMenu][0]) 
      {
        var str = '', itemX = 0, itemY = 0;
        
        for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem])
        {
          var itemID = 'menu' + currMenu + 'item' + currItem;
          
          var w = (isVert ? width : length);
          var h = (isVert ? length : width);
          if (isNS4)
            h = h - 7;
          
          if (isDOM || isIE4)
          {
            str += '  <div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
            if (backCol) str += 'background: ' + backCol + '; ';
            str += '" ';
          }
          if (isNS4)
          {
            str += '  <layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' +  w + '" height="' + h + '" visibility="inherit" ';
            if (backCol)
              str += 'bgcolor="' + backCol + '" ';
          }
          if (borderClass)
            str += 'class="' + borderClass + '" ';
          
          str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' + currMenu + ',' + currItem + ')">';
          
          str += '\n    <table width="' + w + '" border="0" cellspacing="0" cellpadding="' + (!isNS4 && borderClass ? 3 : 0) + '">\n      <tr>\n' +
                 '        <td valign="top" height="' + h + '" background="/images/menu_bar_middle.jpg" border="0">&nbsp;&nbsp;' + '\n          <a onMouseOver="displayStatusMsg(\'' + sts + '\'); return true" onMouseOut="displayStatusMsg(\'\'); return true" title="' + alt + '" class="' + textClass + '" href="' + href + '"' + (frame ? ' target="' + frame + '">' : '>') + text + '</a>&nbsp;&nbsp;</td>\n';
          if (target > 0)
          {
            
            menu[target][0].parentMenu = currMenu;
            menu[target][0].parentItem = currItem;
            
            if (popInd)
              str += '\n        <td align="right" valign="top" height="' + h + '" background="/images/menu_bar_middle.jpg" border="0">&nbsp;&nbsp;' + popInd + '&nbsp;&nbsp;</td>\n';
          }
          str += '      </tr>\n    </table>\n' + (isNS4 ? '  </layer>\n' : '  </div>\n');
          if (isVert) 
            itemY += length + spacing
          else 
            itemX += length + spacing;
        }
        if (isDOM)
        {
          var newDiv = document.createElement('div');
          newDiv.innerHTML = str;
          document.getElementsByName('menutable').item(0).appendChild(newDiv);
  
// Begin - Just for test
/*
          if(str.length > 0)
            newWin.document.writeln('<pre>' + parseHtmlToText(str) + '</pre>');
*/
// End - Just for test
          ref = newDiv.style;
          ref.position = 'absolute';
          ref.visibility = 'hidden';
        }
        
        if (isIE4)
        {
          str = '  <div id="menu' + currMenu + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '  </div>\n';
          var para = document.all['menutable'];
          para.insertAdjacentHTML('BeforeBegin', str);
// Begin - Just for test
/*
          if(str.length > 0)
            newWin.document.writeln('<pre>' + parseHtmlToText(str) + '</pre>');
*/
// End - Just for test
          ref = getSty('menu' + currMenu + 'div');
        }
        
        if (isNS4)
        {
          ref = new Layer(0);
          ref.document.write(str);
// Begin - Just for test
/*
          if(str.length > 0)
            newWin.document.writeln('<pre>' + parseHtmlToText(str) + '</pre>');
*/
// End - Just for test
          ref.document.close();
        }
        
        for (currItem = 1; currItem < menu[currMenu].length; currItem++)
        {
          itemName = 'menu' + currMenu + 'item' + currItem;
          if (isDOM || isIE4) 
            menu[currMenu][currItem].ref = getSty(itemName);
          if (isNS4)
            menu[currMenu][currItem].ref = ref.document[itemName];
        }
      }
      with(menu[0][0]) 
      {
        ref.left = x;
        ref.top = y;
        ref.visibility = 'visible';
      }
      status = document.title;

// Begin - Just for test
/*
      newWin.document.close();
      newWin.focus();
*/
// End - Just for test
    }
    
    // Syntaxes: *** START EDITING HERE, READ THIS SECTION CAREFULLY! ***
    //
    // menu[menuNumber][0] = new Menu(Vertical menu? (true/false), 'popout indicator', left, top,
    // width, 'mouseover colour', 'background colour', 'border stylesheet', 'text stylesheet', 'alternate text', 'statusbar text');
    //
    // Left and Top are measured on-the-fly relative to the top-left corner of its trigger, or
    // for the root menu, the top-left corner of the page.
    //
    // menu[menuNumber][itemNumber] = new Item('Text', 'URL', 'target frame', length of menu item,
    //  additional spacing to next menu item, number of target menu to popout, 'alternate text', 'statusbar text');
    //
    // If no target menu (popout) is desired, set it to 0. Likewise, if your site does not use
    // frames, pass an empty string as a frame target.
    //
    // Something that needs explaining - the Vertical Menu setup. You can see most menu's below
    // are 'true', that is they are vertical, except for the first root menu. The 'length' and
    // 'width' of an item depends on its orientation -- length is how long the item runs for in
    // the direction of the menu, and width is the lateral dimension of the menu. Just look at
    // the examples and tweak the numbers, they'll make sense eventually :).
    
    var menu = new Array();
    
    // Default colours passed to most menu constructors (just passed to functions, not
    // a global variable - makes things easier to change later in bulk).
    var defOver = '#CCCCFF', defBack = '#BB00BB';
    
    // Default 'length' of menu items - item height if menu is vertical, width if horizontal.
    var defLength = 29;
    
    // Menu 0 is the special, "root" menu from which everything else arises.
    menu[0] = new Array();
    // A non-vertical menu with a few different colours and no popout indicator, as an example.
    // *** MOVE ROOT MENU AROUND HERE ***  it's positioned at (5, 0) and is 17px high now.
    menu[0][0] = new Menu(false, 
                          '<img name="img_menu_bottom" id="img_menu_bottom" alt="Menu down" title="Menu down" src="/images/menu_bottom.gif" border="0">', 
                          5, 79, 29, defOver, defBack, 'menuBorder', 'menuItem', '', '');
    if (isNS4)
      menu[0][0].y = menu[0][0].y + 9;
    // Notice how the targets are all set to nonzero values...
    // The 'length' of each of these items is 40, and there is spacing of 10 to the next item.
    // Most of the links are set to '#' hashes, make sure you change them to actual files.
    menu[0][1] = new Item('Home',
                          domain + '/',
                          '', 100, 0, 1, 
                          'Go to our home page.', 
                          'Home page of The International Organization for Shantala&trade; Massage Inc.');
    menu[0][2] = new Item('About Us',
                          domain + '/scripts/about_us.php',
                          '', 110, 0, 2, 
                          'Information about The International Organization for SHANTALA Massage.', 
                          'About us will tell you everything you want to know about the International Organization for SHANTALA Massage.');
    menu[0][3] = new Item('Customer Help',
                          domain + '/scripts/customer_help.php',
                          '', 140, 0, 3, 
                          'Find out how we can assist you as a customer.', 
                          'How can we be of service?');

    // Home menu.
    menu[1] = new Array();
    //               Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass, alt, sts) 
    menu[1][0] = new Menu(true, '', 0, 29, 125, defOver, defBack, 'menuBorder', 'menuItem','', '');
    menu[1][1] = new Item('For Parents',       
                           domain + '/parents/',       
                          '', defLength, 0, 0, 
                          'SHANTALA Baby Massage for parents, guardians or caregivers.', 
                          'Information about SHANTALA Massage for parents, guardians or caregivers.');
    menu[1][2] = new Item('For Instructors',   
                           domain + '/instructors/',   
                          '', defLength, 0, 0, 
                          'SHANTALA Massage for instructors.', 
                          'Information when you are, or want to become a Certified SHANTALA Massage Instructor.');
    menu[1][3] = new Item('The Shop',          
                           domain + '/shop/',          
                          '', defLength, 0, 0, 
                          'The Shop, with the TummyTub.', 
                          'The Shop, with the TummyTub.');
    menu[1][4] = new Item('Legal',         
                           domain + '/legal/',         
                          '', defLength, 0, 0, 
                          'All our legal information in one orderly spot.', 
                          'Before using our website, please read our legal documents thoroughly.');

    // About us menu.
    menu[2] = new Array();
    //               Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass, alt, sts) 
    menu[2][0] = new Menu(true, '', 0, 29, 180, defOver, defBack, 'menuBorder', 'menuItem', '', '');
    menu[2][1] = new Item('Company Overview',                      
                          domain + '/scripts/company_overview.php',
                          '', defLength, 0, 0, 
                          'Find out about our organization.', 
                          'Information about how The International Organization for SHANTALA Massage is organized.');
    menu[2][2] = new Item('Contact Us',                            
                          domain + '/scripts/contact_us.php',
                          '', defLength, 0, 0, 
                          'All the possible ways to get in touch with us.', 
                          'Gives you all the options of how to get in touch with us.');
    menu[2][3] = new Item('FAQ',                   
                          domain + '/scripts/about_us_faq.php',
                          '', defLength, 0, 0, 
                          'Visit our Frequently Asked Questions about Baby and Child Massage.', 
                          'Here you can find the answers to frequently asked questions about Baby and Child Massage.');
    menu[2][4] = new Item('Guest Book',                            
                          domain + '/scripts/guest_book.php',
                          '', defLength, 0, 0, 
                          'If you liked visiting our web site, please fill out our Guest Book.', 
                          'Here you are able to let us know what you think about our web site and/or our products.');
    menu[2][5] = new Item('Mission Statement',                     
                          domain + '/scripts/mission_statement.php',
                          '', defLength, 0, 0, 
                          'What moves us, as an organization.', 
                          'Learn about what moves us, as an organization.');
    menu[2][6] = new Item('Newsletter',
                          domain + '/scripts/newsletter.php',
                          '', defLength, 0, 0,
                          'Read, subscribe or unsubscribe to our SHANTALA Massage newsletter.',
                          'The SHANTALA Massage newsletter is a great source of up-to-date information!');
    menu[2][7] = new Item('Press Releases',                        
                          domain + '/scripts/press_releases.php',
                          '', defLength, 0, 0, 
                          'Read our Press Releases and our Ads as they have been published.', 
                          'Here you can browse through the various press releases and ads we have published.');
    menu[2][8] = new Item('SHANTALA Massage on TV',
                          domain + '/scripts/on_tv.php',
                          '', defLength, 0, 0,
                          'SHANTALA Massage on TV.',
                          'SHANTALA Massage on TV.');

    // Customer Help menu
    menu[3] = new Array();
    //               Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass, alt, sts) 
    menu[3][0] = new Menu(true, '', 0, 29, 130, defOver, defBack, 'menuBorder', 'menuItem', '', '');
    menu[3][1] = new Item('Contact Us',       
                          domain + '/scripts/contact_us.php',
                          '', defLength, 0, 0, 
                          'All the possible ways to get in touch with us.', 
                          'Gives you all the options of how to get in touch with us.');
    menu[3][2] = new Item('Customer Support', 
                          domain + '/scripts/customer_support.php',
                          '', defLength, 0, 0, 
                          'Find your way around on our website.', 
                          'Find your way around on our website.');
    menu[3][3] = new Item('FAQ',                   
                          domain + '/scripts/faq.php',
                          '', defLength, 0, 0, 
                          'Visit our Frequently Asked Questions about our website and our services.', 
                          'Here you can find the answers to frequently asked questions about our website and our services.');
    menu[3][4] = new Item('Feedback',              
                          domain + '/scripts/feedback.php',
                          '', defLength, 0, 0, 
                          'Fill out a feedback form so we can serve you even better.', 
                          'Fill out this form to share your feedback so we can improve our service to you.');
    menu[3][5] = new Item('Glossary',              
                          domain + '/scripts/glossary.php',
                          '', defLength, 0, 0, 
                          'Our glossary gives you a list of acronyms and abbreviations.', 
                          'Browse through the glossary to see our list of acronyms and abbreviations.');
    menu[3][6] = new Item('Search',                
                          domain + '/scripts/search.php',
                          '', defLength, 0, 0, 
                          'Search our web site for keywords.', 
                          'Here you can search our website for keywords.');
    menu[3][7] = new Item('Site Map',         
                          domain + '/scripts/site_map_shop.php',
                          '', defLength, 0, 0, 
                          'See a graphical reseminar of how the website for the Shop is organized.', 
                          'A graphical reseminar of how the website for the Shop is organized.');

    // *** OPTIONAL CODE FROM HERE DOWN ***
    
    // These two lines handle the window resize bug in NS4. See <body onResize="...">.
    // I recommend you leave this here as otherwise when you resize NS4's width menu's are hidden.
    
    var popOldWidth = window.innerWidth;
    nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');
