AppName = navigator.appName;
isNav = false;

if ( AppName.indexOf("Netscape") != -1 ) 
   {
     isNav = true;
   }

AppName = navigator.appName;
isNav = false;

if ( AppName.indexOf("Netscape") != -1 ) 
   {
     isNav = true;
   }


function AutoSkip(ObjectName)
   {
      ObjectName.focus();
      return;
   }
   
function VNumber(ActualObject, NextObject, itLength)
   {
	   var Key
	   var KeyCode
	   var stValidos = "0123456789";
       
       if (isNav)
          { 
             Key = String.fromCharCode( event.which ); 
             KeyCode = event.which;
          }
       else
          { 
             Key = String.fromCharCode( event.keyCode ); 
             KeyCode = event.keyCode;
          }

       if ( stValidos.indexOf( Key ) == -1 )
          {
             return false;
          }

       if ( (KeyCode == 13) || ((ActualObject.value.length) == (itLength)))
	 {
            if (NextObject.value == null)
               {
                  return false;
              }
		NextObject.focus()
         }
          return true;
   }

function VCharacter()
   {
      var Key
      var KeyCode
      var strValidos = "abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ";

      if (isNav)
         { 
            Key = String.fromCharCode( event.which ); 
            KeyCode = event.which;
         }
      else
         { 
            Key = String.fromCharCode( event.keyCode ); 
            KeyCode = event.keyCode;
         }
 
      if ( strValidos.indexOf( Key ) == -1 )
         {
            return false;
         }
      return true;
   }

function VAlfa(NextObject)
   {
	   var Key;
	   var KeyCode;
       var stValidos = "abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ0123456789@,;.-_ ãÃõÕáÁàÀéÉèÈíÍìÌóÓòÒúÚùÙçÇüÜâÂêÊôÔ?!";
       
       if (isNav)
          { 
             Key = String.fromCharCode( event.which ); 
             KeyCode = event.which;
          }
       else
          { 
             Key = String.fromCharCode( event.keyCode ); 
             KeyCode = event.keyCode;
          }

       if ( KeyCode == 13 )
         {
            AutoSkip(NextObject);
         }
         
       if ( stValidos.indexOf( Key ) == -1 )
          {
             return false;
          }
       return true;
   }
   

function Popup(sURL, sName, iWidth, iHeight)
   {  
      var splash;
      splash = null;
      
      splash = window.open(sURL, sName,"status=no,scrollbars=yes,toolbar=no,location=0,directories=0,menubar=no,resizable=0,width=" + iWidth + ",height=" + iHeight + ",top=0,left=15");
      
      if (splash != null)
         {
            splash.location.href = sURL;
         }
   }



function Mensagem (stMensagem)
   {
      window.alert(stMensagem);
   }

function ClearFields(ObjectName)
   {
      ObjectName.value = "";
      return true;
   }
   
function mouse(mousebutton) {
	var msg = "Desculpe! Botão direito desabilitado."; //Definir a mensagem aqui
	if ((navigator.appName == 'Netscape') && (mousebutton.which == 1)) {
		alert(msg);
		return false;
	} else if ((navigator.appName == 'Microsoft Internet Explorer') &&
		(event.button == 2)) {
		alert(msg);
		return false;
	}
	return true;
}
//document.onmousedown = mouse;


