function validarEmail(valor) {
  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
   //alert("La dirección de email " + valor    + " es correcta.") 
   return (true)
  } else {
   //alert("La dirección de email es incorrecta.");
   return (false);
  }
 }
 
 function validarDatos(form, idioma){
			if (form.nombre.value =="" ){
				if (idioma == "E")
					alert("Debe ingresar su nombre.");				
				else 
					alert("You must insert your first name.");
				return false}
			if (form.apellido.value =="" ){
				if (idioma == "E")
					alert("Debe ingresar su apellido.");
				else
					alert("You must insert your last name.");
				return false}
			
			if ( !validarEmail(form.correo.value )){
				if (idioma == "E")
					alert("Debe ingresar una dirección de email valida.");
				else
					alert("You must insert valid e-mail.");
				return false}
				if (form.consulta.value =="" ){
			if (idioma == "E")
				alert("Debe ingresar la consulta que desea realizar.");
			else
				alert("You must insert your question.");
			return false}
		    form.submit();
			}