function validaCod()
{
	var strcod=0;
	strcod = document.FormCod.txtcodanuncio.value;
	
	if(strcod=="")
		{alert('Digite o Click Código');}
	else
		{document.FormCod.submit();}
}

function fcmais(event)
{
			idmaissecoes.style.top = 49;
  idmaissecoes.style.left = (screen.width/2)+143;
			
}

function trataAcento(objResp) {   


var strsecao="";
	var strchave="";
	
var varString = new String(objResp.value);   
var stringAcentos = new String("ÄÅÁÂÀÃäáâàãÉÊËÈéêëèÍÎÏÌíîïìÖÓÔÒÕöóôòõÜÚÛüúûùÇç-!'#$%&'()*+\\/:;<->?@^~´`?_|=ªº°[]{}");   
var stringSemAcento = new String("aaaaaaaaaaaeeeeeeeeiiiiiiiioooooooooouuuuuuucc ");   
  
 
var i = new Number();   
var j = new Number();   
var cString = new String();   
var varRes = '';   
	
	
strchave = document.fchave.txtbusca.value;
strsecao = document.fchave.txtsecao.options[document.fchave.txtsecao.selectedIndex].value;

	document.all.txtcatbusca.value="chave";
	
for (i = 0; i < varString.length; i++) {   
	cString = varString.substring(i, i + 1);   
	
for (j = 0; j < stringAcentos.length; j++) {   
	if (stringAcentos.substring(j, j + 1) == cString){   
cString = stringSemAcento.substring(j, j + 1);   
}   
}   
varRes += cString;   
}   

			document.fchave.txtbuscaoculta.value= varRes.toLowerCase();  
	
			
}

function teclaEnterCodigo(oEvent)
{
  var oEvent = (oEvent)? oEvent : event;
  var oTarget =(oEvent.target)? oEvent.target : oEvent.srcElement;
  if(oEvent.keyCode==13)
  	validaBuscaclick();
}

function testRegExpCod(value, re ) {
return new RegExp(re).test(value);
}

function isNumbercod(value,allow_blank) {

return (!allow_blank && value == '') ? false : testRegExpCod(value, '^-?[0-9]*\\.?[0-9]*$');
}


var historico = -1;
function navegacaoHistorico(){
			
			history.go(historico);
}

function pesquisar(value, formulario){
	document.getElementById("txtnumpage").value = value;
	document.getElementById(formulario).submit();
}

function mostraTelefone(id, event){
	for (i=1; i <= 10; i++)
	{
		if (document.getElementById("IDVERTELEFONE"+i) != null) 
			document.getElementById("IDVERTELEFONE"+i).style.display="none";
	}
	document.getElementById(id).style.display="block";
	document.getElementById(id).style.top = event.clientY + document.body.scrollTop ;
    document.getElementById(id).style.left = event.clientX + document.body.scrollLeft ;
}
function hiddenTelefone(id){
	document.getElementById(id).style.display="none";
}
