function valida_numero(numero)
{
	if (!/^[0-9]*$/.test(numero) )
		{
				return false;
		}else{
				return true;
			 }
}


function valida_cadena(texto)
{
	var RegExPattern = "[1-9]";
	if (texto.match(RegExPattern))
	{
		return false;		
	}else
	{
		return true;		
	}
}
//*********************************************************
//function valida_correo(correo) 
//{
//	if (/^\w+([\.=]?\w+)*@\w+([\.=]?\w+)*(\.\(2,3))+$/.test(correo))
//		{
//		return (true)
//		} else {
//			return (false);	
//			}
//}


//**********************************************************

function limpiar()

{
	
	document.form.reset();
	document.form.rut.focus();
	}




function validar()
{
	var form=document.form;
	if(form.rut.value==0)
	{
		alert("Ingrese Rut");
		form.rut.value="";
		form.rut.focus();
		return false;
	}
	
	if(form.apaterno.value==0)
	{
		alert("Ingrese Apellido Paterno");
		form.apaterno.value="";
		form.apaterno.focus();
		return false;
	}
	
	if(form.amaterno.value==0)
	{
		alert("Ingrese Apellido Materno");
		form.amaterno.value="";
		form.amaterno.focus();
		return false;
	}
	
	if(form.nombres.value==0)
	{
		alert("Ingrese Nombres");
		form.nombres.value="";
		form.nombres.focus();
		return false;
	}
	
	if(form.fnaci.value==0)
	{
		alert("Ingrese Fecha de Nacimiento");
		form.fnaci.value="";
		form.fnaci.focus();
		return false;
	}
	
	
	if(form.sexo.value==0)
	{
		alert("Ingrese Sexo");
		form.sexo.value="";
		form.sexo.focus();
		return false;
	}
	
	if(form.categoria.value==0)
	{
		alert("Ingrese Categoria");
		form.categoria.value="";
		form.categoria.focus();
		return false;
	}
	
	if(form.club.value==0)
	{
		alert("Ingrese club");
		form.club.value="";
		form.club.focus();
		return false;
	}
	
	
	if(form.asociacion.value==0)
	{
		alert("Ingrese Asociacion");
		form.asociacion.value="";
		form.asociacion.focus();
		return false;
	}
	
	
	if(form.fins.value==0)
	{
		alert("Ingrese Fecha de Inscripción");
		form.fins.value="";
		form.fins.focus();
		return false;
	}
	
	document.form.submit();
	
}



