      var mainmenu;
      function setActiveStyleSheet(title) {
	var i, a, main;
        title = title.replace(/%20/g, " "); // IE screweed up
	if (title) {
          var links = document.getElementsByTagName('link');
          for(i = 0; (a = links[i]); i++) {
            if (/style/.test(a.getAttribute('rel')) && a.getAttribute('title')) {
              a.disabled = true;
              if (a.getAttribute('title') == title) {
                a.disabled = true;
                a.disabled = false;
              }
            }
          }
	}
   }

/*
      function toggleCheckbox(action, pref) {
        if (!mainmenu) {
          alert("Your browser does not support our menu so preferences do not work");
          return;
        }
        var item = action.info;
        var img = item.icon;
        var val;
        if (/checkbox-1/.test(img.src)) {
          // item is on
          img.src = img.src.replace('checkbox-1', 'checkbox-0');
          val = false;
        } else {
          // assume item is off
          img.src = img.src.replace('checkbox-0', 'checkbox-1');
          val = true;
        }
        switch (pref) {
          case 'tooltips':
            item.menu.config.tooltips = val;
            break;
          case 'electric':
            item.menu.config.electric = val ? 350 : false;
            mainmenu.items["menu-item-electric"].disable(!val);
            break;
          case 'shadows':
            item.menu.config.shadows = val ? [4, 4] : null;
            mainmenu.items["menu-item-shadowSize"].disable(!val);
            return false;
            break;
          case 'blink':
            item.menu.config.blink = val ? 5 : false;
            break;
        }
        return !item.menu.config.electric;
      }
*/

     function featInstall(el) {
        var info = {};
        for (var i = el.firstChild; i; i = i.nextSibling) {
          if (i.nodeType != 1) continue;
          if (/\S/.test(i.className)) {
            info[i.className] = i;
          }
        }
        el = info.brief;
        el.innerHTML = el.innerHTML.replace("(unique)", "<span class='unique' title='To the best of our knowledge, this feature is unique to our menu.'>(unique)</span>");
        el.innerHTML = el.innerHTML.replace("?", "<span class='bullet'>?</span>");
        el.info = info;
        activeFeature = null;
        el.onmouseover = function() {
          if (activeFeature == this) return;
          if (activeFeature)
            activeFeature.className = "brief";
          activeFeature = this;
          this.className += " brief-active";
          document.getElementById('featdesc').innerHTML = '<div style="margin-left: 1px; padding: 0 1em;">' + this.info.details.innerHTML + '</div>';
        };
      }

      function patchFeatures() {
        var i = document.getElementById("first-feature");
        for (; i; i = i.nextSibling) {
          if (i.nodeType != 1) continue; // skip non-element nodes
          if (/feature/.test(i.className))
            featInstall(i);
        }
      }

      current_section = null;
      function showSection(id) {
        if (mainmenu) {
          mainmenu.items["menu-item-sec-" + id].disable();
          if (current_section)
            mainmenu.items["menu-item-sec-" + current_section].disable(false);
          if (current_section == 'setup') {
            other_menu.destroy();
          }
        }
        document.getElementById("frame-content").src = "docs/" + id + ".html";
        current_section = id;
      }

      function sectionLoaded(body) {
        var c = document.getElementById("div-content");
        c.innerHTML = body.innerHTML;
        PieNG(c);
        other_menu = document.getElementById("menu");
        if (other_menu)
          other_menu = DynarchMenu.setup(other_menu);
        window.scrollTo(0, 0);
        if (current_section == 'features')
          patchFeatures();
      }

      var browser_support = {
        "msie50"    :  "IE 5.0/Win: Excellent mouse support, good keyboard support, no PNG icons, no smooth shadows.",
        "msie55"    :  "IE 5.5/Win: Excellent mouse support, good keyboard support.",
        "msie60"    :  "IE 6.0/Win: Excellent mouse support, good keyboard support.",
        "mozilla"   :  "All Gecko-based browsers: Excellent support in every aspect.",
        "opera6x"   :  "Opera 6.x: Not tested, assumed to fail.",
        "opera7x"   :  "Opera 7.x: Excellent mouse support, poor keyboard support.",
        "konqueror" :  "Konqueror: full mouse support, no keyboard support.",
        "safari"    :  "Apple Safari: full mouse support, no keyboard support."
      };
      function showBrowser(id) {
        var txt = browser_support[id];
        if (typeof txt == "string") {
          alert(txt);
        }
      }
      
      function initPage() {
		mainmenu = DynarchMenu.setup('page-menu', { shadows: [0, 0, 0, 0], scrolling: true });		
      }
