 function validamail(mail)
   {
   posarroba=mail.indexOf("@");
   posultpunto=mail.lastIndexOf(".");

     if ((posarroba==-1) || (posultpunto==-1))
        return(false);
     if (posultpunto-posarroba<2)
        return(false);
     if ((mail.length-1)-posultpunto<2)
        return(false);
     if ((mail.length-1)-posultpunto>3)
        return(false);
     if (posarroba<1)
        return(false);
     if (posultpunto<posarroba)
        return(false);
     
   }
   function validarut(rut)
{
  if (rut.length<9)
     return(false)
  i1=rut.indexOf("-");
  dv=rut.substr(i1+1);
  dv=dv.toUpperCase();
  nu=rut.substr(0,i1);

  cnt=0;
  suma=0;
  for (i=nu.length-1; i>=0; i--)
  {
    dig=nu.substr(i,1);
    fc=cnt+2;
    suma += parseInt(dig)*fc;
    cnt=(cnt+1) % 6;
   }
  dvok=11-(suma%11);
  if (dvok==11) dvokstr="0";
  if (dvok==10) dvokstr="K";
  if ((dvok!=11) && (dvok!=10)) dvokstr=""+dvok;

  if (dvokstr==dv)
     return(true);
  else
     return(false);
}
function esInteger(e) {
					var charCode
					if (navigator.appName == "Netscape") // Veo si es Netscape o Explorer (mas adelante lo explicamos)
					charCode = e.which // leo la tecla que ingreso
					else
					charCode = e.keyCode // leo la tecla que ingreso
					status = charCode 
					if (charCode > 31 && (charCode < 48 || charCode > 57)) { // Chequeamos que sea un numero comparandolo con los valores ASCII
					alert("Debe Ingresar Sólo Números !!")
					return false
					}
					return true
					}

