// JavaScript Document
// è necessario che l ul della lista abbia un id="nav" e che nei css "li:hover" sia accomapgnato da "li.over"
// es. li:hover ul, li.over ul{ display: block; }
/*startList = function() {
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";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;*/

function SweetChildOMine(parent, func) {
  for (var i=0; i<parent.childNodes.length; i++) {
    var node = parent.childNodes[i];
    SweetChildOMine(node, func);
    func(node);
  }
}

var oldOnLoad = window.onload;
window.onload = function() {
 if (document.all && document.getElementById) {
    navRoot = document.getElementById("menutop");
    SweetChildOMine(navRoot, function(node) {
      if (node.nodeName=="LI") {
        node.onmouseover=function() {
          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    });
 }
 if (oldOnLoad) oldOnLoad();
}

