
var menu = [
[0,"Home","main.html"],
[0,"Contact",""],
 [1,"About Us","about_us.html"],
 [1,"Contact & Ordering","contact_ordering.html"],
 [1,"Guest Book","guest_book.html"],
 [1,"Shane's Resume","shane_resume.html"],
 [1,"Leah's Resume","leah_resume.html"],
 [1,"Thank You","thank_you.html"],
[0,"Masks",""],
 [1,"Mask Overview","mask_gallery.html"],
 [1,"Elementals","galleries/elemental_masks.html"],
 [1,"Party","galleries/party_masks.html"],
 [1,"Ocean","galleries/ocean_masks.html"],
 [1,"Gothics","galleries/gothic_masks.html"],
 [1,"Grotesques","galleries/grotesque_masks.html"],
 [1,"Seasons","galleries/season_masks.html"],
 [1,"Celestials","galleries/celestial_masks.html"],
 [1,"Butterflies","galleries/butterfly_masks.html"],
 [1,"Birds","galleries/bird_masks.html"],
 [1,"Kitty Cats","galleries/cat_masks.html"],
 [1,"Animals","galleries/animal_masks.html"],
 [1,"Dragons","galleries/dragon_masks.html"],
 [1,"Greenmen","galleries/greenman_masks.html"],
 [1,"Wee Faeries","galleries/wee_faerie_masks.html"],
 [1,"Faeries","galleries/faerie_masks.html"],
 [1,"Plaques","galleries/wall_plaques.html"],
 [1,"Vignettes","galleries/vignettes.html"],
 [1,"Special Editions","galleries/special_editions.html"],
[0,"Other Products",""],
 [1,"Bubble Wands","bubble_wands.html"],
 [1,"Crowns","galleries/crowns.html"],
 [1,"Hair Cups","galleries/hair_cups.html"],
 [1,"Eye Patches","galleries/eye_patches.html"],
 [1,"Oddiments","galleries/oddiments.html"],
 [1,"Labyrinths","labyrinths.html"],
 [1,"Carved Pumpkins","pumpkins.html"],
 [1,"Art Prints","art_prints.html"],
[0,"Schedule",""],
 [1,"Shows & Galleries","shows_galleries.html"],
[0,"Links","links.html"]];

var maxMenus = menu.length - 1;
<!------------------------------------------------------------------>
function makeWorkForIE() {
  //this function adds the 'over' class to all the LI elements
  //to make the menus appear in IE
  //taken from http://alistapart.com/articles/dropdowns/
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {
          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
}
<!------------------------------------------------------------------>
function getPageName(sub) { 
  //get the name of this page
  var del = '/';
  //changes the delimiter character for Windows IE
  if (navigator.appName.indexOf("Explorer") >= 0) {
    if (navigator.appVersion.indexOf("Win") >= 0) {
      del = '\\';
    }
  }
  var path = top.location.pathname;
  var len = path.length - 1;
  var depth = 0;
  if (sub != '') depth = 1;
  var num = len;
  var fname = '';
  while (num > 0) {
    if (path.charAt(num) == del) {
      if (depth == 1) {
        depth = 0;
      } else {
        fname = path.substring(num+1);
        num = 0;
      }
    }
    num = num - 1;
  }
  return fname;
}
<!------------------------------------------------------------------>
function createMenu(sub) {
  //create the CSS menus from the list 'menu' above
  var fname = getPageName(sub)
  var level = 0;
  var mtext = '<div class="dropdown"><ul id="nav">';
  for (var i = 0; i <= maxMenus; i++) {
    if ((menu[i][0] == 0) && (level > 0)) {
      mtext += '</ul>';
      level = 0;
    }
    if ((menu[i][0] > 0) && (level == 0)) {
      mtext += '<ul>';
      level = 1;
    }
    //if this is the entry for this page, make the menu item italic
    if (fname == menu[i][2]) {
      menu[i][1] = '<i>' + menu[i][1] + '</i>';
      menu[i][2] == '';
    }
    if (menu[i][2] == '') menu[i][2] = sub + fname;
    mtext += '<li><a href="' + sub + menu[i][2] + '" onfocus="this.blur()" target="_self">' + menu[i][1] + '</a>';
  }
  mtext += '</ul></div>';
  document.write(mtext);
  makeWorkForIE();
  //alert(mtext);
}