// JavaScript Document
function comprobarForm() {
	if (document.getElementById('acepto').checked == false){
		alert("Debe Aceptar las condiciones.");
		document.getElementById('acepto').focus();
		return false;
	}
	
	if(document.getElementById('nombre')){
		if(document.getElementById('nombre').value==""){
			alert("El campo Nombre no puede ser vacío");
			document.getElementById('nombre').focus();
			return false;
		}
	}else{
		alert("Error, no existe el campo Nombre en el formulario.");
		return false;
	}
	
	if(document.getElementById('apellidos')){
		if(document.getElementById('apellidos').value==""){
			alert("El campo Apellidos no puede ser vacío");
			document.getElementById('apellidos').focus();
			return false;
		}
	}else{
		alert("Error, no existe el campo Apellidos en el formulario.");
		return false;
	}
	
	if(document.getElementById('email')){
		if(document.getElementById('email').value==""){
			alert("El campo E-Mail no puede ser vacío");
			document.getElementById('email').focus();
			return false;
		}
	}else{
		alert("Error, no existe el campo E-Mail en el formulario.");
		return false;
	}
	
	if(document.getElementById('observaciones')){
		if(document.getElementById('observaciones').value==""){
			alert("El campo consulta no puede ser vacío");
			document.getElementById('observaciones').focus();
			return false;
		}
	}else{
		alert("Error, no existe el campo Observaciones en el formulario.");
		return false;
	}
	
	
	 if (document.getElementById("tmptxt").value == ""){
			
			alert("Debe rellenar los mismos caracteres que se ven en la imagen.");
			return false;
		}
	

	
	document.form_contacto.submit();
}