windowLoaded = function() {

/* The following workaround is to fix the fact that Internet
   Explorer 6 or below does not support the CSS :hover pseudo
   class. It cycles through all the list items which are a direct
   child of the 'nav' ul, and adds onmouseover and onmouseout
   events to change the css class, and make the menus work. */

 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";
    }//end function

    node.onmouseout = function() {
     this.className = this.className.replace(" over", "");
    }//end function
   }//end if
  }//end for
 }//end if

}//end windowLoaded function

//when the window has loaded... run the script
window.onload = windowLoaded;
