function ValidarCorreo(f){
	if(f.nombre.value==""){	
		alert("Debe rellenar el campo Nombre");
		return false;
	}
	
	if (f.email.value!=""){
		var str=f.email.value;
		var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (filter.test(str))
			return true;
		else{
			alert("El e-mail no es correcto!");
			return false;
			}
	} else {
		alert("Debe rellenar el campo E-mail");
		return false;
	}

	if(f.consulta.value==""){	
		alert("Debe rellenar el campo Consulta");
		return false;
	}


	var aux=f.cod_uno.value.toUpperCase();
	if(aux==f.cod_dos.value && f.cod_uno.value!="" && f.cod_dos.value!=""){
		if(!f.proteccion.checked){
			alert("Debes leer y aceptar las condiciones de la Ley de Protección de Datos");
			return false;
		}
		return true;
	}else{
		alert("Rellene el codigo de la imagen");
		return false;
	}
	

return true;
}

function ValidarCorreoIng(f){
	if(f.nombre.value==""){	
		alert("You must fill in the name field");
		return false;
	}
	
	if (f.email.value!=""){
		var str=f.email.value;
		var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (filter.test(str))
			return true;
		else{
			alert("The e-mail is not correct!");
			return false;
			}
	} else {
		alert("You must fill in the field E-mail");
		return false;
	}

	if(f.consulta.value==""){	
		alert("You must fill in the field Suggestion");
		return false;
	}


	var aux=f.cod_uno.value.toUpperCase();
	if(aux==f.cod_dos.value && f.cod_uno.value!="" && f.cod_dos.value!=""){
		if(!f.proteccion.checked){
			alert("You must read and accept the terms of the Data Protection Act");
			return false;
		}
		return true;
	}else{
		alert("Fill out the code of the image");
		return false;
	}
	

return true;
}

function MostrarFilas(Fila) { 
var elementos = document.getElementsByName(Fila); 
    for (i = 0; i< elementos.length; i++) { 
        if(navigator.appName.indexOf("Microsoft") > -1){ 
               var visible = 'block' 
        } else { 
               var visible = 'table-row'; 
        } 
elementos[i].style.display = visible; 
        } 
} 
  
function OcultarFilas(Fila) { 
    var elementos = document.getElementsByName(Fila); 
    for (k = 0; k< elementos.length; k++) { 
         elementos[k].style.display = "none"; 
    } 
} 