/*************************************************
@ Ficheiro:  js/ajax_carregar_XML.js
@ Criado em: 18-JUN-2007
@ Autor:     =IceBurn= [geral@jrfreelancer.com]
**************************************************/ 
function ajax_carregar_XML(url) { 

 try { 
   req = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); 
 }  

 catch (e) { 
  alert("Erro: Não foi possivel carregar a página"); 
 }

 req.onreadystatechange = function() { 
    
  if ((req.readyState == 4) && (req.status == 200)) { 
	 
   resposta = req.responseXML.documentElement; 
   
   metodo    = resposta.getElementsByTagName('metodo')[0].firstChild.data; 
   resultado = resposta.getElementsByTagName('resultado')[0].firstChild.data; 
   
   eval(metodo + '(resultado)'); 
    
  } 
   
 } 
 
req.open("GET", url, true); 
req.send(null); 
}