$(document).ready(function(){


	$("#form_datos").submit( function() {
		//return $("input", this).val().length > 0;
		
		if ($("#Email").attr("value") == "") {
			alert ("\n Por favor introduzca una cuenta de correo.")
			document.forms['form_datos'].elements['Email'].focus();
			return false;
		}


		if ($("#Email").attr("value").indexOf('@',0) == -1 ||
			$("#Email").attr("value").indexOf('.',0) == -1) {
			alert ("\n Debe utilizar una cuenta de correo valida.")
			document.forms['form_datos'].elements['Email'].select();
			document.forms['form_datos'].elements['Email'].focus();
			return false;
		}
		if (document.getElementById("Acepto").checked==true) {
			return true;
		} else {
			alert("Debe aceptar la ley de proteccion de Datos\npara  enviar este formulario.");
			return false;
		}
	} );

		// ABRIR LINKS EXTERNOS EN VENTANA NUEVA
	$("a[@rel='external']").click(function(){this.target = "_blank";});

});



//Aumentar y reducir el tamaño del texto
var prefsLoaded = false;
var original= 8;
var incremento = 0;
var tamano = 0;
function aumentar () {
	if(tamano<20){
		incremento+=2;
		tamano = original + incremento;
		document.getElementById("datos").style.fontSize = tamano + "pt";
	}
}
function reducir () {
	if(tamano>6){
		incremento-=2;
		tamano = original + incremento;
		document.getElementById("datos").style.fontSize = tamano + "pt";
	}
}




function abrir( web, alto, ancho ) {
	if ( window.pantmsg ) { pantmsg.close(); }
	pantmsg = open(web, 'pantmsg',"top=" + (screen.height - alto) / 2 + ",left=" + (screen.width - ancho) / 2 + ",toolbar=no,width=" + ancho + ",height=" + alto + ",directories=no,status=no,scrollbars=no,resize=no,menubar=no");
	pantmsg.focus();
}
