// JavaScript for menu drop-downs to work in IE 5 & 6.
//Added zIndex property to display drop-downs properly above main menu for IE 5 to 7.   

startList = function() {
   if (document.all&&document.getElementById) {  //Check if browser is IE 5 or higher, crude way to do it but simple.
      navRoot = document.getElementById("menu-items");  //Define root element for drop-down list.
      for (i=0; i<navRoot.childNodes.length; i++) {  //Traverse drop-down list.
         node = navRoot.childNodes[i];
         //Nodes that are list items will have onmouseover and onmouseout events
         //which add and remove the over class from the className property of the element.
         if (node.nodeName=="LI") { 
            node.onmouseover=function() {
               this.className+=" over";
               this.style.zIndex = 100;
            }
            node.onmouseout=function() {
               this.className=this.className.replace(" over", "");
               this.style.zIndex = 0;
            }
         }
      }
   }
}
window.onload=startList; //On page load function is invoked. 