function UpCursor(ctrl, indice, max) {
		ctrl.tam=max;
		ctrl.saltar=false;
		ctrl.indice=indice;
		ctrl.onkeyup=AlteraFoco;
}
function AlteraFoco() {
   if (document.forms[0].elements[1]) 
   {
      //alert(this.value.length);
      //alert(this.tam);
      if (this.value.length==this.tam) 
      {
	       
	       indice=this.indice;
		   try
		   {
		       if (indice == 4) 
		           document.forms[0].txtSenha.focus();
		   }
		   catch(e)
		   {
		       document.forms[0].btLogin.click();
		   }        
		   
    	   if (indice == 5)
    	   {
    	     document.forms[0].btLogin.click();
    	     //document.forms[0].submit();
    	   }
    	    
	  }
   }

	return true;
}
var isNav4, isNav, isIE;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
  isNav = (navigator.appName=="Netscape") ? true : false;
  isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
}
if (navigator.appName=="Netscape") {
	isNav4 = (parseInt(navigator.appVersion.charAt(0))==4);
}
	function setFocus(foc){
		eval("document.forms[0]['" + foc + "'].focus()");
		document.forms[0].Username.value='';
      if (document.forms[0].elements[1]) {
		document.forms[0].Password.value='';
	   }
	}
function onlynum(e) {
	var keyNumber = (isIE) ? event.keyCode : e.which;
	if (((keyNumber<48)||(keyNumber>57)) && (keyNumber!=13) && (keyNumber!="0") && (keyNumber!=8)) {
		if (isIE) event.keyCode=0;
		return false;
	}
}