Hi,
I am trying to create this rollover bar menu with js and it works
fine until it has to disappear I wanted it to disappear after the
mouseout function and after a little delay but instead it disappears
right away. Here is the whole code, any suggestions will be helpful
<html>
<head>
<style type="text/css">
/*div.horbar { display:block; white-space:nowrap;
text-transform:capit alize; height: auto; margin: 0 0 0 0; }
ul.horbar_menu { display: block; background-color:#fff; color:#fff;
font-size:100%; margin: 0 0 0 0; padding:0 0 0 0;}
ul.horbar_menu li { display:inline; margin: 0 0 0 0; padding:0 0 0 0;
text-align:center; border-width: thin; border-style: hidden;}*/
/*ul.horbar_menu li a { text-decoration: blink; padding:0 0 0 0;}
ul.horbar_menu li.divlyn { margin:0 0 0 0; padding:0 0 0 0; border: 0
hidden; background-color:#000; color:#000;}*/
ul.horbar_subme nu { display: none; font-weight: normal; margin: 0;
padding:0 ; text-align:center; }
ul.horbar_subme nu li { display:inline; margin:0; padding:0;
text-align:center; border:0;}
ul.horbar_subme nu li a { text-decoration:unde rline; padding:0 1px 0
1px; text-align:center;}
ul.horbar_subme nu li.divlyn { margin:0; padding:0; border:0 solid;
background-color:#000; color:#000;}
/*#horbar_menu1, #horbar_menu1 li a { background-color:#fff;}
ul.horbar_menu li a:hover { background-color:#ee0 !important;
color:#300 !important;} - For changing the main menu */
#horbar_submenu 0 { background-color:#fff; color:#000;}
#horbar_submenu 1, #horbar_submenu 1 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#900;
color:#eff;}
#horbar_submenu 2, #horbar_submenu 2 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#090;
color:#fef;}
#horbar_submenu 3, #horbar_submenu 3 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#009;
color:#ffe;}
#horbar_submenu 4, #horbar_submenu 6 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#620;
color:#000;}
#horbar_submenu 5, #horbar_submenu 4 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#451;
color:#fff;}
#horbar_submenu 6, #horbar_submenu 7 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#985;
color:#fff;}
#horbar_submenu 7, #horbar_submenu 5 li a { font: Verdana, Arial,
Helvetica, sans-serif; font-size:11px; background-color:#359;
color:#fff;}
ul.horbar_subme nu li a:hover { background-color:#fff !important;
color:#21559c !important;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
</style>
<script type="text/javascript" xml:whitespace= "preserve">
var intLastSubMenu = new Number(7);
var elmSubMenu = new Object();
function subMenuShow(int Which) {
for (var i=0;i<=intLastS ubMenu;i++) {
elmSubMenu = document.getEle mentById('horba r_submenu'+i);
if ((typeof elmSubMenu != "undefined")&&( elmSubMenu!=nul l)) {
elmSubMenu.styl e["display"] = ((i==intWhich)? "block":"none") ;
}
}
return false;
}
function subMenuHide(int Which) {
for (var i=0;i<=intLastS ubMenu;i++)
{
elmSubMenu = document.getEle mentById('horba r_submenu'+i);
if ((typeof elmSubMenu != "undefined")&&( elmSubMenu!=nul l)) {
elmSubMenu.styl e["display"] = ((i==intWhich)? "none":"non e");
}
}
return false;
}
setTimeout("sub MenuHide()", 1000);
</script>
</head>
<body>
<table width="628" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="628"><di v class="horbar">
<!-- main menu -->
<a href="#" onMouseOver="su bMenuShow(1)">< img
src="images/aboutUS.jpg" width="73" height="28" border="0"></a><a
href="#" onMouseOver="su bMenuShow(2)">< img src="images/Calendar.jpg"
width="134" height="28" border="0"></a><a href="#"
onMouseOver="su bMenuShow(3)">< img src="images/resources.jpg"
width="76" height="28" border="0"></a><a href="#"
onMouseOver="su bMenuShow(4)">< img src="images/pedagogy.jpg" width="72"
height="28" border="0"></a><a href="#"
onMouseOver="su bMenuShow(5)">< img src="images/publications.jp g"
width="92" height="28" border="0"></a><a href="#"
onMouseOver="su bMenuShow(6)">< img src="images/discussion.jpg"
width="123" height="28" border="0"></a><a href="#"
onMouseOver="su bMenuShow(7)">< img src="images/search.jpg" width="58"
height="28" border="0"></a>
<!-- submenus -->
<div onMouseOut="sub MenuHide()">
<ul class="horbar_s ubmenu" id="horbar_subm enu1" >
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports</a> |
<a href="#" type="text/html" title="?">Locat ion Hours</a> |
<a href="#" type="text/html" title="?">Conta ct Us</a></li></ul>
<ul class="horbar_s ubmenu" id="horbar_subm enu2">
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports </a> |
<a href="#" type="text/html" title="?">Locat ion Hours </a>|
<a href="#" type="text/html" title="?">Conta ct Us</a></li></ul>
<ul class="horbar_s ubmenu" id="horbar_subm enu3">
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports</a> |
<a href="#" type="text/html" title="?">Locat ion Hours</a> |
<a href="#" type="text/html" title="?">Conta ct Us</a></li></ul>
<ul class="horbar_s ubmenu" id="horbar_subm enu4">
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports</a> |
<a href="#" type="text/html" title="?">Locat ion Hours</a> |
<a href="#" type="text/html" title="?">Conta ct Us</a></li></ul>
<ul class="horbar_s ubmenu" id="horbar_subm enu5">
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports</a> |
<a href="#" type="text/html" title="?">Locat ion Hours</a> |
<a href="#" type="text/html" title="?">Conta ct Us</a></li></ul>
<ul class="horbar_s ubmenu" id="horbar_subm enu6">
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports</a> |
<a href="#" type="text/html" title="?">Locat ion Hours</a> |
<a href="#" type="text/html" title="?">Conta ct Us</a></li></ul>
<ul class="horbar_s ubmenu" id="horbar_subm enu7">
<li><a href="#" type="text/html" title="?">Welco me Message</a> |
<a href="#" type="text/html" title="?">CETL Staff</a> |
<a href="#" type="text/html" title="?">CETL Board</a> |
<a href="#" type="text/html" title="?">Missi on Goals</a> |
<a href="#" type="text/html" title="?">Facul ty Associates</a> |
<a href="#" type="text/html" title="?">Annua l Reports</a> |
<a href="#" type="text/html" title="?">Locat ion Hours</a> |
<a href="#" type="text/html" title="?">Conta ct
Us</a></li></ul></div></div></td>
</tr>
</table>
</body></html>
Thx in advance.
Ricky