// JavaScript Document

function trim(s) {

	// Remove leading spaces and carriage returns

	while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r')) {
		s = s.substring(1,s.length);
	}

	// Remove trailing spaces and carriage returns

	while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r')) {
		s = s.substring(0,s.length-1);
	}
	return s;
}

function mail_valido(dircorreo) {

	// Función que comprueba si una dirección de e-mail es válida.
	// Primero declaramos algunas variables a 0.

	var conarroba=0,conpunto=0,posarroba=0,cuentarrobas=0,primarroba,x,car;

	// Las direcciones de correo son todas en minúscula.
	
	dircorreo=dircorreo.toLowerCase();
	
	// Si no contiene nada $dircorreo, no es válida

	if (dircorreo == '') return false;

	// Debe tener una y sólo una arroba.

	primarroba=dircorreo.indexOf('@');
	if (primarroba != -1) {
		cuentarrobas++;
		if (dircorreo.indexOf('@',primarroba + 1) != -1)
			cuentarrobas++;
	}
	if (cuentarrobas != 1) return false;
	
	// Al menos un punto, correspondiente como mínimo a la extensión del dominio.
	
	if (dircorreo.indexOf('.') == -1) return false;
	
	// No puede tener dos puntos seguidos.
	
	if (dircorreo.indexOf('..') != -1) return false;
	
	// Empezamos a comprobar cada carácter por separado.
	
	for (x=0;x<dircorreo.length;x++) {
	
		// No puede tener otro carácter no alfanumérico diferente de punto, arroba o guión medio o bajo.
		
		car=dircorreo.charCodeAt(x);
		
		if (car < 45 || car == 47 || (car > 57 && car < 64) || (car > 64 && car < 95) || (car > 95 && car < 97) || car > 122) return false;
	
		// Si es el carácter arroba, y se encuentra el primero en la dirección, o en una posición que no deja
		// espacio para un mínimo dominio (...@x.xx), no es válida la dirección.
		
		if (dircorreo.substr(x,1) == "@" && (x == 0 || x > (dircorreo.length - 5))) return false;
		
		// En caso contrario al anterior, cuando se encuentre la arroba empieza a buscarse al menos un punto,
		// para lo cual, activamos dos variables: $conarroba a true (encontrada) y $posarroba con la posición
		// de la arroba en la dirección.
		
		if (dircorreo.substr(x,1) == "@") {
			conarroba=1;
			posarroba=x;
		}
		
		// Si se encuentra un punto después de la arroba ($conarroba=true) y está inmediatamente después
		// de dicha arroba (p.e.: usuario@.com), no es correcta.
		
		if (dircorreo.substr(x,1) == "." && conarroba == 1 && x < (posarroba + 2)) return false;
		
		// En caso contrario, si la dirección termina con un punto y menos de dos caracteres como extensión
		// (usuario@dominio. o usuario@dominio.x), tampoco es válida, ya que lo mínimo es extensión .es, por ejemplo
		
		if (dircorreo.substr(x,1) == "." && x > (dircorreo.length - 3)) return false;
		
		// Y por último, si se encuentra el último punto, después de la arroba, con una extensión de 2 a 4 caracteres,
		// $conpunto se pone a true
		
		if (dircorreo.substr(x,1) == "." && conarroba == 1 && x >= (dircorreo.length - 5)) conpunto=1;
	}
	
	// Si la dirección tiene arroba y punto, con las verificaciones ya realizadas,
	// la dirección es correcta.
	
	if (conpunto && conarroba) return true;
	
	// En cualquier otro caso, no será válida.
	
	else return false;
}

function ValidateRegister(lang) {
	var datos = "", form = document.getElementById('registration_frm');

	if (lang == "de") {
		if (trim(form.Nombre.value) == "")
			datos += "- Vorname eines Elternteils\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Nachname eines Elternteils\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Adresse\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Stadt\n";
		if (trim(form.CP.value) == "")
			datos += "- PLZ\n";
		if (trim(form.Pais.value) == "")
			datos += "- Land\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail adresse\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Tel.nr. Zuhause\n";
		if (form.Condition.checked == false)
			datos += "- Sie m" + String.fromCharCode(252) + "ssen gelesen und akzeptiere die Bedingungen\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Sie m" + String.fromCharCode(252) + "ssen den Schl" + String.fromCharCode(252) + "ssel, den Sie im Bild sehen\n";
		
		if (datos != "")
			alert("Sie haben nicht alle Felder, die wir ben" + String.fromCharCode(246) + "tigten.\nWir ben" + String.fromCharCode(246) + "tigen die folgenden Daten:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "sp") {
		if (trim(form.Nombre.value) == "")
			datos += "- Nombre\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Apellidos\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Direcci" + String.fromCharCode(243) + "n\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Ciudad\n";
		if (trim(form.CP.value) == "")
			datos += "- C" + String.fromCharCode(243) + "digo postal\n";
		if (trim(form.Pais.value) == "")
			datos += "- Pa" + String.fromCharCode(237) + "s\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- Direcci" + String.fromCharCode(243) + "n e-mail\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Tel" + String.fromCharCode(233) + "fono\n";
		if (form.Condition.checked == false)
			datos += "- Debe leer y aceptar las condiciones\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Debe escribir el c" + String.fromCharCode(243) + "digo que ve en la imagen\n";

		if (datos != "")
			alert("No ha indicado todos los campos requeridos.\nNecesitamos los siguientes datos:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "en") {
		if (trim(form.Nombre.value) == "")
			datos += "- First name\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Last name\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Address\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- City\n";
		if (trim(form.CP.value) == "")
			datos += "- Zip code\n";
		if (trim(form.Pais.value) == "")
			datos += "- Country\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail address\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Contact phone\n";
		if (form.Condition.checked == false)
			datos += "- You must read and accept the conditions\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "fr") {
		if (trim(form.Nombre.value) == "")
			datos += "- Pr" + String.fromCharCode(233) + "nom\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Nom\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Adresse\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Ville\n";
		if (trim(form.CP.value) == "")
			datos += "- CP\n";
		if (trim(form.Pais.value) == "")
			datos += "- Pays\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- Adresse de e-mail\n";
		if (trim(form.Telefono.value) == "")
			datos += "- T" + String.fromCharCode(233) + "l" + String.fromCharCode(233) + "phone de contact\n";
		if (form.Condition.checked == false)
			datos += "- Vous devez lire et accepter les conditions\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Vous devez " + String.fromCharCode(233) + "crire la cl" + String.fromCharCode(233) + " que vous voyez dans l'image\n";
		
		if (datos != "")
			alert("Vous n'avez pas indiqu" + String.fromCharCode(233) + " tous les domaines dont nous avions besoin.\nNous avons besoin des donn" + String.fromCharCode(233) + "es suivantes:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "it") {
		if (trim(form.Nombre.value) == "")
			datos += "- Nome\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Cognome\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Indirizzo\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Citt" + String.fromCharCode(224) + "\n";
		if (trim(form.CP.value) == "")
			datos += "- Codice postale\n";
		if (trim(form.Pais.value) == "")
			datos += "- Paese\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Numero di telefono di contatto\n";
		if (form.Condition.checked == false)
			datos += "- " + String.fromCharCode(200) + " necessario leggere e accettare le condizioni\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Devi scrivere la chiave potete vedere nella immagine\n";

		if (datos != "")
			alert("Non hai indicato tutti i campi che abbiamo richiesto.\nAbbiamo bisogno dei seguenti dati:\n\n" + datos);
		else
			return true;
	}
	else {
		if (trim(form.Nombre.value) == "")
			datos += "- First name\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Last name\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Address\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- City\n";
		if (trim(form.CP.value) == "")
			datos += "- Zip code\n";
		if (trim(form.Pais.value) == "")
			datos += "- Country\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail address\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Contact phone\n";
		if (form.Condition.checked == false)
			datos += "- You must read and accept the conditions\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
		
	return false;
}

function ValidateTest(lang) {
	var datos = "", form = document.getElementById('SpanishTest');

	if (lang == "de") {
		if (trim(form.Nametest.value) == "")
			datos += "- Ihr Vorname\n";
		if (trim(form.Emailtest.value) == "")
			datos += "- Ihr E-Mail-Adresse\n";
		if (trim(form.test1.value) == "")
			datos += "- Die erste Frage\n";
		if (trim(form.test2.value) == "")
			datos += "- Die zweite Frage\n";
		if (trim(form.test3.value) == "")
			datos += "- Die dritte Frage\n";
		if (trim(form.test4.value) == "")
			datos += "- Die vierte Frage\n";
		if (trim(form.test5.value) == "")
			datos += "- Die f" + String.fromCharCode(252) + "nfte Frage\n";
		if (trim(form.test6.value) == "")
			datos += "- Zur sechsten Frage\n";
		if (trim(form.test7.value) == "")
			datos += "- Die siebte Frage\n";
		if (trim(form.test8.value) == "")
			datos += "- Die achte Frage\n";
		if (trim(form.test9.value) == "")
			datos += "- Die neunte Frage\n";
		if (trim(form.test10.value) == "")
			datos += "- Die zehnte Frage\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Sie m" + String.fromCharCode(252) + "ssen den Schl" + String.fromCharCode(252) + "ssel, den Sie im Bild sehen\n";
		
		if (datos != "")
			alert("Sie haben nicht alle Felder, die wir ben" + String.fromCharCode(246) + "tigten.\nWir ben" + String.fromCharCode(246) + "tigen die folgenden Daten:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "sp") {
		if (trim(form.Nametest.value) == "")
			datos += "- Su nombre\n";
		if (trim(form.Emailtest.value) == "")
			datos += "- Su e-mail\n";
		if (trim(form.test1.value) == "")
			datos += "- La primera pregunta\n";
		if (trim(form.test2.value) == "")
			datos += "- La segunda pregunta\n";
		if (trim(form.test3.value) == "")
			datos += "- La tercera pregunta\n";
		if (trim(form.test4.value) == "")
			datos += "- La cuarta pregunta\n";
		if (trim(form.test5.value) == "")
			datos += "- La quinta pregunta\n";
		if (trim(form.test6.value) == "")
			datos += "- La sexta pregunta\n";
		if (trim(form.test7.value) == "")
			datos += "- La s" + String.fromCharCode(233) + "ptima pregunta\n";
		if (trim(form.test8.value) == "")
			datos += "- La octava pregunta\n";
		if (trim(form.test9.value) == "")
			datos += "- La novena pregunta\n";
		if (trim(form.test10.value) == "")
			datos += "- La d" + String.fromCharCode(233) + "cima pregunta\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Debe escribir el c" + String.fromCharCode(243) + "digo que ve en la imagen\n";

		if (datos != "")
			alert("No ha indicado todos los campos requeridos.\nNecesitamos los siguientes datos:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "en") {
		if (trim(form.Nametest.value) == "")
			datos += "- Your name\n";
		if (trim(form.Emailtest.value) == "")
			datos += "- Your e-mail address\n";
		if (trim(form.test1.value) == "")
			datos += "- First question\n";
		if (trim(form.test2.value) == "")
			datos += "- Second question\n";
		if (trim(form.test3.value) == "")
			datos += "- Third question\n";
		if (trim(form.test4.value) == "")
			datos += "- Fourth question\n";
		if (trim(form.test5.value) == "")
			datos += "- Fifth question\n";
		if (trim(form.test6.value) == "")
			datos += "- Sixth question\n";
		if (trim(form.test7.value) == "")
			datos += "- Seventh question\n";
		if (trim(form.test8.value) == "")
			datos += "- Eighth question\n";
		if (trim(form.test9.value) == "")
			datos += "- Ninth question\n";
		if (trim(form.test10.value) == "")
			datos += "- Tenth question\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "fr") {
		if (trim(form.Nametest.value) == "")
			datos += "- Votre nom\n";
		if (trim(form.Emailtest.value) == "")
			datos += "- Votre adresse e-mail\n";
		if (trim(form.test1.value) == "")
			datos += "- La premi" + String.fromCharCode(232) + "re question\n";
		if (trim(form.test2.value) == "")
			datos += "- La deuxi" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test3.value) == "")
			datos += "- La troisi" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test4.value) == "")
			datos += "- La quatri" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test5.value) == "")
			datos += "- La cinqui" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test6.value) == "")
			datos += "- La sixi" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test7.value) == "")
			datos += "- La septi" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test8.value) == "")
			datos += "- La huiti" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test9.value) == "")
			datos += "- La neuvi" + String.fromCharCode(232) + "me question\n";
		if (trim(form.test10.value) == "")
			datos += "- La dixi" + String.fromCharCode(232) + "me question\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Vous devez " + String.fromCharCode(233) + "crire la cl" + String.fromCharCode(233) + " que vous voyez dans l'image\n";
		
		if (datos != "")
			alert("Vous n'avez pas indiqu" + String.fromCharCode(233) + " tous les domaines dont nous avions besoin.\nNous avons besoin des donn" + String.fromCharCode(233) + "es suivantes:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "it") {
		if (trim(form.Nametest.value) == "")
			datos += "- Il tuo nome\n";
		if (trim(form.Emailtest.value) == "")
			datos += "- Il tuo e-mail\n";
		if (trim(form.test1.value) == "")
			datos += "- La prima questione\n";
		if (trim(form.test2.value) == "")
			datos += "- La seconda questione\n";
		if (trim(form.test3.value) == "")
			datos += "- La terza questione\n";
		if (trim(form.test4.value) == "")
			datos += "- La quarta questione\n";
		if (trim(form.test5.value) == "")
			datos += "- La quinta questione\n";
		if (trim(form.test6.value) == "")
			datos += "- La sesta questione\n";
		if (trim(form.test7.value) == "")
			datos += "- La settima questione\n";
		if (trim(form.test8.value) == "")
			datos += "- L'ottava questione\n";
		if (trim(form.test9.value) == "")
			datos += "- La nona questione\n";
		if (trim(form.test10.value) == "")
			datos += "- La decima questione\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Devi scrivere la chiave potete vedere nella immagine\n";

		if (datos != "")
			alert("Non hai indicato tutti i campi che abbiamo richiesto.\nAbbiamo bisogno dei seguenti dati:\n\n" + datos);
		else
			return true;
	}
	else {
		if (trim(form.Nametest.value) == "")
			datos += "- Your name\n";
		if (trim(form.Emailtest.value) == "")
			datos += "- Your e-mail address\n";
		if (trim(form.test1.value) == "")
			datos += "- First question\n";
		if (trim(form.test2.value) == "")
			datos += "- Second question\n";
		if (trim(form.test3.value) == "")
			datos += "- Third question\n";
		if (trim(form.test4.value) == "")
			datos += "- Fourth question\n";
		if (trim(form.test5.value) == "")
			datos += "- Fifth question\n";
		if (trim(form.test6.value) == "")
			datos += "- Sixth question\n";
		if (trim(form.test7.value) == "")
			datos += "- Seventh question\n";
		if (trim(form.test8.value) == "")
			datos += "- Eighth question\n";
		if (trim(form.test9.value) == "")
			datos += "- Ninth question\n";
		if (trim(form.test10.value) == "")
			datos += "- Tenth question\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
		
	return false;
}

function ValidateInfo(lang) {
	var datos = "", form = document.getElementById('MoreInfo');

	if (lang == "de") {
		if (trim(form.Nombre.value) == "")
			datos += "- Vorname eines Elternteils\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Nachname eines Elternteils\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Adresse\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Stadt\n";
		if (trim(form.CP.value) == "")
			datos += "- PLZ\n";
		if (trim(form.Pais.value) == "")
			datos += "- Land\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail adresse\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Tel.nr. Zuhause\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Sie m" + String.fromCharCode(252) + "ssen den Schl" + String.fromCharCode(252) + "ssel, den Sie im Bild sehen\n";
		
		if (datos != "")
			alert("Sie haben nicht alle Felder, die wir ben" + String.fromCharCode(246) + "tigten.\nWir ben" + String.fromCharCode(246) + "tigen die folgenden Daten:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "sp") {
		if (trim(form.Nombre.value) == "")
			datos += "- Nombre\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Apellidos\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Direcci" + String.fromCharCode(243) + "n\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Ciudad\n";
		if (trim(form.CP.value) == "")
			datos += "- C" + String.fromCharCode(243) + "digo postal\n";
		if (trim(form.Pais.value) == "")
			datos += "- Pa" + String.fromCharCode(237) + "s\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- Direcci" + String.fromCharCode(243) + "n e-mail\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Tel" + String.fromCharCode(233) + "fono\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Debe escribir el c" + String.fromCharCode(243) + "digo que ve en la imagen\n";

		if (datos != "")
			alert("No ha indicado todos los campos requeridos.\nNecesitamos los siguientes datos:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "en") {
		if (trim(form.Nombre.value) == "")
			datos += "- First name\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Last name\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Address\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- City\n";
		if (trim(form.CP.value) == "")
			datos += "- Zip code\n";
		if (trim(form.Pais.value) == "")
			datos += "- Country\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail address\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Contact phone\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "fr") {
		if (trim(form.Nombre.value) == "")
			datos += "- Pr" + String.fromCharCode(233) + "nom\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Nom\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Adresse\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Ville\n";
		if (trim(form.CP.value) == "")
			datos += "- CP\n";
		if (trim(form.Pais.value) == "")
			datos += "- Pays\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- Adresse de e-mail\n";
		if (trim(form.Telefono.value) == "")
			datos += "- T" + String.fromCharCode(233) + "l" + String.fromCharCode(233) + "phone de contact\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Vous devez " + String.fromCharCode(233) + "crire la cl" + String.fromCharCode(233) + " que vous voyez dans l'image\n";
		
		if (datos != "")
			alert("Vous n'avez pas indiqu" + String.fromCharCode(233) + " tous les domaines dont nous avions besoin.\nNous avons besoin des donn" + String.fromCharCode(233) + "es suivantes:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "it") {
		if (trim(form.Nombre.value) == "")
			datos += "- Nome\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Cognome\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Indirizzo\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- Citt" + String.fromCharCode(224) + "\n";
		if (trim(form.CP.value) == "")
			datos += "- Codice postale\n";
		if (trim(form.Pais.value) == "")
			datos += "- Paese\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Numero di telefono di contatto\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Devi scrivere la chiave potete vedere nella immagine\n";

		if (datos != "")
			alert("Non hai indicato tutti i campi che abbiamo richiesto.\nAbbiamo bisogno dei seguenti dati:\n\n" + datos);
		else
			return true;
	}
	else {
		if (trim(form.Nombre.value) == "")
			datos += "- First name\n";
		if (trim(form.Apellidos.value) == "")
			datos += "- Last name\n";
		if (trim(form.Direccion.value) == "")
			datos += "- Address\n";
		if (trim(form.Ciudad.value) == "")
			datos += "- City\n";
		if (trim(form.CP.value) == "")
			datos += "- Zip code\n";
		if (trim(form.Pais.value) == "")
			datos += "- Country\n";
		if (trim(form.Email.value) == "" || !mail_valido(form.Email.value))
			datos += "- E-mail address\n";
		if (trim(form.Telefono.value) == "")
			datos += "- Contact phone\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
		
	return false;
}
function ValidateRecommend(lang) {
	var datos = "", form = document.getElementById('Recommend');

	if (lang == "de") {
		if (trim(form.Nombre.value) == "")
			datos += "- Your name\n";
		if (!mail_valido(form.Email.value))
			datos += "- Your e-mail address\n";
		if (!mail_valido(form.Email1.value) && !mail_valido(form.Email2.value) &&
			!mail_valido(form.Email3.value) && !mail_valido(form.Email4.value) &&
			!mail_valido(form.Email5.value) && !mail_valido(form.Email6.value))
			datos += "- E-mail address of one friend by the least\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Sie m" + String.fromCharCode(252) + "ssen den Schl" + String.fromCharCode(252) + "ssel, den Sie im Bild sehen\n";
		
		if (datos != "")
			alert("Sie haben nicht alle Felder, die wir ben" + String.fromCharCode(246) + "tigten.\nWir ben" + String.fromCharCode(246) + "tigen die folgenden Daten:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "sp") {
		if (trim(form.Nombre.value) == "")
			datos += "- Tu nombre\n";
		if (!mail_valido(form.Email.value))
			datos += "- Tu e-mail\n";
		if (!mail_valido(form.Email1.value) && !mail_valido(form.Email2.value) &&
			!mail_valido(form.Email3.value) && !mail_valido(form.Email4.value) &&
			!mail_valido(form.Email5.value) && !mail_valido(form.Email6.value))
			datos += "- E-mail de al menos un amigo\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Debe escribir el c" + String.fromCharCode(243) + "digo que ve en la imagen\n";

		if (datos != "")
			alert("No ha indicado todos los campos requeridos.\nNecesitamos los siguientes datos:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "en") {
		if (trim(form.Nombre.value) == "")
			datos += "- Your name\n";
		if (!mail_valido(form.Email.value))
			datos += "- Your e-mail address\n";
		if (!mail_valido(form.Email1.value) && !mail_valido(form.Email2.value) &&
			!mail_valido(form.Email3.value) && !mail_valido(form.Email4.value) &&
			!mail_valido(form.Email5.value) && !mail_valido(form.Email6.value))
			datos += "- E-mail address of one friend by the least\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "fr") {
		if (trim(form.Nombre.value) == "")
			datos += "- Votre nom\n";
		if (!mail_valido(form.Email.value))
			datos += "- Votre e-mail\n";
		if (!mail_valido(form.Email1.value) && !mail_valido(form.Email2.value) &&
			!mail_valido(form.Email3.value) && !mail_valido(form.Email4.value) &&
			!mail_valido(form.Email5.value) && !mail_valido(form.Email6.value))
			datos += "- E-mail d'un ami en le moins de\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Vous devez " + String.fromCharCode(233) + "crire la cl" + String.fromCharCode(233) + " que vous voyez dans l'image\n";
		
		if (datos != "")
			alert("Vous n'avez pas indiqu" + String.fromCharCode(233) + " tous les domaines dont nous avions besoin.\nNous avons besoin des donn" + String.fromCharCode(233) + "es suivantes:\n\n" + datos);
		else
			return true;
	}
	else if (lang == "it") {
		if (trim(form.Nombre.value) == "")
			datos += "- Il tuo nome\n";
		if (!mail_valido(form.Email.value))
			datos += "- Il tuo e-mail\n";
		if (!mail_valido(form.Email1.value) && !mail_valido(form.Email2.value) &&
			!mail_valido(form.Email3.value) && !mail_valido(form.Email4.value) &&
			!mail_valido(form.Email5.value) && !mail_valido(form.Email6.value))
			datos += "- E-mail di un amico con il minimo\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- Devi scrivere la chiave potete vedere nella immagine\n";

		if (datos != "")
			alert("Non hai indicato tutti i campi che abbiamo richiesto.\nAbbiamo bisogno dei seguenti dati:\n\n" + datos);
		else
			return true;
	}
	else {
		if (trim(form.Nombre.value) == "")
			datos += "- Your name\n";
		if (!mail_valido(form.Email.value))
			datos += "- Your e-mail address\n";
		if (!mail_valido(form.Email1.value) && !mail_valido(form.Email2.value) &&
			!mail_valido(form.Email3.value) && !mail_valido(form.Email4.value) &&
			!mail_valido(form.Email5.value) && !mail_valido(form.Email6.value))
			datos += "- E-mail address of one friend by the least\n";
		if (trim(form.captcha.value) == "" || form.captcha.value.length < 4)
			datos += "- You must write the key you see in the image\n";

		if (datos != "")
			alert("You have not indicated all the fields that we required.\nWe need the following data:\n\n" + datos);
		else
			return true;
	}
		
	return false;
}