   var xmlhttp = false;
   try {
     xmlhttp = new XMLHttpRequest();
   } catch (trymicrosoft) {
     try {
       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (othermicrosoft) {
       try {
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (failed) {
         xmlhttp = false;
       }  
     }
   }

   if (!xmlhttp)
     alert("Error initializing XMLHttpRequest!");	




function mostra_foto(id, url){

    //Obtém o objeto HTML
    objetoHTML=document.getElementById(id);

    //Exibe "Carregando..."
   objetoHTML.innerHTML="<img src=\"img/loading_barra.gif\" />";

	var previneCache = new Date().getTime(); 
	url=url+"&previnecache="+previneCache;
    //Abre a conexão
    xmlhttp.open("GET",url, true);

    //Função para tratamento do retorno
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4){
            //Mostra o HTML recebido

			retorno=unescape(xmlhttp.responseText.replace(/\+/g," "))
            objetoHTML.innerHTML=retorno;
        }
    }
    //Executa
    xmlhttp.send(null)
}

