function validar(formulario,language) {

var apellidos = new Array(3);
var asunto = new Array(3);
var telefono = new Array(3);
var email = new Array(3);
var noemail = new Array(3);
var nombre = new Array(3);
nombre['es']="Rellene el campo Nombre";
nombre['en']="Fill the field Name";
nombre['de']="alemanRellene el campo Nombre";
apellidos['es']="Rellene el campo Apellidos";
apellidos['en']="Fill the field Surname";
apellidos['de']="alemanRellene el campo Apellidos";
asunto['es']="Rellene el campo Asunto";
asunto['en']="Fill the field Subject";
asunto['de']="alemanRellene el campo Asunto";
telefono['es']="Rellene el campo Tel&eacute;fono";
telefono['en']="Fill the field Telephone";
telefono['de']="alemanRellene el campo Tel&eacute;fono";
email['es']="Rellene el campo Mail";
email['en']="Fill the field Mail";
email['de']="alemanRellene el campo Mail";
noemail['es']="La direcci&oacute;n de email no es correcta";
noemail['en']="The email is wrong";
noemail['de']="alemanLa direcci&oacute;n de email no es correcta";

		if (formulario.nombre.value==""){
			document.getElementById('error').innerHTML=nombre[language];
			return (false); 
		}else{
			if (formulario.apellidos.value==""){
				document.getElementById('error').innerHTML=apellidos[language];
				return (false); 
			}else{
				if (formulario.telefono.value==""){
					document.getElementById('error').innerHTML=telefono[language];
					return (false); 
				}else{
					if (formulario.email.value==""){
						document.getElementById('error').innerHTML=email[language];
						return (false); 
					}else{	
						if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(formulario.email.value))){			
						   document.getElementById('error').innerHTML=noemail[language];
						   return (false);
						}else{
							if (formulario.asunto.value==""){
								document.getElementById('error').innerHTML=asunto[language];
								return (false); 
							}						
						}
					}
				}
			}
		}
	document.contacto.submit();
    return (false);
}