var docXML;
var docXSL;

//Carga un fichero xml
function xmlToHTML(FileXML, FileXSL){
	try{
		if(window.ActiveXObject){
			//Load XML
			docXML=new ActiveXObject("Microsoft.XMLDOM");
			docXML.async="false";
			docXML.onreadystatechange=verify;
			//Load XSL
			docXSL=new ActiveXObject("Microsoft.XMLDOM");
			docXSL.async="false";
			docXSL.onreadystatechange=verify;
		}else if (document.implementation && document.implementation.createDocument){
			docXML = document.implementation.createDocument("","",null);
			docXSL = document.implementation.createDocument("","",null);
		}else{
			alert("Su navegador no soporta este script.");
			return;
		}
	 	docXML.load(FileXML);
		docXSL.load(FileXSL);
		//Transform
		document.write(docXML.transformNode(docXSL));
  		return true;
	}catch(Err){
		document.write(Err.value);
		return false;
	}
}

function verify() { 
	if(docXML.readyState!=4){
		return false; 
	}
}