var url;
var xmlHttp=null;
var loc;

function mostraCitruz(str,local){
loc = local;
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){
alert ("Desculpe. Seu navegador não suporta AJAX!");
return;
}
url=str;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
if (xmlHttp.readyState == 1) {
document.getElementById(loc).innerHTML="<p class='carregando>Carregando...</p>";
}
return url;
}

function stateChanged(){
if (xmlHttp.readyState==4){
document.getElementById(loc).innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject(){
if (window.XMLHttpRequest) {
a=new XMLHttpRequest(); } //Objeto nativo (FF/Safari/Opera7.6+)
else {
try {
a=new ActiveXObject("Msxml2.XMLHTTP"); //activeX (IE5.5+/MSXML2+)
}
catch(e) {
try {
a=new ActiveXObject("Microsoft.XMLHTTP"); //activeX (IE5+/MSXML1)
}
catch(e) { /* O navegador não tem suporte */
a=false;
}
}
}
return a;
}