Menu desplegable en java script

MrB
18 de Abril del 2005
Buenas, como veran soy nuevo en esto,tengo yn problema y se los paso a comentar:
Tengo un menu desplegable,cada desplegable es una capa, cuando paso de opción en opción las capas se van cambiando, hasta ahi va todo bien pero cuando me alejo mouseout, queda la última capa de la u´tima opción y no se borra, lo que pensaba era agregar setTimeout, o algo asi, bueno, esa es mi duda.
El Código es el siguiente, desde ya muchas gracias:
</SCRIPT>

<STYLE TYPE="text/css">
<!--

.Menu {
position:absolute;
width:280px;
visibility:hidden;
background-color:#DFE3F2;
left: 32px;
top: 392px;
// Para Explorer 4+, Netscape 6
layer-background-color:#DFE3F2; // Para Netscape 4
color:navy;
border:1px solid black;
padding:5px;
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:10pt;
}

.Menu A:hover{text-decoration:underline;font-weight:bold;color;navy}
.Menu A {text-decoration:none;color:navy}

//-->
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
<!--

/* Objeto TNavegador */

function TNavegador() {
this.NS4 = document.layers;
this.NS6 = document.getElementById;
this.IE4 = document.all;

this.DHTML = this.NS4 || this.NS6 || this.IE4;
}

var Navegador = new TNavegador();

var Menu = new Array();
var MenuActivo = null; // Inicialmente no hay menús activos

/* Métodos de TMenu */
/* TMenu.Activar */

function ActivarTMenu() {
if (Navegador.DHTML && MenuActivo != this) {
if (MenuActivo) MenuActivo.Ocultar(); // Podría ser null, de ahí la comparación

MenuActivo = this;
this.Mostrar();
}
}

/* TMenu.Mostrar */

function MostrarTMenu() {
eval(this.sRefCapa + this.sRefEstilo + '.visibility = "visible"');
}

/* TMenu.OcultarTMenu */

function OcultarTMenu() {
eval(this.sRefCapa + this.sRefEstilo + '.visibility = "hidden"');
Ocultar=setTimeout("hiden()",1000)
}

/* TMenu.MoverA */

function MoverTMenuA(x, y) {
if (Navegador.DHTML) {
eval(this.sRefCapa + this.sRefEstilo + this.sRefTop + ' = y');
eval(this.sRefCapa + this.sRefEstilo + this.sRefLeft + ' = x');
}
}

/* Objeto TMenu */

function TMenu(IdCapa, PosX, PosY) {
this.Activar = ActivarTMenu;
this.Mostrar = MostrarTMenu;
this.Ocultar = OcultarTMenu;

this.MoverA = MoverTMenuA;

this.sRefCapa = Navegador.NS4 ? 'document["' + IdCapa + '"]' :
'document.all["' + IdCapa + '"]';
this.sRefEstilo = Navegador.NS4 ? '' : '.style';
this.sRefLeft = Navegador.NS4 ? '.left' : '.pixelLeft';
this.sRefTop = Navegador.NS4 ? '.top' : '.pixelTop';

this.MoverA(PosX, PosY);
}


function OcultarTMenuActivo(e) {
if (MenuActivo) {
MenuActivo.Ocultar();
MenuActivo = null;
}
}


function InicializarTMenus() {
if (Navegador.DHTML) {
if (Navegador.NS4)
document.captureEvents(Event.MOUSEUP);
document.onmouseup = OcultarTMenuActivo;
}

Menu[0] = new TMenu("Menu0", 200, 30);
Menu[1] = new TMenu("Menu1", 150, 30);
}

window.onload = InicializarTMenus;

//-->
</SCRIPT>