I have two divs, one is the triggering and the other is the hidden one. Hovering the first div will show the hidden div. To hide the div the user must "mouseout" from this div, however if the user "mouseout" from the first div nothing will happend and that is the problem because if there are another group next to them, and the user pass from one triggering div to the next this will show the two hidden divs stacking over one another.

This is for a horizontal menu (something like www.oracle.com).

The actual code is this:

Code:
<div id="option_a"><p>FIRST OPTION</p>
    <div id="option_a_menu">
         **HERE ARE LIST, DIVS, IMGS**
    </div>
</div>
<div id="option_b"><p>SECOND OPTION</p>
    <div id="option_b_menu">
         **HERE ARE LIST, DIVS, IMGS**
    </div>
</div>
The JS:

Code:
function init() {
   oOptionA=document.getElementById("option_a");
   oOptionAmenu=document.getElementById("option_a_menu");
   oOptionB=document.getElementById("option_b");
   oOptionBmenu=document.getElementById("option_b_menu");
   //behaviors
   addEvent(oOptionA,'mouseover',goOptionA);
   addEvent(oOptionAmenu,'mouseout',outOptionAmenu);
   addEvent(oOptionB,'mouseover',goOptionB);
   addEvent(oOptionBmenu,'mouseout',outOptionBmenu);
}

function goOptionA() {
   oOptionAmenu.style.visibility="visible";
}
function outOptionAmenu() {
   oOptionAmenu.style.visibility="hidden";
}
function goOptionB() {
   oOptionBmenu.style.visibility="visible";
}
function outOptionBmenu() {
   oOptionBmenu.style.visibility="hidden";
}
The user will hide the option A menu only when his mouse clears the div that showed up. However is he hover the triggering div and go just to the next triggering div (The second div) will trigger the visibility of their menu, but the previously menu will still on stage, stacking the two menus.

I was trying this to solve the problem:

Code:
...addEvent(oOptionA,'mouseout',goOptionA);

function goOptionA() {
   if (oOptionAmenu!=hover) {
     oOptionAmenu.style.visibility="hidden";
  } else {
    oOptionAmenu.style.visibility="visible";
}
}
However, this is not working, something is wrong with the "oOptionAmenu!=hover" but how can I do this ?

Thanks in advanced