function AbrirVentanaCentrada(Titulo, MensajeError, PathImages, PathEstilos, saludo)
{
	var browserName = navigator.appName;
	var browserVer = parseInt(navigator.appVersion);
	
	if (browserName == "Netscape" && browserVer >= 3) version = "n3";
    else if (browserName == "Netscape" && browserVer <= 2) version = "n2";
    else if (browserName == "Microsoft Internet Explorer" && browserVer > 3) version = "e4";
    else if (browserName == "Microsoft Internet Explorer" && browserVer <= 3) version = "e3";
    else version = "other";
		
	if (version == "e4") {var xMax = screen.width, yMax = screen.height;} 
	if (version == "n4") {var xMax = screen.availWidth, yMax = screen.availHeight;}
	if ((version == "e3")||(version == "n3") ||(version == "n2")||(version == "other")){xMax = 640, yMax=480;}

	var xOffset = (xMax - 366)/2, yOffset = (yMax - 240)/2;
 	msgWindow =window.open("","displayWindow",'width=367,height=230,directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=no,left='+xOffset+',top='+yOffset+',screenX='+xOffset+',screenY='+yOffset);

	posicion_vector="";
	posicion_vector = MensajeError.split("*");

	msgWindow.document.writeln ("<HTML>");
	msgWindow.document.writeln ("<HEAD>");
	msgWindow.document.writeln ("<TITLE>Datos Incorrectos o Incompletos</TITLE>");
	msgWindow.document.writeln ("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
	msgWindow.document.writeln ("<link rel=stylesheet href="+PathEstilos+"style.css type=text/css>");
	msgWindow.document.writeln ("</HEAD>");
	msgWindow.document.writeln ("<BODY BGCOLOR=#FFFFFF leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
	msgWindow.document.writeln ("<TABLE WIDTH=300 BORDER=0 CELLPADDING=0 CELLSPACING=0 height=70>");
	msgWindow.document.writeln ("<TR bgcolor=#DDDE9E>");
	msgWindow.document.writeln("<TD align=center colspan=3 height=40><span class=textogrisosc><strong>La Planilla no pudo ser enviada.</span></strong>&nbsp;</td>");
	msgWindow.document.writeln ("</TR>");
	msgWindow.document.writeln ("<td colspan=3 height=4><img src="+PathImages+"trans.gif width=330 height=10></td>");
	msgWindow.document.writeln ("</tr>");
	msgWindow.document.writeln ("<TR>");
	msgWindow.document.writeln ("<TD>");
	msgWindow.document.writeln ("<table width='350' border='0' cellspacing='0' cellpadding='0'>");
	msgWindow.document.writeln ("<tr>"); 
	msgWindow.document.writeln ("<td width=10>&nbsp;</td>");
	msgWindow.document.writeln ("<td width=10>&nbsp;</td>");
	msgWindow.document.writeln ("<td width=330 class=textogrisosc_p>"+saludo+"</td>");
	msgWindow.document.writeln ("</tr>");
	for (contenido=0;contenido <= posicion_vector.length - 2;contenido++){ 
    	MensajeDeError = posicion_vector[contenido];
	    msgWindow.document.writeln ("<tr>"); 
	    msgWindow.document.writeln ("<td width=10>&nbsp;</td>");
    	msgWindow.document.writeln ("<td valign=top width=10><img src="+PathImages+"trans.gif></td>");
	    msgWindow.document.writeln ("<td width=330 class=textogrisosc_p>- "+MensajeDeError +"</td>");
    	msgWindow.document.writeln ("</tr>");
	}
		msgWindow.document.writeln ("<tr>");
	msgWindow.document.writeln ("<td width=10 height=4'>&nbsp;</td>");
	msgWindow.document.writeln ("<td width=10 height=4>&nbsp;</td>");
	msgWindow.document.writeln ("<td width=330 height=4><img src="+PathImages+"trans.gif width=330 height=10></td>");
	msgWindow.document.writeln ("</tr>");
	msgWindow.document.writeln ("</table>");
	msgWindow.document.writeln ("</TD>");
	msgWindow.document.writeln ("</TR>");
	msgWindow.document.writeln ("<TR>");
	msgWindow.document.writeln ("<TD align=center class=textoocre>");
	msgWindow.document.writeln("<a href='#' class='tam1' onClick=\"javascript:self.close();\">Cerrar Ventana</a></td>");
	msgWindow.document.writeln ("</TR>");
	msgWindow.document.writeln ("</TABLE>");
	msgWindow.document.writeln ("</BODY>");
	msgWindow.document.writeln ("</HTML>");
}
function direccionamiento(dir)
{
   top.document.location.href=dir;
  }

