I am using the below code for drop down menus. It works perfectly The only problem I have is when someone comes to our page initially or they refresh the page, it takes a few seconds..sometimes 2 seconds..sometimes 10 seconds for the mouseover to work. Does anyone know where that setting is????
<!--//--><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById('MainLevel').getElementsByTagName('LI');
for (var i=0; i<sfEls.length; i++) {
sfEls.onmouseover=function() {
this.className+=' sfhover';
}
sfEls.onmouseout=function() {
this.className=this.className.replace(new RegExp(' sfhover\\b'), '');
}
}
}
if (window.attachEvent) window.attachEvent('onload', sfHover);
//--><!]]></script>
<!--//--><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById('MainLevel').getElementsByTagName('LI');
for (var i=0; i<sfEls.length; i++) {
sfEls.onmouseover=function() {
this.className+=' sfhover';
}
sfEls.onmouseout=function() {
this.className=this.className.replace(new RegExp(' sfhover\\b'), '');
}
}
}
if (window.attachEvent) window.attachEvent('onload', sfHover);
//--><!]]></script>