var lsi;
var l_p_lyr;
ST = setTimeout('hide_submenu()', 100);
clearTimeout(ST);
var lmi;

function si_rovr(pL, wC, wBG){
         clearTimeout(ST);
	 if(pL){
		if (ie){document.all[wC].bgColor = Menu.SI_ROVR_BGCOLOR;}
		if (ns && !ns6){document.layers[pL].document.layers[wC].bgColor = Menu.SI_ROVR_BGCOLOR;}
	        if (ns6) document.getElementById(wC).style.backgroundColor = Menu.SI_ROVR_BGCOLOR;
		last_bgcolor = wBG;
		lsi = wC;
		l_p_lyr = pL;
	 }
}

function si_rout(){
	 ST = setTimeout('hide_submenu()', 500);
	 if (l_p_lyr){
		if (ie){document.all[lsi].bgColor = last_bgcolor;}
		if (ns && !ns6){document.layers[l_p_lyr].document.layers[lsi].bgColor = last_bgcolor;}
	        if (ns6) document.getElementById(lsi).style.backgroundColor = last_bgcolor;
	 }
}

function mi_rovr(wM, wS, sLs){
         if (ns6) document.getElementById(wM).style.backgroundColor = Menu.MI_ROVR_BGCOLOR; 
	 else eval('doc.' + wM + '.bgColor = Menu.MI_ROVR_BGCOLOR');

	 if (wS){
	     show_submenu(wS, sLs);
	 }
        
	 if (lmi && lmi != wM){
	     mi_roff();
	 }
	 lmi = wM;
	 if (typeof(hideform_menus) != "undefined") {
	     eval("for (var m=0; m < hideform_menus.length; m++) { if (wM == hideform_menus.substr(m,1)) {if (ns && !ns6) document.layers['hideform'].visibility = 'hidden'; if (ns6) document.getElementById('hideform').style.visibility='hidden'; if (ie) document.all['hideform'].style.visibility = 'hidden';}}");
	 }
}

function mi_rout(){
	ST = setTimeout('hide_submenu()', 500);
}

function mi_roff(){
         if (ns6) document.getElementById(lmi).style.backgroundColor = Menu.MI_BGCOLOR[0]; 
	 else eval('doc.' + lmi + '.bgColor = Menu.MI_BGCOLOR[0]');
	 if (typeof(hideform_menus) != "undefined") {
             if (ns && !ns6) document.layers['hideform'].visibility = 'visible';
             if (ns6) document.getElementById('hideform').style.visibility="visible";
             if (ie) document.all['hideform'].style.visibility = 'visible';
	 }
}

var l_sm_sh;

function show_submenu(wS, sLs){
	 if (l_sm_sh && l_sm_sh != wS) {
	     hide_submenu();
	 }
	 clearTimeout(ST);
         if (ns6) document.getElementById(wS).style.left = sLs; 
         else eval('doc.' + wS + style + '.left = sLs');
	 l_sm_sh = wS;
}

function hide_submenu(){
	if (l_sm_sh){
            if (ns6) document.getElementById(l_sm_sh).style.left = -596; 
            else eval('doc.' + l_sm_sh + style + '.left = -596');
	    mi_roff();
	}
}
