
//FUNÇÃO EM AJAX
function openAjax() {
var Ajax;
try {Ajax = new XMLHttpRequest();
}catch(ee){
try {Ajax = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try {Ajax = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){Ajax = false;}
}
}
return Ajax;
} 

function ajax_master(getURL, div) {
//document.getElementById(div).style.display = "block";

if(document.getElementById) {
		var exibeResultado = document.getElementById(div);
		var Ajax = openAjax();
		Ajax.open("GET", getURL, true);
		Ajax.onreadystatechange = function(){
			if(Ajax.readyState == 1) {
				exibeResultado.innerHTML = "<center><br><br><br><img src='giff/carregando_ajax.gif'><br><span class='texto_padrao'>carregando...</></center>";
	}
	if(Ajax.readyState == 4) {
		if(Ajax.status == 200) {
			var resultado = Ajax.responseText;
			resultado = resultado.replace(/\+/g,"");
			resultado = unescape(resultado);
			exibeResultado.innerHTML = resultado;
		} else {
			exibeResultado.innerHTML = "Por favor, tente novamente!";
		}
	}
}
	Ajax.send(null);
	}
}
//FINAL AJAX