           
function objmsgOpen(mainMenu,postop,ancho){
	with (this) {
		fin=0;
		domStyle = document.getElementById(mainMenu).style;
        if (showMain){
			fX = ancho; cX = postop+ancho; cTop=postop; showMain = 0;
			
		}else{
			fX = 3; cX = postop; cTop=postop+ancho; showMain = 1;
			domStyle.visibility="visible";
			vTop=postop-ancho;
			domStyle.top=vTop;
			domStyle.visibility="visible";
			if (opcmicuenta) {
		 		micuentatd.bgColor="#efefef";
		 		micuentatd2.bgColor="#efefef";
	 			micuentatd3.bgColor="#efefef";
	 			micuentatd.filter="alpha( style=0,opacity=92, enabled=1)";
		 		micuentatd2.filter="alpha( style=0,opacity=92, enabled=1)";
		 		micuentalink.className="micuentaGris";
	 			micuentasepara.className="MenuSepOff";
	 			indicador.src="/SitioWeb/images/spacer.gif";
	 		}	
		}
		slideMenuMsg(cX,fX);
		
	}	
}

function objmsgClose(postop,ancho){
	with (this) {
		fin=0;
		if (showMain){
			fX = ancho; cX = postop+ancho; cTop=postop; showMain = 0;
			slideMenuMsg(cX,fX);
		}
	}
}


function objslideMenuMsg(cX,fX){
	with (this) {
		if ((cX!=cTop) && (showMain)) {
			cX+=3;
			fX+=3;
			vTop+=3;
			domStyle.top=vTop;
		} else	
			if ((fX>3) && (!showMain)) {
				cX-=3;
				fX-=3;
				vTop-=3;
				domStyle.top=vTop;
			} else
				fin=1;
		if (fin)		
		 	if (showMain){
		 			//*** Al terminar de mostrar la ventana de logon
		 			//*** ubica el cursor en el primer campo de input
		 			try {
						document.all("txLogin").focus();
					}catch (e){};	
	 		}
		 	else {
		 		domStyle.visibility="hidden";
		 		
		 		if (opcmicuenta) {
			 		micuentatd.bgColor="#003399";
			 		micuentatd2.bgColor="#003399";	
			 		micuentatd3.bgColor="#003399"; 		
		 			micuentatd.filter="alpha( style=0, enabled=0)";
		 			micuentatd2.filter="alpha( style=0,enabled=0)";
			 		micuentalink.className="micuentaAzul";
			 		micuentasepara.className="MenuOpc";
			 		indicador.src="/SitioWeb/images/plantillas/triangulolateral.gif";
			 		
			 	}	
	 		}	
	 	else {
	        setTimeout(prefijo + '.slideMenuMsg(' + cX + ',' + fX + ')', slideDelay);  
	    }    
	}    
    return;
}

function VentanaLogon(nombre, tmicuenta){

	this.opcmicuenta=tmicuenta;
	this.prefijo=nombre;
	this.showMain = 0;
	this.slideDelay = 0;
	this.domStyle = null;
	this.fin=0;
	this.vTop=0;
	
	this.msgOpen=objmsgOpen;
	this.msgClose=objmsgClose;
	this.slideMenuMsg=objslideMenuMsg;
}
