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);
}
// FUNCIONES IDIOMA INGLES
function GuardarConsulta_in(){
with(document.f){
 if ((nombre.value=="")){ alert("You must show a name."); nombre.focus(); }
 else
 if ((email.value=="")){ alert("You must show an e-mail."); email.focus(); }
 else 
 if (!validaEmail(email.value)){ alert("Incorrect e-mail."); email.focus(); }
 else
 if ((direccion.value=="")){ alert("You must show an address."); direccion.focus(); }
 else 
 if ((cp.value=="")){ alert("You must show a postcode."); cp.focus(); }
 else 
 if ((poblacion.value=="")){ alert("You must show a city."); poblacion.focus(); }
 else 
 if ((pais.value=="")){ alert("You must show a country."); pais.focus(); }
 else 
 if ((telefono.value=="")){ alert("You must show a telephone number."); telefono.focus(); }
 else 
 submit();
 }
return false;
}

// FUNCIONES IDIOMA ESPAÑOL
function GuardarConsulta_es(){
	with(document.f){
		if ((nombre.value=="")){ alert("Debe indicar una Nombre."); nombre.focus(); }
		else
		if ((email.value=="")){	alert("Debe indicar un E-mail."); email.focus(); }
		else 
		if (!validaEmail(email.value)){	alert("E-mail incorrecto."); email.focus();	}
		else
		if ((direccion.value=="")){	alert("Debe indicar una dirección."); direccion.focus(); }
		else 
		if ((cp.value=="")){	alert("Debe indicar un Código Postal."); cp.focus(); }
		else 
		if ((poblacion.value=="")){	alert("Debe indicar una población."); poblacion.focus(); }
		else 
		if ((pais.value=="")){	alert("Debe indicar un pais."); pais.focus(); }
		else 
		if ((telefono.value=="")){	alert("Debe indicar un teléfono."); telefono.focus(); }
		else 
		submit();
		}
return false;
}

function GuardarConsulta_al(){
	with(document.f){
		if ((nombre.value=="")){ alert("Name und Vorname angeben."); nombre.focus(); }
		else
		if ((email.value=="")){	alert("Bitte geben Sie eine e-mail-Adresse an."); email.focus(); }
		else 
		if (!validaEmail(email.value)){	alert("e-mail-Adresse ist nicht korrekt."); email.focus();	}
		else
		if ((direccion.value=="")){	alert("Bitte geben Sie eine Adresse an."); direccion.focus(); }
		else 
		if ((cp.value=="")){	alert("Bitte geben Sie eine Postleitzahl an."); cp.focus(); }
		else 
		if ((poblacion.value=="")){	alert("Bitte geben Sie eine Ortschaft an."); poblacion.focus(); }
		else 
		if ((pais.value=="")){	alert("Bitte geben Sie ein Land an."); pais.focus(); }
		else 
		if ((telefono.value=="")){	alert("Bitte geben Sie eine Telefonnummer an."); telefono.focus(); }
		else 
		submit();
		}
return false;
}


function GuardarConsulta_fr(){
with(document.f){
if ((nombre.value=="")){ alert("Vous devez indiquer un nom."); nombre.focus(); }
else
if ((email.value=="")){	alert("Vus devez indiquer en E-mail."); email.focus(); }
else 
if (!validaEmail(email.value)){	alert("E-mail incorrect."); email.focus();	}
else
if ((direccion.value=="")){	alert("Vous devez indiquer une adresse."); direccion.focus(); }
else 
if ((cp.value=="")){	alert("Vous devez indiquer un code postal."); cp.focus(); }
else 
if ((poblacion.value=="")){	alert("Vous devez indiquer une Localité."); poblacion.focus(); }
else 
if ((pais.value=="")){	alert("Vous devez indiquer un pays."); pais.focus(); }
else 
if ((telefono.value=="")){	alert("Vous devez indiquer un téléfone."); telefono.focus(); }
else 
submit();
}
return false;
}
