//permite somente a digitação de caracteres numericos no campo. CROSSBROWSER!function numbers(evt){	var key_code = evt.keyCode  ? evt.keyCode  :				   evt.charCode ? evt.charCode :				   evt.which    ? evt.which    : void 0;	// Habilita teclas <DEL>, <TAB>, <ENTER>, <ESC> e <BACKSPACE>	if (key_code == 8  ||  key_code == 9  ||  key_code == 13  ||  key_code == 27  ||  key_code == 46)	{		return true;	}	// Habilita teclas <HOME>, <END>, mais as quatros setas de navegação (cima, baixo, direta, esquerda)	else if ((key_code >= 35)  &&  (key_code <= 40))	{		return true	}	// Habilita números de 0 a 9	else if ((key_code >= 48)  &&  (key_code <= 57))	{		return true	}	return false;}function FormataCpf(campo, teclapres)			{				var tecla = teclapres.keyCode;				var vr = new String(campo.value);				vr = vr.replace(".", "");				vr = vr.replace("/", "");				vr = vr.replace("-", "");				tam = vr.length + 1;				if (tecla != 14)				{					if (tam == 4)						campo.value = vr.substr(0, 3) + '.';					if (tam == 7)						campo.value = vr.substr(0, 3) + '.' + vr.substr(3, 6) + '.';					if (tam == 11)						campo.value = vr.substr(0, 3) + '.' + vr.substr(3, 3) + '.' + vr.substr(7, 3) + '-' + vr.substr(11, 2);				}			}function escolha(opt) {   switch(opt) {      case 'home': window.location="index.asp";break;      case 'acoes': window.location="acoes/acoes.asp";break;      case 'noticias': window.location="noticias/index.asp";break;      case 'convenios': window.location="convenios/todos.asp";break;      case 'espacocultural': window.location="http://www.anajustra.org.br/espacocultural/";break;      case 'servidorestrada': window.location="http://www.anajustra.org.br/servidornaestrada/";break;     }}function escolha_int(opt) {   switch(opt) {      case 'home': window.location="../index.asp";break;      case 'acoes': window.location="../acoes/acoes.asp";break;      case 'noticias': window.location="../noticias/index.asp";break;      case 'convenios': window.location="../convenios/todos.asp";break;      case 'espacocultural': window.location="http://www.anajustra.org.br/espacocultural/";break;      case 'servidorestrada': window.location="http://www.anajustra.org.br/servidornaestrada/";break;     }}function escolha_conv(id) {	window.location="convenio.asp?convenios="+id+"&id="+id;}function escolha_estado(uf) {	window.location="estado.asp?estado="+uf;}						function RedPopUp(w, h) {	if (navigator.appName == "Microsoft Internet Explorer") {		w = parseInt(w) + 10;		h = parseInt(h) + 48;	} else {		w = parseInt(w) + 6;		h = parseInt(h) + 49;	};	// IE 7	var nversao = navigator.appVersion;	var nresult = nversao.search(/\bMSIE 7.0\b/g);	if (nresult > 0) {		h = parseInt(h) + 28;	};	//	window.resizeTo(w, h);	LeftPosition =  parseInt((screen.width) ? (screen.width-w)/2 : 0);	TopPosition =  parseInt((screen.height) ? (screen.height-h)/2 : 0);	window.moveTo(LeftPosition,TopPosition);	window.focus();}function MM_displayStatusMsg(msgStr) { //v1.0  status=msgStr;  document.MM_returnValue = true;}function MM_goToURL() { //v3.0  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");}function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}// REDIMENSIONA AS IMAGENS CASO SEJAM MAIORES QUE A LARGURA PERMITIDA DO SITE// ----------------------------------------------------------------------------window.onload = function() {	RedimensionaImagens(460);}function RedimensionaImagens(tamanhoimg) {  var obj = document.getElementsByTagName("div");  for(var i = 0;i<obj.length;i++) {    if (obj[i].className == "imgstyle") {      var img = obj[i].getElementsByTagName("img");      if (img[0].width > tamanhoimg) { obj[i].innerHTML = '<img src="' + img[0].src + '" width="'+ tamanhoimg +'">' + '<br><a href="' + img[0].src + '" target="_blank">Veja a imagem no tamanho original</a>'; }    }  }}// ----------------------------------------------------------------------------// FUNÇÃO PARA EXIBIÇÃO DE FLASHS// ----------------------------------------------------------------------------function ExibeFlash(w,h,wmode,movie) {	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'">');	document.write('<param name="wmode" value="'+wmode+'"/>');	document.write('<param name="quality" value="high"/>');	document.write('<param name="movie" value="'+movie+'"/>');	document.write('<embed src="'+movie+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="'+wmode+'" width="'+w+'" height="'+h+'"></embed>');	document.write('</object>');}// ----------------------------------------------------------------------------// FUNÇÃO DE CONVERSÃO DE MAIUSCULAS/MINUSCULAS// ----------------------------------------------------------------------------function smallCaps(obj, type) {		type = ((typeof type != "number") || (type > 3) || (type < 1)) ? 3 : type;		var except = ['de','do','da','das','dos','em'];		var tam = obj.value.length;		var txt = obj.value;		switch (type) {			case 1: txt = txt.toLowerCase(); break;			case 2: txt = txt.toUpperCase(); break;			case 3: if (tam > 0) {								txt = txt.toLowerCase().split(' ');								for (var x = 0; x < txt.length; x++)									if (!inArray(txt[x],except) && (txt[x].length > 1))										txt[x] = txt[x].substring(0,1).toUpperCase() + txt[x].substring(1,txt[x].length);								txt = txt.join(' ');							}; break;		};		obj.value = txt;}function inArray(txt, array) {	var ret = false;	for (var x=0; x<array.length; x++)		if (array[x] == txt)			ret = true;	return ret;}// ----------------------------------------------------------------------------// FUNÇÃO DE ABERTURA DE POPUP CENTRALIZADO// ----------------------------------------------------------------------------var win = null;function NewWindow(mypage,myname,w,h,scroll){	LeftPosition = parseInt((screen.width) ? (screen.width-w)/2 : 0);	TopPosition = parseInt((screen.height) ? (screen.height-h)/2 : 0);	settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',noresizable,status=yes'	win = window.open(mypage,myname,settings)}// ----------------------------------------------------------------------------// FUNÇÃO QUE REDIMENSIONA JANELA POPUP// ----------------------------------------------------------------------------function Redimensiona(w, h) {	//Corrige o tamanho da janela	if (navigator.appName == "Microsoft Internet Explorer") {		w = parseInt(w) + 10;		h = parseInt(h) + 48;	} else {		w = parseInt(w) + 6;		h = parseInt(h) + 49;	};	// IE 7	var nversao = navigator.appVersion;	var nresult = nversao.search(/\bMSIE 7.0\b/g);	if (nresult > 0) {		h = parseInt(h) + 28;	};	//	window.resizeTo(w, h);	LeftPosition =  parseInt((screen.width) ? (screen.width-w)/2 : 0);	TopPosition =  parseInt((screen.height) ? (screen.height-h)/2 : 0);	window.moveTo(LeftPosition,TopPosition);	window.focus();}// ----------------------------------------------------------------------------// TRABALHA COM COOKIES// ----------------------------------------------------------------------------function getCookieVal(inicio) {	var fim = document.cookie.indexOf(";", inicio);	if (fim == -1) fim = document.cookie.length;	return unescape(document.cookie.substring(inicio, fim));}function getCookie(label) {	var arg = label + "=";	var alen = arg.length;	var clen = document.cookie.length;	var i = 0;	while (i < clen) {		var j = i + alen;		if (document.cookie.substring(i,j) == arg) return getCookieVal(j);		i = document.cookie.indexOf(" ", i) + 1;		if (i == 0) break;	}	return null;}function setCookie(label, valor, expires) {	document.cookie = label + "=" + escape(valor) + 		((expires) ? "; expires=" + expires.toGMTString() : "");}function delCookie(label) {	if (getCookie(label)) {		document.cookie = label + "=; expires=Thu, 01-Jan-70 00:00:01 GMT";	}}// ----------------------------------------------------------------------------// ALTERA COR DE UM OBJETO// ----------------------------------------------------------------------------function mudacor(prmThis,prmName)	{	if ((window.document.all) || (window.document.getElementById))		prmThis.className = prmName;	else if (window.document.layers)		prmThis.className = prmName;}// JUMP MENU// ----------------------------------------------------------------------------function MM_jumpMenu(targ,selObj,restore){ //v3.0  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}// MENSAGEM NA BARRA DE STATUS// ----------------------------------------------------------------------------function MM_displayStatusMsg(msgStr) { //v1.0  status=msgStr;  document.MM_returnValue = true;}//===============================================================================//= FORMULÁRIOS E BUSCAS ========================================================//===============================================================================var tipo = 0;function FaleConosco() {	tipo = 1;	document.form1.action = "faleconosco_bd.asp";	document.form1.method = "post";}function Chamadas() {	tipo = 2;	document.form1.action = "../chamadas/inserir_action.asp";	document.form1.method = "post";}function Busca() {	tipo = 3;	document.form1.action = "";	document.form1.method = "get";}function Busca3() {	tipo = 31;	document.form2.action = "";	document.form2.method = "get";}function Busca4() {	tipo = 32;	document.form2.action = "";	document.form2.method = "get";}function Cadastrese() {	tipo = 4;	document.form1.action = "inserir_int.asp";	document.form1.method = "post";}function PPCad() {	tipo = 5;	document.form1.action = "cadastre_se/inserir.asp";	document.form1.method = "post";}function INTCad() {	tipo = 6;	document.form1.action = "../cadastre_se/inserir_int.asp";	document.form1.method = "post";}function Permuta() {	tipo = 7;	document.form1.action = "mail.asp";	document.form1.method = "post";}function Newsletter() {	tipo = 8;	document.form1.action = "cadastrar.asp";	document.form1.method = "post";}function Busca2() {	tipo = 9;	document.form1.action = "";	document.form1.method = "get";}function Filiacao() {	tipo = 10;	document.form1.action = "inserir_action.asp";	document.form1.method = "post";}function VFiliacao() {  if (!document.form1.nome.value) { alert("Por favor, informe seu nome."); document.form1.nome.focus(); return false; };  if (!document.form1.cpf.value) { alert("Por favor, informe seu cpf."); document.form1.cpf.focus(); return false; };  if (!document.form1.data_nascimento.value) { alert("Por favor, informe sua data de nascimento."); document.form1.data_nascimento.focus(); return false; };  if (!document.form1.celular.value) { alert("Por favor, informe seu celular."); document.form1.celular.focus(); return false; };  if (!VEmail( document.form1.email.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.form1.email.focus(); return false; };  if (document.form1.cargo.value == '-') { alert("Por favor selecione o cargo."); document.form1.cargo.focus(); return false; };  document.form1.submit();  return true;}function VPermuta() {  if (!VEmail( document.form1.emailbuscar.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.form1.emailbuscar.focus(); return false; };  return true;}function VNewsletter() {  if (!document.form1.nome.value) { alert("Por favor, informe seu nome."); document.form1.nome.focus(); return false; };  if (!VEmail( document.form1.email.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.form1.email.focus(); return false; };  return true;}function VFaleConosco() {  if (!document.getElementById("nome").value) { alert("Por favor, informe seu nome."); document.getElementById("nome").focus(); return false; };  if (!document.getElementById("telefone").value) { alert("Por favor, informe o telefone de contato."); document.getElementById("telefone").focus(); return false; };   if (!document.getElementById("email").value){ alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.getElementById("email").focus(); return false; };  if (!document.getElementById("uf").value) { alert("Por favor, escolha o estado."); document.getElementById("uf").focus(); return false; };   if (!document.getElementById("lotacao").value) { alert("Por favor, informe sua lotação."); document.getElementById("lotacao").focus(); return false; };      if (!document.getElementById("areareclam").value) { alert("Por favor, escolha a área a direcionar o contato."); document.getElementById("areareclam").focus(); return false; };  if (!document.getElementById("cidade").value) { alert("Por favor, informe a cidade."); document.getElementById("cidade").focus(); return false; };  if (!document.getElementById("assunto").value) { alert("Você deve descrever um assunto."); document.getElementById("assunto").focus(); return false; };  if (!document.getElementById("mensagem").value) { alert("Você deve escrever a mensagem."); document.getElementById("mensagem").focus(); return false; };  return true;}function VCadastrese() {  if (!document.form1.nome_int.value) { alert("Por favor, informe seu nome."); document.form1.nome_int.focus(); return false; };  if (!document.form1.telefone_int.value) { alert("Por favor, informe seu telefone."); document.form1.telefone_int.focus(); return false; };  if (!document.form1.cidade_int.value) { alert("Por favor, informe sua cidade."); document.form1.cidade_int.focus(); return false; };  if (!VEmail( document.form1.email_int.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.form1.email_int.focus(); return false; };  return true;}function VPPCad() {  if (!document.form1.nome_capa.value) { alert("Por favor, informe seu nome."); document.form1.nome_capa.focus(); return false; };  if (!VEmail( document.form1.email_capa.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.form1.email_capa.focus(); return false; };  return true;}function VINTCad() {  if (!document.form1.nome_int.value) { alert("Por favor, informe seu nome."); document.form1.nome_int.focus(); return false; };  if (!VEmail( document.form1.email_int.value)) { alert("O seu e-mail não é válido!\nVerifique-o novamente."); document.form1.email_int.focus(); return false; };  return true;}function VBusca() {	if (!(document.form1.busca.value.length > 1)) { alert("Informe um número maior de caracteres para busca."); document.form1.busca.focus(); return false; };	return true;}function VBusca2() {	if (!(document.form1.busca.value.length > 1)) { alert("Informe um número maior de caracteres para busca."); document.form1.busca.focus(); return false; };	return true;}function VBusca3() {	if (!(document.form2.busca.value.length > 1)) { alert("Informe um número maior de caracteres para busca."); document.form2.busca.focus(); return false; };	return true;}function VBusca4() {	if (!(document.form2.busca.value.length > 1)) { alert("Informe um número maior de caracteres para busca."); document.form2.busca.focus(); return false; };	return true;}function VBuscaVeic() {	if ((document.form1.veiculo.value.length < 3) && (document.form1.ano.value == "-") && (document.form1.valor.value == "-")) { alert("É necessário informar ao menos um critério para a busca."); document.form1.veiculo.focus(); return false; }		return true;}function EnviaFormulario() {	switch(tipo) {		case 1: return VFaleConosco(); break;		case 2: return VChamadas(); break;		case 3:	if (VBusca()) { document.location.href="noticias/busca.asp?busca=" + document.form1.busca.value; } break;		case 4: return VCadastrese(); break;		case 5: return VPPCad(); break;		case 6: return VINTCad(); break;		case 7: return VPermuta(); break;		case 8: return VNewsletter(); break;		case 9:	if (VBusca2()) { document.location.href="../noticias/busca.asp?busca=" + document.form1.busca.value; } break;		case 31:	if (VBusca3()) { document.location.href="noticias/busca.asp?busca=" + document.form2.busca.value; } break;		case 32:	if (VBusca4()) { document.location.href="../noticias/busca.asp?busca=" + document.form2.busca.value; } break;	}	return false;}//===============================================================================//= MASCARAS ====================================================================//===============================================================================/* 	Mascara para Campos.	"#" - Numeros	"A" - Letras UpperCase	"a" - Letras LowerCase	"Z" - Letras	"*" - Qualquer Caracter	"/", ".", "-", " ", ":" - Caracteres Fixos	USO:	somente números		onKeyPress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;"				onKeyUp="mascara_hora(this.value)"*/function Mascara(objeto, evt, mask) {	var LetrasU = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';	var LetrasL = 'abcdefghijklmnopqrstuvwxyz';	var Letras 	= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';	var Numeros = '0123456789';	var Fixos 	= '().-:/ '; 	var Charset = " !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_/`abcdefghijklmnopqrstuvwxyz{|}~";		evt = (evt) ? evt : (window.event) ? window.event : "";	var value = objeto.value;	if (evt) {		var ntecla = (evt.which) ? evt.which : evt.keyCode;		tecla = Charset.substr(ntecla - 32, 1);		if (ntecla < 32) return true;		var tamanho = value.length;		if (tamanho >= mask.length) return false;		var pos = mask.substr(tamanho,1); 		while (Fixos.indexOf(pos) != -1) {			value += pos;			tamanho = value.length;			if (tamanho >= mask.length) return false;			pos = mask.substr(tamanho,1);		}		switch (pos) {				case '#' : if (Numeros.indexOf(tecla) == -1) return false; break;				case 'A' : if (LetrasU.indexOf(tecla) == -1) return false; break;				case 'a' : if (LetrasL.indexOf(tecla) == -1) return false; break;				case 'Z' : if (Letras.indexOf(tecla) == -1) return false; break;				case '*' : objeto.value = value; return true; break;				default : return false; break;		}	}	objeto.value = value; 	return true;}/// SOMENTE NÚMEROS// ----------------------------------------------------------------------------function trimToDigits(string) {	s = "";	var Numeros = /\d/;	for (i = 0; i <= string.length; i++) 		if (Numeros.test(string.substr(i,1))) s += string.substr(i,1);	return s;	}/// VERIFICA E-MAIL// ----------------------------------------------------------------------------function VEmail( strEmail ) {     var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;     return (filter.test(strEmail));}/// VERIFICA ANO// ----------------------------------------------------------------------------function VAno(ano) {	ano = trimToDigits(ano);	return ((parseInt(ano) < 1900) || (ano.length != 4) || (parseInt(ano) > 2050)) ? false : true; }/// VERIFICA MÊS// ----------------------------------------------------------------------------function VMes(mes) {	mes = trimToDigits(mes);	return ((mes.length != 2) || (parseInt(mes) < 1) || (parseInt(mes) > 12)) ? false : true; }/// VERIFICA MÊS/ANO// ----------------------------------------------------------------------------function VMesAno(data) {	data = trimToDigits(data);	if (data.length < 6) return false;	mes = data.substr(0,2);	ano = data.substr(2,4);	return (!VAno(ano) || !VMes(mes)) ? false : true;}/// VERIFICA DATA// ----------------------------------------------------------------------------function VData(data) {	data = trimToDigits(data);	if (data.length < 8) return false;	dia = data.substr(0,2);	mes = data.substr(2,2);	ano = data.substr(4,4);		if(ano >= 0 && ano < 1900) return false; 	if(ano > 2100 || ano < 0 || mes > 12 || mes < 1) return false; 	numero = ((parseInt(ano) - 1884) / 4) 	dias = (numero == Math.floor(numero)) ? "312931303130313130313031" : "312831303130313130313031"; 	diamax = parseInt(dias.substring((mes - 1) * 2, ((mes - 1) * 2) + 2)); 	if(dia < 1 || dia > diamax) return false; 			return true;}/// VERIFICA CPF// ----------------------------------------------------------------------------function VCPF(cpf) {	cpf = trimToDigits(cpf);	if (cpf.length < 11) return false;	valor = true;	if (cpf == "00000000000" || cpf == "11111111111" || 			cpf == "22222222222" || cpf == "33333333333" || 			cpf == "44444444444" || cpf == "55555555555" || 			cpf == "66666666666" || cpf == "77777777777" || 			cpf == "88888888888" || cpf == "99999999999") return false;	var a = [];	var b = new Number;	var c = 11;	for (i = 0; i < 11; i++) {		a[i] = cpf.charAt(i);		b = (i < 9) ? b + (a[i] *  --c) : b;	}		a[9] = ((x = b % 11) < 2) ? 0 : 11 - x;	b = 0;	c = 11;	for (y = 0; y < 10; y++) b += (a[y] *  c--); 	a[10] = ((x = b % 11) < 2) ? 0 : 11 - x;	return (cpf.charAt(9) == a[9]) && (cpf.charAt(10) == a[10]);}	/// VERIFICA CNPJ// ----------------------------------------------------------------------------function VCNPJ(cnpj) {	cnpj = trimToDigits(cnpj);	if (cnpj.length < 14) return false;	m2 = 2;			soma1 = 0;	soma2 = 0;	for ( i = 11; i >= 0; i--) {		val = eval(cnpj.charAt(i));		m1 = m2;		if (m2 < 9) { m2++ }	 	else { m2 = 2 }		soma1 = soma1 + (val * m1)		soma2 = soma2 + (val * m2)  }	soma1 = soma1 % 11	if (soma1 < 2) { d1 = 0 }  else { d1 = 11 - soma1}	soma2 = (soma2 + (2 * d1)) % 11	if (soma2 < 2) { d2 = 0 }  else { d2 = 11 - soma2}	return (cnpj.charAt(12) == d1) && (cnpj.charAt(13) == d2);}function MaskCNPJ(objeto, evt) { 	return Mascara(objeto, evt, '##.###.###/####-##');}function MaskAno(objeto, evt) { 	return Mascara(objeto, evt, '####');}function MaskMesAno(objeto, evt) { 	return Mascara(objeto, evt, '##/####');}function MaskCEP(objeto, evt) { 	return Mascara(objeto, evt, '##.###-###');}function MaskTelefone(objeto, evt) { 	return Mascara(objeto, evt, '(##) ####-####');}function MaskCPF(objeto, evt) { 	return Mascara(objeto, evt, '###.###.###-##');}function MaskData(objeto, evt) { 	return Mascara(objeto, evt, '##/##/####');}function MaskData2(objeto, evt) { 	return Mascara(objeto, evt, '##/##/##');}function MaskHora(objeto, evt) { 	return Mascara(objeto, evt, '##:##');}function MaskHora2(objeto, evt) { 	return Mascara(objeto, evt, '##:##:##');}function EscondeCat(id) {	document.getElementById(id).style.display = (document.getElementById(id).style.display == 'none') ? '' : 'none';}function EscondeCarro(id) {	document.getElementById(id).style.display = (document.getElementById(id).style.display == 'none') ? '' : '';}function mudacor(prmThis,prmName)	{	if ((window.document.all) || (window.document.getElementById))		prmThis.className = prmName;	else if (window.document.layers)		prmThis.className = prmName;}//===============================================================================//= INICIA AJAX =================================================================//===============================================================================function ajaxInit() {	var req;		try {		req = new ActiveXObject("Microsoft.XMLHTTP");	} catch(e) {		try {			req = new ActiveXObject("Msxml2.XMLHTTP");		} catch(ex) {			try {				req = new XMLHttpRequest();			} catch(exc) {				alert("Esse browser não tem recursos para uso do Ajax");				req = null;			}		}	}	return req;};function LoadAjax(metodo, url, send, destino) {	var ajax = ajaxInit();		if(ajax) {  		if(metodo == "post") {  				ajax.open("POST", url, true);  				ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");  		} else {  				ajax.open("GET", url + "?" + send, false);  		}  						ajax.onreadystatechange = function() { 																if (ajax.readyState == 1) {																	//document.getElementById(destino).innerHTML = 'Carregando...';																}																if (ajax.readyState == 4) {																	if (ajax.status == 200) {																		document.getElementById(destino).innerHTML = unescape(ajax.responseText.replace(/\+/g," "));																	};																}															}  					if(metodo == "post") {  			ajax.send(send);  		} else {  			ajax.send(null);  		}  	}  }function AlterarFoto(codigo, origem) {	var codAnt = document.getElementById('imgGrande').value;	var ajax = ajaxInit();		ajax.open("GET", "exibir-foto-grande.asp?cod=" + codigo, false);  	ajax.send(null);  	returnAjax = unescape(ajax.responseText.replace(/\+/g," ")).split(';');	div1 = document.getElementById('fotoGrandeAjax');	div1.innerHTML='';	img1 = document.createElement('img');	img1.setAttribute('border', '0');	img1.setAttribute('id', 'img1');	img1.src = '../includes/corte.asp?img='+returnAjax[0]+'&corte=4&w1=210&h1=160';	hnd1 = document.createElement('input');	hnd1.setAttribute('name', 'imgGrande');	hnd1.setAttribute('id', 'imgGrande');	hnd1.setAttribute('type', 'hidden');	hnd1.setAttribute('value', codigo);	if (returnAjax[1] == 'true') {		href = document.createElement('a');		href.setAttribute('href', "javascript: NewWindow('exibir-foto.asp?cod="+codigo+"','foto','"+returnAjax[2]+"','"+returnAjax[3]+"','false');");		img1.setAttribute('onMouseOut', "MM_displayStatusMsg(' ');return document.MM_returnValue");		img1.setAttribute('onMouseOut', "MM_displayStatusMsg(' ');return document.MM_returnValue");		img1.setAttribute('onMouseOver', "MM_displayStatusMsg('Ampliar');return document.MM_returnValue");		img1.setAttribute('title', "Clique aqui para ampliar");		img1.setAttribute('alt', "Clique aqui para ampliar");				href.appendChild(img1);		div1.appendChild(href);	} else {		div1.appendChild(img1);	}	div1.appendChild(hnd1);	var ajax = ajaxInit();		ajax.open("GET", "exibir-foto-pequena.asp?cod=" + codAnt + '&origem=' + origem, false);  	ajax.send(null);  	document.getElementById('fotoPequenaAjax'+origem).innerHTML = unescape(ajax.responseText.replace(/\+/g," ")).split(';');}function popup(estado){	window.location="estado.asp?estado="+estado+"";}function validaForm_Estado(){	d = document.busca_estado;	if (d.estado.value == ""){			  alert("Você deve selecionar um estado");			  d.estado.focus();			  return false;	 }	   		   		   		}
