startList = function() {
    navRoot = document.getElementById("top_menu");
    lis = navRoot.getElementsByTagName("LI");
    for (i=0; i<lis.length; i++) {
        node = lis[i];
        node.onmouseover=function() {
            this.className+=" over";
        }
        node.onmouseout=function() {
            this.className=this.className.replace(" over ", "");
            if( this.className.substring( this.className.length - 5, this.className.length ) == " over" ) {
                this.className = this.className.substring( 0, this.className.length - 5 );
            }
            if( this.className.substring( 0, 5 ) == " over" ) {
                this.className = this.className.substring( 5, this.className.length );
            }
            if( this.className == "over" ) {
                this.className = "";
            }
        }    
    }
}
window.onload=startList;
