		//--		 Sistran Consultores - 15.10.03
		//--		 prog. Dario Brozzi		


function ShowMsg(sMsg, iTypeOfMsg, bYes, bNo, bCancel, bAcept, sDefaultButtonValue){
		//--         sMsg: mensaje a mostrar
		//--         iTypeOfMsg  1:Error 2:Info 3:Alert 4:Question 5:Wait
		//--    	 bYes: agregar boton si
		//--    	 bNo: agregar boton de no
		//--    	 bCancel: agregar boton de cancelar
		//--		 bAcept: agregar boton de aceptar
		//--		 nota : igualmente si no se especifica ningún botón se elige un botón por defecto 
		//--				según el tipo de mensaje.
		//--		 sDefaultButtonValue: es el valor que llevará el botón por defecto.
			
	var oMsg = new Msg(sMsg, iTypeOfMsg, bYes, bNo, bCancel, bAcept, sDefaultButtonValue);
	
	var iWidth=350;
	var iHeight=0;
	var url="";
	var sFeatures="";
	var iMinHeight=150;
		
	//cantidad promedio de letras por renglon segun el estilo elegido
	var iChrsInLine=39;
	//pixels por renglon
	var iPixelsHeight=30;
	iChrs = oMsg.description.length;
	iHeight = ((parseInt(iChrs/iChrsInLine))*iPixelsHeight)+55;
	if (iHeight<iMinHeight) {
		iHeight = iMinHeight
	}

	url="..\\..\\_SisGeneral\\_Msg\\PopUpMsg.html";
	sFeatures = "help:0;resizable:1;dialogWidth:"+iWidth+"px;dialogHeight:"+iHeight+"px;status:no";
	var oWin = window.showModalDialog(url,oMsg,sFeatures);
	return oMsg.UserChoice;
}
function Msg(sMsg, iTypeOfMsg, bYes, bNo, bCancel, bAcept, sDefaultButtonValue){
	this.description = sMsg;
	this.type = iTypeOfMsg;

	this.Acept = bAcept;
	this.Yes = bYes;
	this.No = bNo;
	this.Cancel = bCancel;	
	this.DefaultButtonValue = sDefaultButtonValue;
	this.UserChoice = ""; //retorno de la elección del usuario : (Yes, No, Acept, Cancel)
}