<!--
/*
<script src="/js/xml.js" type="text/javascript"></script>
<script type="text/javascript">

var ejemplo;
function xml_procesa_ejemplo() { xml_procesa('ejemplo'); }

function xml_devuelve_ejemplo(valor)
{
	alert('Devuelve: ' + valor);
}
function xml_cargando_ejemplo()
{
	alert('Cargando');
}
function xml_error_ejemplo(valor)
{
	alert('Error: ' + valor);
}
xml_leer('archivo.php', 'ejemplo');
</script>

**********************************************
******** DESARROLLADO POR SRTK.COM ***********
**********************************************
*/


function xml_leer(url, nombre_variable) {
	eval('xml_cargando_'+nombre_variable+'(); if (window.XMLHttpRequest) { '+nombre_variable+' = new XMLHttpRequest(); '+nombre_variable+'.onreadystatechange = xml_procesa_'+nombre_variable+'; '+nombre_variable+'.open("GET", url, true); '+nombre_variable+'.send(null);     } else if (window.ActiveXObject) { isIE = true; try { '+nombre_variable+' = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { '+nombre_variable+' = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { '+nombre_variable+' = false; } } if ('+nombre_variable+') { '+nombre_variable+'.onreadystatechange = xml_procesa_'+nombre_variable+'; '+nombre_variable+'.open("GET", url, true); '+nombre_variable+'.send(); } } ');
}

function xml_procesa(nombre_variable)
{
    eval('if ('+nombre_variable+'.readyState == 4) { if ('+nombre_variable+'.status == 200) { muestraDocumento(nombre_variable); }  else { xml_error_'+nombre_variable+'("Problemas para cargar el documento solicitado:" + '+nombre_variable+'.statusText); } } ');
}

function muestraDocumento(nombre_variable)
{
	eval('var doc = '+nombre_variable+'.responseText; xml_devuelve_'+nombre_variable+'(doc);');
}
-->