<!--

function validar_usuario()
{ 
	if (document.f1.nb.value == "")
		{
		alert("Debe rellenar el campo: Nombre");
		document.f1.nb.focus();
		}
	else
		vcontacto();
};//End function

function vcontacto()
{ 
	if (document.f1.contacto.value == "") 
	{
	alert("Debe rellenar el campo: Contacto"); 
	document.f1.contacto.focus();
	}
	else
		vdni();
};//End function

function vdni()
{
	if ((document.f1.dni.value == "") && (document.f1.tip.value == "particular"))
		{
		alert("Debe rellenar el campo: D.N.I");
		document.f1.dni.focus();
		}
	else
		vcif();
};//End function

function vcif()
{ 
	if ((document.f1.cif.value == "") && (document.f1.tip.value == "empresa"))
		{
		alert("Debe rellenar el campo: C.I.F");
		document.f1.cif.focus();
		}
	else
		vtel();
};//End function

function vtel()
{ 
	if (document.f1.tel.value == "") 
	{
	alert("Debe rellenar el campo: Teléfono"); 
	document.f1.tel.focus();
	}
	else
		vemail();
};//End function

function vemail()
{ 
	if (document.f1.email.value == "") 
	{
	alert("Debe especificar una dirección de email"); 
	document.f1.email.focus();
	}
	else
		vdir();
};//End function

function vdir()
{ 
	if (document.f1.dir.value == "") 
		{
		alert("Debe rellenar el campo: Dirección"); 
		document.f1.dir.focus();
		}
	else
		vcp();
};//End function

function vcp()
{ 
	if (document.f1.cp.value == "") 
		{
		alert("Debe rellenar el campo: Código postal"); 
		document.f1.cp.focus();
		}
	else
		vlocalidad();
};//End function

function vlocalidad()
{ 
	if (document.f1.localidad.value == "") 
	{
	alert("Debe rellenar el campo: Localidad"); 
	document.f1.localidad.focus();
	}
	else
		videntif();
};//End function

function videntif()
{ 
	if (document.f1.identif.value == "") 
	{
	alert("Elija un usuario para entrar en la web."); 
	document.f1.identif.focus();
	}
	else
		{
		if (document.f1.identif.value.length < 6)
			{
			alert("El usuario debe tener de 6 a 8 caracteres");
			document.f1.identif.select() 
			document.f1.identif.focus();
			}
			else
				vclave();
		}
};//End function

function vclave()
{ 
	if (document.f1.clave.value == "") 
	{
	alert("Debe escribir la contraseña que desee utilizar."); 
	document.f1.clave.focus();
	}
	else
		{
		if (document.f1.clave.value.length < 6)
			{
			alert("La contraseña debe tener de 6 a 8 caracteres");
			document.f1.clave.select() 
			document.f1.clave.focus();
			}
			else
				document.f1.submit();
		}
};//End function

//-->


