    var isNN = (navigator.appName.indexOf("Netscape")!=-1);
     function AbreJanela(theURL,winName) 
   	 {
   		window.open(theURL,winName,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,menubar=no,width=790,height=500,left=0,top=5');
   	 }  
    function autoTab(input,len, e)
	{
		var keyCode = (isNN) ? e.which : e.keyCode;
		var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
		if(input.value.length >= len && !containsElement(filter,keyCode))
		{
			input.value = input.value.slice(0, len);
			input.form[(getIndex(input)+1) % input.form.length].focus();
		}
		function containsElement(arr, ele)
		{
			var found = false, index = 0;
			while(!found && index < arr.length)
			if(arr[index] == ele)
				found = true;
			else
				index++;
			return found;
		}
		function getIndex(input)
		{
			var index = -1, i = 0, found = false;
			while (i < input.form.length && index == -1)
				if (input.form[i] == input)index = i;
				else i++;
			return index;
		}
		return true;
	}
	function verfonte()
	{
		if (event.button==2)
		{
			window.alert('Clique em Ok, para continuar.')
		}
	}
	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	function ApresentaJanela(Obj)
	{
		var Dir = document.all[Obj]; 
		Dir.style.visibility ="visible";
	}
	function FechaJanela(Obj)
	{
		var Dir = document.all[Obj]; 
		Dir.style.visibility ="hidden";
	}
	
	MM_reloadPage(true);
	document.onmousedown=verfonte
	
	function valida_arquivo(obj){
         len = obj.value.length;
		 for (x = 0;x <= len;x++){
			 if (obj.value.charAt(x) == 'ç' || obj.value.charAt(x) == 'á'  || obj.value.charAt(x) == 'é'  || obj.value.charAt(x) == 'í'  || obj.value.charAt(x) == 'ó'  || obj.value.charAt(x) == 'ú'  || obj.value.charAt(x) == 'â' || obj.value.charAt(x) == 'ê' || obj.value.charAt(x) == 'ô' || obj.value.charAt(x) == 'ã' || obj.value.charAt(x) == 'õ' || obj.value.charAt(x) == 'à' || obj.value.charAt(x) == 'Ç' || obj.value.charAt(x) == 'Á'  || obj.value.charAt(x) == 'É'  || obj.value.charAt(x) == 'Í'  || obj.value.charAt(x) == 'Ó'  || obj.value.charAt(x) == 'Ú'  || obj.value.charAt(x) == 'Â' || obj.value.charAt(x) == 'Ê' || obj.value.charAt(x) == 'Ô' || obj.value.charAt(x) == 'Ã' || obj.value.charAt(x) == 'Õ' || obj.value.charAt(x) == 'À' || obj.value.charAt(x) == 'º' || obj.value.charAt(x) == 'ª' || obj.value.charAt(x) == '§' || obj.value.charAt(x) == '¹' || obj.value.charAt(x) == '²' || obj.value.charAt(x) == '£' || obj.value.charAt(x) == '¢' || obj.value.charAt(x) == '¬'){
				alert("Nome de Arquivo Inválido.");
				return false;
			}
		 }
     return true;
    }
	
	function exibeEsconde(obj1,obj2)
	{
		document.getElementById(obj1).style.visibility = "visible";
		document.getElementById(obj2).style.visibility = "hidden";
	}
	
	function exibe(obj1)
	{
            document.getElementById(obj1).style.display = "block";
	}

	function esconde(obj1)
	{
            document.getElementById(obj1).style.display = "none";
	}
