﻿function validar() {
	var f = document.formulario
	var re=/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var valor=document.getElementsByName('email')[0].value;

	if (document.getElementsByName('nombre')[0].value =="") {
		alert("Debes introducir un nombre para poder dirigirnos a ti.")
		return false
	}else if(!re.exec(valor)){
		alert("Debes introducir un formato válido de email.")
		return false
	}else if (f.checkbox.checked == false) {
		alert("Para acceder a nuestros servicios debes leer y aceptar la Política de Privacidad.")
		return false
	}
	
	return true
}

function validar_llamame() {
	var f = document.formulariollamame

	if (f.checkbox.checked == false) {
		alert("Para acceder a nuestros servicios debes leer y aceptar la Política de Privacidad.")
		return false
	}

	return true
}
