sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i0? " ": "") + "headHover"; } sfEls[i].onmouseout=function() { //this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), ""); this.className=""; } } if (sfEls[i].className == 'headSelected') { //alert('ici2'); sfEls[i].onmouseover=function() { this.className+=(this.className.length>0? " ": "") + "headHover"; } sfEls[i].onmouseout=function() { //this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), ""); this.className="headSelected"; } } } } if(window.attachEvent) { // win/ie window.attachEvent('onload', sfHover); } else { // mac/ie5 if(typeof window.onload == 'function') { var existing = onload; window.onload = function() { existing(); sfHover(); } } else { window.onload = function() { sfHover(); } } }