// Fix for IE not working with li:hover
//
// Find all the <li> elements in portal-nav and
// set their onmouseover and onmouseout to functions
// that add the 'over' class to the element.

startList = function() {
  if (document.getElementById) {
    navRoot = document.getElementById("portal-nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node_i = navRoot.childNodes[i];
      if (node_i.nodeName=="LI") {
        node_i.onmouseover=function() {
          this.className+=" over";
        }
        node_i.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
        for (j=0; j<node_i.childNodes.length; j++) {
          node_j = node_i.childNodes[j];
          if (node_j.nodeName=="UL") {
            for (k=0; k<node_j.childNodes.length; k++) {
              node_k = node_j.childNodes[k];
              if (node_k.nodeName=="LI") {
                node_k.onmouseover=function() {
                  this.className+=" over";
                }
                node_k.onmouseout=function() {
                  this.className=this.className.replace(" over", "");
                }
              }
            }
          }
        }
      }
    }
  }
}
window.onload=startList;

