<!--
function numero(e)
{
  var tecla=(navigator.appName=="Netscape") ? e.which : e.keyCode;
  if((tecla<48)||(tecla>57))
  {
    alert('Atenção:\nDigite somente números neste campo.');
    return false;
  }
}

function autoTab(input,len)
{
  if(input.value.length>=len)
  {
    input.value=input.value.slice(0,len);
    input.form[(getIndex(input)+1) % input.form.length].focus();
  }
  function getIndex(input)
  {
    var index=-1, i=0;
    while(i<input.form.length && index==-1)
      if(input.form[i]==input)
        index = i;
      else
        i++;
    return index;
  }
}

function formataNumero(campo,min,max)
{
  var Carac, i;
  var novo='';
  for(i=0; i<campo.length; i++)
  {
    Carac=campo.charAt(i);
    if(!isNaN(Carac))
      novo += Carac;
  }
  if((novo.length<min)||(novo.length>max))
  {
    if(min==max)
      alert('Atenção:\nEste campo deve ter '+min+' dígitos.');
    else
      alert('Atenção:\nEste campo deve ter '+min+' a '+max+' dígitos.');
  }
  return(novo);
}
//-->