try{
   xmlhttp = new XMLHttpRequest();
}catch(ee){
   try{
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   }catch(e){
      try{
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      }catch(E){
         xmlhttp = false;
      }
   }
}
 
window.onload = function(){
   url = "apps/php/cotacao_dopar.php";// AQUI VOCÊ ESPECIFICA O CAMINHO DO ARQUIVO
   xmlhttp.open("GET", url, true);
   xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4){
         eval(xmlhttp.responseText);
         c = new Array()
         c[1] = resultadoCEP['dolar_comercial_compra'];
         c[2] = resultadoCEP['dolar_comercial_venda'];
         c[3] = resultadoCEP['dolar_paralelo_compra'];
         c[4] = resultadoCEP['dolar_paralelo_venda'];

 
         for(i=1; i<=4; i++)
         {
            document.getElementById("c"+i).innerHTML = c[i];
         }
      }
   }
   xmlhttp.send(null)
}	
