I have created a menu using suckerfish dropdowns. i need a delay for mouseover. After 1 sec the dropdown is appear when mouseover the menu. The problem is, we used javascript for ie only. for firefox and other browser, the css code is working...

The menu html is a templated system, so i cannot add any onmouseover, onmouseout attribute in the html tag. The mouseover can add only in the javascript itself.

Here is the code

i need delay for the dropdown menus and it should work in firefox, ie6 & 7 and safari....


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>

<head>
<title>Suckerfish Dropdowns - One Level Bones</title>

<style type="text/css">

body {
font-family: arial, helvetica, serif;
}

#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
line-height: 1;
}

#nav a {
display: block;
width: 10em;
}

#nav li { /* all list items */
float: left;
width: 10em; /* width needed or else Opera goes nuts */
}

#nav li ul { /* second-level lists */
position: absolute;
background: orange;
width: 10em;
left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
}

#nav li:hover ul, #nav li.sfhover ul { /* lists nested under hovered list items */
left: auto;
}

#content {
clear: left;
color: #ccc;
}

</style>

<script type="text/javascript"><!--//--><![CDATA[//><!--

sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]></script>


</head>

<body>

<h1>Here is the menu</h1>

<ul id="nav">

<li id="one"><a href="#">Home</a>
<ul id="section-one">
<li><a href="#">Yahoo</a></li>
<li><a href="#">Google</a></li>
<li><a href="#">Rediff</a></li>
<li><a href="#">CNN</a></li>
</ul>
</li>

<li id="two"><a href="#">About</a>
<ul id="section-two">
<li><a href="#">Yahoo</a></li>
<li><a href="#">Google</a></li>
<li><a href="#">Rediff</a></li>
<li><a href="#">CNN</a></li>
</ul>
</li>

<li id="three"><a href="#">Profile</a>
<ul id="section-three">
<li><a href="#">Yahoo</a></li>
<li><a href="#">Google</a></li>
<li><a href="#">Rediff</a></li>
<li><a href="#">CNN</a></li>
<li><a href="#">Yahoo</a></li>
<li><a href="#">Google</a></li>
<li><a href="#">Rediff</a></li>
<li><a href="#">CNN</a></li>

</ul>
</li>

</ul>

<div id="content">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse egestas ultricies pede. Phasellus suscipit blandit risus. Praesent nonummy. In erat. Duis nibh pede, accumsan eu, pulvinar et, volutpat vel, elit. Curabitur nec dui sed nunc congue tempus. Nulla ac dui ac libero fringilla nonummy. Maecenas ullamcorper sodales risus. Vivamus pretium dolor. Proin eu turpis. Phasellus ut mauris non nulla mattis luctus. Nunc porttitor dapibus sapien. In malesuada fermentum metus. Nulla egestas, tellus a vestibulum pharetra, nunc purus auctor lacus, ut semper purus ipsum eu velit. Praesent dui. Nulla accumsan turpis at erat.</p>
</div>

</body>

</html>