function fontMais(){
	var obj = document.getElementById("textoSecao");
	if (obj.style.fontSize==""){obj.style.fontSize="12px"};
	if (obj.style.fontSize=="10px"){obj.style.fontSize = "12px";}
	else if (obj.style.fontSize=="12px"){obj.style.fontSize = "15px";}
	else if (obj.style.fontSize=="15px"){obj.style.fontSize = "17px";}
	else if (obj.style.fontSize=="17px"){obj.style.fontSize = "19px";}
	else if (obj.style.fontSize=="19px"){obj.style.fontSize = "21px";}
}
function fontMenos(){
	var obj = document.getElementById("textoSecao");
	if (obj.style.fontSize==""){obj.style.fontSize="12px"};
	if (obj.style.fontSize=="21px"){obj.style.fontSize = "19px";}
	else if (obj.style.fontSize=="19px"){obj.style.fontSize = "17px";}
	else if (obj.style.fontSize=="17px"){obj.style.fontSize = "15px";}
	else if (obj.style.fontSize=="15px"){obj.style.fontSize = "12px";}
	else if (obj.style.fontSize=="12px"){obj.style.fontSize = "10px";}
}
function popup(url, w, h)
{
var width = w;
var height = h;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=yes';
params += ', scrollbars=yes';
params += ', status=no';
params += ', toolbar=no';
var newwin = window.open(url,'CRA',params);
if (window.focus) { newwin.focus() }
return false;
}

function popup2(url,destino,largura,altura) {
	alert('11');
	esquerda = (screen.width - largura)/2;
	topo = (screen.height - altura)/2;
	if (topo > 0 ) {
		topo = topo - 3;
	}
	settings='name=CRA,width='+largura+',height='+altura+',top='+topo+',left='+ esquerda +',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no, modal=yes'; 			

	
	//window.open(url,destino,settings);
	//window.showModalDialog(pUrl, pArguments, pFeatures);
	if (window.showModalDialog) {
		settings=	"dialogWidth:" + largura + "px;dialogHeight:" + altura + "px;help:no;scroll:yes;status:no";
		return window.showModalDialog(url, self,settings);
	} else {
		try {
			netscape.security.PrivilegeManager.enablePrivilege( "UniversalBrowserWrite");
			window.open(url, destino,settings);
		}
		catch (e) {
			alert("Script não confiável, não é possível abrir janela modal.");
		}
	}
}
function doDestacaTexto(Texto, termoBusca){
	
	/*******************************************************************/
	// CASO QUEIRA MODIFICAR O ESTILO DA MARCAÇÃO ALTERE ESSAS VARIÁVEIS
	/*******************************************************************/
	inicioTag = "<font style='color:#000;background-color:#FFFF80'><b>";
	fimTag = "</b></font>";
	
	var novoTexto = "";
	var i = -1;
	var lcTermoBusca = termoBusca.toLowerCase();
	var lcTexto = Texto.toLowerCase();

	while (Texto.length > 0){
		i = lcTexto.indexOf(lcTermoBusca, i+1);
		if (i < 0){
			novoTexto += Texto;
			Texto = "";
		}
		else{
			if (Texto.lastIndexOf(">", i) >= Texto.lastIndexOf("<", i)){
				if (lcTexto.lastIndexOf("/script>", i) >= lcTexto.lastIndexOf("<script", i)){
					novoTexto += Texto.substring(0, i) + inicioTag + Texto.substr(i, termoBusca.length) + fimTag;
	  				Texto = Texto.substr(i + termoBusca.length);
					lcTexto = Texto.toLowerCase();
	  				i = -1;
				}
			}
		}
	}
	return novoTexto;
}

function doDestacaTextoBusca(textoBusca, textoObj, ehFrase){
	if (ehFrase){arrayBusca=[textoBusca];}
	else{arrayBusca = textoBusca.split(" ");}

	var Texto = textoObj.innerHTML;

	for (var i = 0; i < arrayBusca.length; i++){Texto = doDestacaTexto(Texto, arrayBusca[i]);}
	textoObj.innerHTML = Texto;
	return true;
}
function alterarBanner() {
  	document.getElementById('banners').innerHTML =  "<a href=" + vetLink[idBanner] + "><img  border=0 src=" + vetImagem[idBanner] + ">";
	document.getElementById('bannersLegenda').innerHTML = vetLegenda[idBanner];

  	idBanner += 1;	
  	if(idBanner  >= vetImagem.length   ) idBanner= 0;

  	
   window.setTimeout("alterarBanner();", 3000);
}
function navegacao(destino){
	form = document.forms('frmControle');
	form.acao.value=destino;
	form.submit();
}

function formatar(src, mask,event) {
	 var i = src.value.length;
	 var saida = mask.substring(i,i+1);
	 var ascii = event.keyCode;
	 if (saida == "A") {
	  if ((ascii >=97) && (ascii <= 122)) { 
	  	event.keyCode -= 32;
	  }else {
	  	event.keyCode = 0;
	  }
	}else if (saida == "0") {
  if ((ascii >= 48) && (ascii <= 57)) { return }
  else { event.keyCode = 0 }
 } else if (saida == "#") {
  return;
 } else {
  src.value += saida;
  i += 1
  saida = mask.substring(i,i+1);
  if (saida == "A") {
   if ((ascii >=97) && (ascii <= 122)) { event.keyCode -= 32; }
   else { event.keyCode = 0; }
  } else if (saida == "0") {
   if ((ascii >= 48) && (ascii <= 57)) { return }
   else { event.keyCode = 0 }
  } else { return; }
 }
}

//Verifica qual o browser do visitante e armazena na variável púbica clientNavigator,   
//Caso Internet Explorer(IE) outros (Other)   
if (navigator.appName.indexOf('Microsoft') != -1){   
    clientNavigator = "IE";   
}else{   
    clientNavigator = "Other";   
}   


function Bloqueia_Caracteres(evnt){   
//Função permite digitação de números   
    if (clientNavigator == "IE"){   
        if (evnt.keyCode < 48 || evnt.keyCode > 57){   
            return false   
        }   
    }else{   
        if ((evnt.charCode < 48 || evnt.charCode > 57) && evnt.keyCode == 0){   
            return false   
        }   
    }   
}   


