function comprueba() {
	d = document.forms[0]
	var texto = 'Suedland.com || Error en los datos ||\n\n'
	var error = false
	if (d.nombre.value.length<12) {texto+='- Debe escribir su nombre completo\n'; error = true}
	if (d.telefono.value=='') {texto+='- Debe escribir un número de teléfono fijo\n'; error = true}
	else {
		if (isNaN(d.telefono.value)) {texto+='- El teléfono fijo debe contener sólo números\n'; error = true}
		else {if (d.telefono.value.substr(0,1)=='6') {texto+='- El teléfono fijo no puede ser un móvil\n'; error = true}}
		}
	if (d.movil.value!='' && isNaN(d.movil.value)) {texto+='- El teléfono móvil debe contener sólo números\n'; error = true}
	if (d.emilio.value.length<10) {texto+='- Debe escribir su correo electrónico\n'; error = true}
	else {
		//comprobamos que el emilio es correcto
			var ca = d.emilio.value
			var largo=ca.length
			var errorE = false
			var textoe='- El correo electrónico no es correcto\n'
			arro=ca.indexOf("@")
			if (arro!=ca.lastIndexOf("@")) {errorE=true; textoe+='   - No puede introducir más de una @\n'}
			switch (arro) {
				case -1:
					errorE=true; 
					textoe+='   - Debe aparecer @\n'
					break;
				case 0:
					errorE=true; 
					textoe+='   - Antes de @ debe aparecer el nombre de usuario\n'
					break;
				}
			if (arro==largo-1) {errorE=true; textoe+='   - Después de @ debe aparecer el nombre del dominio\n'}
			if (arro!=-1) {
				dominio=ca.split("@")
				punto=dominio[1].indexOf(".")
				puntofinal=dominio[1].lastIndexOf(".")
				switch (punto) {
					case -1:
						errorE=true; 
						textoe+='   - Falta un punto y la extensión\n'
						break;
					case 0:
						errorE=true; 
						textoe+='   - Entre @ y . debe aparecer el nombre del dominio\n'
						break;
					}
				if (puntofinal==dominio[1].length-1 && dominio[1].length!=0) {errorE=true; textoe+='   - Falta la extensión, no ponga un punto al final del correo\n'}
				puntouser=dominio[0].indexOf(".")
				puntouserfin=dominio[0].lastIndexOf(".")
				if (puntouser==0) {errorE=true; textoe+='   - No puede haber un punto antes del usuario\n'}
				if (puntouserfin==dominio[0].length-1 && dominio[0].length!=0) {errorE=true; textoe+='   - No puede haber un punto antes de @\n'}
			}
			if (errorE) {error=true; texto+=textoe}
	}
	if (d.comentarios.value.length<10) {texto+='- Debe escribir una breve descripción del inmueble\n'; error = true}
	if (error) {alert(texto)}
	else {
		window.open('/inc/blank.htm', 'enviacontacto', 'width=350, height=300')
		d.target='enviacontacto';
		d.action='/enviar.php'
		d.submit();
		d.reset();
		document.location='/'
		return false
	}
}
