


function check_FormEncuentraMediador(){

	var msg;
	var doc;

	doc = document.getElementById("nombre");
	if(doc.value.length == 0){
		alert("El nombre es obligatorio");
		doc.focus();
		return false;
	}
	doc = document.getElementById("email");
	if(doc.value.length > 0){
		var regEx = /^(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,4})$/;
		if(!regEx.test(doc.value)){
			alert("Error Email:");
			doc.focus();
			return false;
		}
	}
	doc = document.getElementById("codigo_postal");
	if(doc.value.length == 0){
		alert("El código postal es obligatorio");
		doc.focus();
		return false;
	}
	var regEx = /^[0-9]{5}$/;
	if(!regEx.test(doc.value)){
		alert("El código postal no tiene el formato correcto");
		doc.focus();
		return false;
	}
	doc = document.getElementById("consulta");
	if(doc.value.length == 0){
		alert("La consulta es obligatoria");
		doc.focus();
		return false;
	}
	return true;
}
