function menufix() { var sfels = document.getelementbyid("nav").getelementsbytagname("li"); for (var i=0; i0? " ": "") + "sfhover"; } sfels[i].onmousedown=function() { this.classname+=(this.classname.length>0? " ": "") + "sfhover"; } sfels[i].onmouseup=function() { this.classname+=(this.classname.length>0? " ": "") + "sfhover"; } sfels[i].onmouseout=function() { this.classname=this.classname.replace(new regexp("( ?|^)sfhover\\b"), ""); } } } function $(id){ return document.getelementbyid(id); } window.onload=function(){ menufix(); }