function getParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if (!results) return ''; // We don't want to return null if the param isn't there. if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } function ApplyXslt(xml, xsl) { document.getElementById("placeHolder").innerHTML = ""; // Need to blank this out. var parser = new DOMParser(); var xslAsXmlNode = parser.parseFromString(xsl, "text/xml"); var xmlAsXmlNode = parser.parseFromString(xml, "text/xml"); var xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xslAsXmlNode); resultDocument = xsltProcessor.transformToFragment(xmlAsXmlNode, document); document.getElementById("placeHolder").appendChild(resultDocument); return document.getElementById("placeHolder").innerHTML; } //alert (ApplyXslt (eventsXML, eventXslt));