function validaEmail(checkStr)
{var nI, sS, nN, nP;
 // Arroba ...
 sS = "@"; nN = 0; nP = 0;
 for(nI = 0; nI <checkStr.length; nI++)
 { if(checkStr.charAt(nI) == sS) 
 { nN++; nP = nI; }
 }
 if(nN == 0) return (false);
 if(nN> 1) return (false);
 var nPArroba = nP;
 // Punto ...
 sS = "."; nN = 0; nP = 0;
 for(nI = 0; nI <checkStr.length; nI++)
 { if(checkStr.charAt(nI) == sS) 
 { nN++; nP = nI; }
 }
 if(nN == 0) return (false);
 var nPPunto = nP;
 // Posicion Arroba/Punto ...
 if(nPArroba> nPPunto) return (false);
 //
 return (true);
}

function GuardarConsulta_es(){
with(document.forms['f']){
 if ((nombre.value=="")){ alert("Por favor, debes indicar un Nombre."); nombre.focus(); }
 else
 if ((apellidos.value=="")){ alert("Por favor, debes indicar los Apellidos."); apellidos.focus(); }
 else
 if ((email.value=="")){ alert("Por favor, debes indicar un E-mail."); email.focus(); }
 else 
 if (!validaEmail(email.value)){ alert("El E-mail introducido tiene un formato incorrecto."); email.focus(); }
 else
 if ((pregunta.value=="")){ alert("Por favor, debes indicar la consulta."); pregunta.focus(); }
 else
 submit();
 }
return false;
}
