startList = function() {
    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";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
        for (j=0; j<node.childNodes.length; j++) {
          subnode = node.childNodes[j];
          if (subnode.nodeName=="A") {
            subnode.onfocus=function() {
              this.parentNode.className+=" over";
            }
            subnode.onblur=function() {
              this.parentNode.className=this.parentNode.className.replace(" over", "");
            }
          }
          if (subnode.nodeName=="UL") {
            for (k=0; k<subnode.childNodes.length; k++) {
              sub2node = subnode.childNodes[k];
              if (sub2node.nodeName=="LI") {
                for (l=0; l<sub2node.childNodes.length; l++) {
                  sub3node = sub2node.childNodes[l];
                  if (sub3node.nodeName=="A") {
                    sub3node.onfocus=function() {
                      this.parentNode.parentNode.parentNode.className+=" over";
                    }
                    sub3node.onblur=function() {
                      this.parentNode.parentNode.parentNode.className=this.parentNode.parentNode.parentNode.className.replace(" over", "");
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
}
window.onload=startList;