
function abrir_vent_antes(foto)
{
	ventana=window.open('','hola','menubar=no,resizable=no,scrollbars=no,width=20,height=20')	
	ventana.document.write('<html><head><title>' + foto.replace('.jpg','') + '</title></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no"><img align="center" src="../../img/antes_img/' + foto + '" onLoad="opener.redimensionar(this.width, this.height)">');
	ventana.document.close();
}

function abrir_vent_durante(foto)
{
	ventana=window.open('','hola','menubar=no,resizable=no,scrollbars=no,width=20,height=20')	
	ventana.document.write('<html><head><title>' + foto.replace('.jpg','') + '</title></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no"><img align="center" src="../../img/durante_img/' + foto + '" onLoad="opener.redimensionar(this.width, this.height)">');
	ventana.document.close();
}

function abrir_vent_despues(foto)
{
	ventana=window.open('','hola','menubar=no,resizable=no,scrollbars=no,width=20,height=20')	
	ventana.document.write('<html><head><title>' + foto.replace('.jpg','') + '</title></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no"><img align="center" src="../../img/despues_img/' + foto + '" onLoad="opener.redimensionar(this.width, this.height)">');
	ventana.document.close();
}


function redimensionar(ancho, alto)
{
	ventana.resizeTo(ancho+10,alto+28);
	ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2); 
}

function abrirAviso(){
	
	document.getElementById('aviso').style.visibility="visible";							
		
}

function cerrarAviso(){

	document.getElementById('aviso').style.visibility="hidden";

}

function iluminaMenu(nombre){	
	var obj = document.getElementById('raya_'+nombre);
	obj.style.borderLeft="1px solid #FD0718";
	obj.style.borderBottom="1px solid #FD0718";
	obj = document.getElementById(nombre);
	obj.style.color="#FD0718";
}

function apagaMenu(nombre){
	var obj = document.getElementById('raya_'+nombre);
	obj.style.borderLeft="1px solid #8DC34C";
	obj.style.borderBottom="1px solid #8DC34C";
	obj = document.getElementById(nombre);
	obj.style.color="#8DC34C";
}

function abre(pagina){
	document.location.href = pagina;
}

/**=========================================================================*/
/** 						fncCheckEmail								*/
/**=========================================================================*/

function fncCheckEmail(checkThisEmail){
	var myEMailIsValid = true;
	var myAtSymbolAt = checkThisEmail.indexOf('@');
	var myLastDotAt = checkThisEmail.lastIndexOf('.');
	var mySpaceAt = checkThisEmail.indexOf(' ');
	var myLength = checkThisEmail.length;
	
	
	// at least one @ must be present and not before position 2
	// @yellow.com : NOT valid
	// x@yellow.com : VALID
	
	if (myAtSymbolAt < 1 ) myEMailIsValid = false;
	
	
	// at least one . (dot) afer the @ is required
	// x@yellow : NOT valid
	// x.y@yellow : NOT valid
	// x@yellow.org : VALID
	
	if (myLastDotAt < myAtSymbolAt) myEMailIsValid = false;
	
	// at least two characters [com, uk, fr, ...] must occur after the last . (dot)
	// x.y@yellow. : NOT valid
	// x.y@yellow.a : NOT valid
	// x.y@yellow.ca : VALID
	
	if (myLength - myLastDotAt <= 2) myEMailIsValid = false;
	
	
	// no empty space " " is permitted (one may trim the email)
	// x.y@yell ow.com : NOT valid
	
	if (mySpaceAt != -1) myEMailIsValid = false;
	
	return myEMailIsValid;
}
/**=========================================================================*/
/** 						isVacio											*/
/**=========================================================================*/

// funcion que chequea si el String s está vacio
function isVacio (s){
	return ((s == null) || (s.length == 0));
}