function abreVentanaCentrada(dirURL,ancho,alto, nombreVentana){

//Centra la ventana
 var posicionIzquierda = (screen.width) ? (screen.width-ancho)/2 : 0;
 var posicionArriba = (screen.height) ? (screen.height-alto)/2 : 0;
//Armo los atributos
 var atributos = 'height=' + alto + ',width=' + ancho + ',top=' + posicionArriba + ',left=' + posicionIzquierda + ', resizable=yes, toolbar=no,scrollbars=yes';
//Abro la ventana
  ventanaSitio = window.open(dirURL, nombreVentana, atributos);
 if(ventanaSitio!=null){
	 ventanaSitio.focus();
 }
 else{
  	alert("Su navegador no permite abrir ventanas emergentes.\n Es necesario que habilite esta opción para navegar adecuadamente esta página");
	 }
}


//DETECCION DE FLASH 6
//Funcion que checa si existe flash
var MM_contentVersion = 6;
var MM_FlashCanPlay;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
//	alert(MM_PluginVersion);
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	//document.write('MsgBox(MM_contentVersion)');
	document.write('</SCR' + 'IPT\> \n');
	
}
if ( MM_FlashCanPlay ) {

} else{
	window.location='noflash.htm';
}

//DETECCION DE RESOLUCION
if (self.screen) {     // for NN4 and IE4
        width = screen.width
        height = screen.height
// Testing this first prevents firing the slow Java of NN4
}
else if (self.java) {   // for NN3 with enabled Java
       var jkit = java.awt.Toolkit.getDefaultToolkit();
       var scrsize = jkit.getScreenSize();       
       width = scrsize.width; 
       height = scrsize.height; 
}
else{
 width = height = '?' // N2, E3, N3 w/Java off, probably Opera and WebTV

}
//or whatever based on the above results
if (width >= 1024 && height >= 768)
  {
//     window.location.href="default1024.htm";
  }

   
function esCorreoValido(nombreDeForma,nombreDeElemento)
{
var verificado  = true
var Temp     = document.forms[nombreDeForma].elements[nombreDeElemento]
var arroba    = Temp.value.indexOf('@')
var coma   = Temp.value.lastIndexOf('.')
var espacio    = Temp.value.indexOf(' ')
var largo   = Temp.value.largo - 1   // Array is from 0 to largo-1

if ((arroba < 1) ||                     // '@' no puede estar en la primera posicion
    (coma <= arroba+1) ||             // Debe de haber un caracter valido entre @ y .
    (coma == largo ) ||             // debe haber un caracter valido despues de .
    (espacio  != -1))                    // no se permiten espacios vacios
   {  
      verificado = false
      alert('El correo proporcionado no es válido.');
      Temp.focus()
   }
return verificado
}

