// JScript File
      /* class XslTransformer
      constructor:
      XslTransformer(url)
      methods:
      CreateProcessor(url)
      SetParam(name, value)
      ToNode(node, doc)
      AddToNode(node, doc)
      ToDoc(doc)
      */
      function XslTransformer_ToNodeXSLTProcessor(node, doc)
      {
      var fragment = this.Processor.transformToFragment(doc, node.ownerDocument);
      while (node.hasChildNodes()) node.removeChild(node.lastChild);      
      node.appendChild(fragment);
      }
      function XslTransformer_AddToNodeXSLTProcessor(node, doc)
      {
      var fragment = this.Processor.transformToFragment(doc, node.ownerDocument);
      node.appendChild(fragment);
      }
      function XslTransformer_ToDocXSLTProcessor(doc)
      {
      return this.Processor.transformToDocument(doc);

      }
      function XslTransformer_ToNodeMS(node, doc)
      {
      this.Processor.input = doc;
      this.Processor.reset();
      this.Processor.transform();
      node.innerHTML = this.Processor.output;
      }
      function XslTransformer_AddToNodeMS(node, doc)
      {
      this.Processor.input = doc;
      this.Processor.reset();
      this.Processor.transform();
      node.innerHTML += this.Processor.output;
      }
      function XslTransformer_ToDocMS(doc)
      {
      var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
      this.Processor.input = doc;
      this.Processor.reset();
      this.Processor.transform();
      xmlDoc.loadXML(this.Processor.output);
      return xmlDoc;
      }
      function XslTransformer_CreateProcessorXSLTProcessor(url)
      {
      var xslRequest = HttpRequest.create();
      xslRequest.open("GET", url, false);
      xslRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
      xslRequest.send(null);
      var xsl = XmlDocument.create();
      xsl.loadXML(xslRequest.responseText);
      var proc = new XSLTProcessor();
      proc.importStylesheet(xsl);
      return proc;
      }
      function XslTransformer_CreateProcessorMS(url)
      {
      var xsl = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
      xsl.async = false;
      xsl.load(url);
      this.xslt.stylesheet = xsl;
      return this.xslt.createProcessor();
      }
      function XslTransformer_SetParamXSLTProcessor(name, value)
      {
      this.Processor.setParameter(null, name, value);
      }
      function XslTransformer_SetParamProcessorMS(name, value)
      {
      this.Processor.addParameter(name, value);
      }
      function XslTransformer(url)
      {
      if (navigator.appVersion.indexOf("MSIE")==-1)
      //if (typeof(XSLTProcessor) != "undefined") // no IE
      {
      this.ToNode = XslTransformer_ToNodeXSLTProcessor;
      this.AddToNode = XslTransformer_AddToNodeXSLTProcessor;
      this.ToDoc = XslTransformer_ToDocXSLTProcessor;
      this.CreateProcessor = XslTransformer_CreateProcessorXSLTProcessor;
      this.SetParam = XslTransformer_SetParamXSLTProcessor;
      }
      else
      {
      this.xslt = new ActiveXObject("Msxml2.XSLTemplate.3.0");
      this.ToNode = XslTransformer_ToNodeMS;
      this.AddToNode = XslTransformer_AddToNodeMS;
      this.ToDoc = XslTransformer_ToDocMS;
      this.CreateProcessor = XslTransformer_CreateProcessorMS;
      this.SetParam = XslTransformer_SetParamProcessorMS;
      }
      this.Processor = this.CreateProcessor(url);
      }

