function traverseDocument(parent) { for (var i = 0; i < parent.childNodes.length; i ++) { node = parent.childNodes[i]; if (node.className == "dropdown") {parent.onmouseover=function() { this.className+=" over"; }; parent.onmouseout=function() {this.className=this.className.replace(" over", ""); }; } else traverseDocument(node); } }
if (document.all) window.onload = function() { traverseDocument(document.getElementById("menu")); };

