
function getXmlhttp(){
	var xmlhttp;
	try{
		xmlhttp = new XMLHttpRequest();
	}catch(ee){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(E){
				xmlhttp = false;
			}
		}
	}
	return xmlhttp;
}

function carregaAjax(url, container){
	container.innerHTML = "<img src='images/loading.gif'>"
	var xmlhttp = getXmlhttp();
    xmlhttp.open("GET", url,true);
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4){
            var texto=xmlhttp.responseText;
			texto=texto.replace(/\+/g," ")
            texto=unescape(texto);
			container.innerHTML = texto
        }
    }
    xmlhttp.send(null)
}













