

	function validar_formulario(form) {
								
		exp_nombre		= /^[ \'ñÑA-z]+$/;
		exp_email		= /^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
		exp_telefono	= /^[0-9]{9,15}$/;

		// EMAIL.
		if (form.email.value=='') {
			alert('Escriba su EMAIL por favor.');
			form.email.focus();
			return(false);
		}else if (!exp_email.test(form.email.value)) {
			alert('El EMAIL que usted ha escrito no es un formato valido.');
			form.email.focus();
			return(false);
		}

		// PASSWORD.
		if (form.password_registro.value=='') {
			alert('Escriba su CONTRASEÑA por favor.');
			form.password_registro.focus();
			return(false);
		}
		// PASSWORD IGUALES
		if (form.password_registro.value!=form.password2_registro.value) {
			alert('Las CONTRASEÑAS deben de ser iguales.');
			form.password2_registro.focus();
			return(false);
		}
		// NOMBRE.
		if (form.nombre.value=='') {
			alert("Escriba su NOMBRE por favor");
			form.nombre.focus();
			return(false);
		}else if (!exp_nombre.test(form.nombre.value)) {
			alert('El NOMBRE no puede contener caracteres como numeros');
			form.nombre.focus();
			return(false);
		}
		// APELLIDOS.
		if (form.apellidos.value=='') {
			alert('Escriba sus APELLIDOS por favor');
			form.apellidos.focus();
			return(false);
		}else if (!exp_nombre.test(form.apellidos.value)) {
			alert('Los APELLIDOS no pueden contener caracteres como numeros');
			form.apellidos.focus();
			return(false);
		}


		// DIRECCION.
		if (form.direccion.value=='') {
			alert('Escriba su DIRECCION por favor.');
			form.direccion.focus();
			return(false);
		}
				
		// CODIGO POSTAL.
		if (form.codigopostal.value=='') {
			alert('Escriba su CODIGO POSTAL por favor.');
			form.codigopostal.focus();
			return(false);
		}
		
		// POBLACION.
		if (form.poblacion.value=='') {
			alert('Escriba su POBLACION por favor.');
			form.poblacion.focus();
			return(false);
		}
		
		// PROVINCIA.
		if (form.provincia.value=='') {
			alert('Escriba su PROVINCIA por favor.');
			form.provincia.focus();
			return(false);
		}
		// PAIS.
		if (form.pais.value=='') {
			alert('Escriba su PAIS por favor.');
			form.pais.focus();
			return(false);
		}


		// TELEFONO.
		if (form.telefono.value=='') {
			alert('Escriba su numero de TELEFONO por favor');
			form.telefono.focus();
			return(false);
		}
	    
		
		// CONFORME.
		if (!form.conforme[0].checked && !form.conforme[1].checked) {
			alert('USTED DEBE SELECCIONAR SI ESTA CONFORME O NO CON NUESTRO AVISO LEGAL.');
			form.conforme[0].focus();
			return(false);
		}else if (!form.conforme[0].checked && form.conforme[1].checked) {
			alert('USTED DEBE DE ESTAR CONFORME CON NUESTRO AVISO LEGAL PARA PODER CREARSE LA CUENTA.');
			form.conforme[0].focus();
			return(false);
		}
		
		form.submit();
		return(true);
	}
