function dmenu(className, hiddenClass) {

   var all, lis, i, j;
   
   if (document.all) all = document.all; // IE
   else all = document.getElementsByTagName("*"); // Mozilla et al
   
   // find all ordered / unordered list elements of class className
   for (i in all) if (all[i].className == className && (all[i].tagName == "OL" || all[i].tagName == "UL")) {
      
      // find all list items that are descendants of the current list
      lis = all[i].getElementsByTagName("li");
      
      for (j in lis) {
         
         lis[j].onmouseover = function () {
            var i;
            for (i in this.childNodes) if (this.childNodes[i].tagName == "OL" || this.childNodes[i].tagName == "UL") this.childNodes[i].style.display = "block";
         }
         
         lis[j].onmouseout = function () {
            var i;
            for (i in this.childNodes) if (this.childNodes[i].tagName == "OL" || this.childNodes[i].tagName == "UL") this.childNodes[i].style.display = "none";
         }
      }
   }
}



function window_onload(thisFunction) {
   
   var thatFunction = window.onload;
   
   window.onload = function() {
      if (thatFunction) thatFunction();
      thisFunction();
   }
}



function initDmenu() {
   dmenu("menu");
}



window_onload(initDmenu);