function Sarissa(){}Sarissa.PARSED_OK="Document contains no parsing errors";Sarissa.IS_ENABLED_TRANSFORM_NODE=false;Sarissa.IS_ENABLED_XMLHTTP=false;Sarissa.IS_ENABLED_SELECT_NODES=false;var _sarissa_iNsCounter=0;var _SARISSA_IEPREFIX4XSLPARAM="";var _SARISSA_HAS_DOM_IMPLEMENTATION=document.implementation&&true;var _SARISSA_HAS_DOM_CREATE_DOCUMENT=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.createDocument;var _SARISSA_HAS_DOM_FEATURE=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.hasFeature;var _SARISSA_IS_MOZ=_SARISSA_HAS_DOM_CREATE_DOCUMENT&&_SARISSA_HAS_DOM_FEATURE;var _SARISSA_IS_SAFARI=(navigator.userAgent&&navigator.vendor&&(navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1||navigator.vendor.indexOf("Apple")!=-1));var _SARISSA_IS_IE=document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1;if(!window.Node||!window.Node.ELEMENT_NODE){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};}if(_SARISSA_IS_IE){_SARISSA_IEPREFIX4XSLPARAM="xsl:";var _SARISSA_DOM_PROGID="";var _SARISSA_XMLHTTP_PROGID="";pickRecentProgID=function(_1,_2){var _3=false;for(var i=0;i<_1.length&&!_3;i++){try{var _5=new ActiveXObject(_1[i]);o2Store=_1[i];_3=true;for(var j=0;j<_2.length;j++){if(i<=_2[j][1]){Sarissa["IS_ENABLED_"+_2[j][0]]=true;}}}catch(objException){}}if(!_3){throw "Could not retreive a valid progID of Class: "+_1[_1.length-1]+". (original exception: "+e+")";}_1=null;return o2Store;};_SARISSA_DOM_PROGID=pickRecentProgID(["Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],[["SELECT_NODES",2],["TRANSFORM_NODE",2]]);_SARISSA_XMLHTTP_PROGID=pickRecentProgID(["Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],[["XMLHTTP",4]]);_SARISSA_THREADEDDOM_PROGID=pickRecentProgID(["Msxml2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument.3.0"]);_SARISSA_XSLTEMPLATE_PROGID=pickRecentProgID(["Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0"],[["XSLTPROC",2]]);pickRecentProgID=null;Sarissa.getDomDocument=function(_7,_8){var _9=new ActiveXObject(_SARISSA_DOM_PROGID);if(_8){if(_7){_9.loadXML("<a"+_sarissa_iNsCounter+":"+_8+" xmlns:a"+_sarissa_iNsCounter+"=\""+_7+"\" />");++_sarissa_iNsCounter;}else{_9.loadXML("<"+_8+"/>");}}return _9;};Sarissa.getParseErrorText=function(_a){var _b=Sarissa.PARSED_OK;if(_a.parseError!=0){_b="XML Parsing Error: "+_a.parseError.reason+"\nLocation: "+_a.parseError.url+"\nLine Number "+_a.parseError.line+", Column "+_a.parseError.linepos+":\n"+_a.parseError.srcText+"\n";for(var i=0;i<_a.parseError.linepos;i++){_b+="-";}_b+="^\n";}return _b;};Sarissa.setXpathNamespaces=function(_d,_e){_d.setProperty("SelectionLanguage","XPath");_d.setProperty("SelectionNamespaces",_e);};XSLTProcessor=function(){this.template=new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);this.processor=null;};XSLTProcessor.prototype.importStylesheet=function(_f){var _10=new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);_10.loadXML(_f.xml);this.template.stylesheet=_10;this.processor=this.template.createProcessor();this.paramsSet=new Array();};XSLTProcessor.prototype.transformToDocument=function(_11){this.processor.input=_11;var _12=new ActiveXObject(_SARISSA_DOM_PROGID);this.processor.output=_12;this.processor.transform();return _12;};XSLTProcessor.prototype.setParameter=function(_13,_14,_15){if(_13){this.processor.addParameter(_14,_15,_13);}else{this.processor.addParameter(_14,_15);}if(!this.paramsSet[""+_13]){this.paramsSet[""+_13]=new Array();}this.paramsSet[""+_13][_14]=_15;};XSLTProcessor.prototype.getParameter=function(_16,_17){_16=_16||"";if(_16 in this.paramsSet&&_17 in this.paramsSet[_16]){return this.paramsSet[_16][_17];}else{return null;}};}else{if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){Sarissa.__handleLoad__=function(_18){if(!_18.documentElement||_18.documentElement.tagName=="parsererror"){_18.parseError=-1;}Sarissa.__setReadyState__(_18,4);};_sarissa_XMLDocument_onload=function(){Sarissa.__handleLoad__(this);};Sarissa.__setReadyState__=function(_19,_1a){_19.readyState=_1a;if(_19.onreadystatechange!=null&&typeof _19.onreadystatechange=="function"){_19.onreadystatechange();}};Sarissa.getDomDocument=function(_1b,_1c){var _1d=document.implementation.createDocument(_1b?_1b:"",_1c?_1c:"",null);_1d.addEventListener("load",_sarissa_XMLDocument_onload,false);return _1d;};if(window.XMLDocument){XMLDocument.prototype.onreadystatechange=null;XMLDocument.prototype.readyState=0;XMLDocument.prototype.parseError=0;var _SARISSA_SYNC_NON_IMPLEMENTED=false;XMLDocument.prototype._sarissa_load=XMLDocument.prototype.load;XMLDocument.prototype.load=function(_1e){var _1f=document.implementation.createDocument("","",null);Sarissa.copyChildNodes(this,_1f);this.parseError=0;Sarissa.__setReadyState__(this,1);try{if(this.async==false&&_SARISSA_SYNC_NON_IMPLEMENTED){var tmp=new XMLHttpRequest();tmp.open("GET",_1e,false);tmp.send(null);Sarissa.__setReadyState__(this,2);Sarissa.copyChildNodes(tmp.responseXML,this);Sarissa.__setReadyState__(this,3);}else{this._sarissa_load(_1e);}}catch(objException){this.parseError=-1;}finally{if(this.async==false){Sarissa.__handleLoad__(this);}}return _1f;};}else{if(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("LS","3.0")){Document.prototype.async=true;Document.prototype.onreadystatechange=null;Document.prototype.parseError=0;Document.prototype.load=function(_21){var _22=document.implementation.createLSParser(this.async?document.implementation.MODE_ASYNCHRONOUS:document.implementation.MODE_SYNCHRONOUS,null);if(this.async){var _23=this;_22.addEventListener("load",function(e){_23.readyState=4;Sarissa.copyChildNodes(e.newDocument,_23.documentElement,false);_23.onreadystatechange.call();},false);}try{var _25=_22.parseURI(_21);}catch(e){this.parseError=-1;}if(!this.async){Sarissa.copyChildNodes(_25,this.documentElement,false);}return _25;};Sarissa.getDomDocument=function(_26,_27){return document.implementation.createDocument(_26?_26:"",_27?_27:"",null);};}}}}if(!window.DOMParser){DOMParser=function(){};if(_SARISSA_IS_SAFARI){DOMParser.prototype.parseFromString=function(_28,_29){if(_29.toLowerCase()!="application/xml"){throw "Cannot handle content type: \""+_29+"\"";}var _2a=new XMLHttpRequest();_2a.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(str),false);_2a.send(null);return _2a.responseXML;};}else{if(Sarissa.getDomDocument&&Sarissa.getDomDocument()&&"loadXML" in Sarissa.getDomDocument()){DOMParser.prototype.parseFromString=function(_2b,_2c){var doc=Sarissa.getDomDocument();doc.loadXML(_2b);return doc;};}}}if(window.XMLHttpRequest){Sarissa.IS_ENABLED_XMLHTTP=true;}else{if(_SARISSA_IS_IE){XMLHttpRequest=function(){return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);};Sarissa.IS_ENABLED_XMLHTTP=true;}}if(!window.document.importNode&&_SARISSA_IS_IE){try{window.document.importNode=function(_2e,_2f){var _30=document.createElement("div");if(_2f){_30.innerHTML=Sarissa.serialize(_2e);}else{_30.innerHTML=Sarissa.serialize(_2e.cloneNode(false));}return _30.firstChild;};}catch(e){}}if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(_31){var _32=Sarissa.PARSED_OK;if(_31&&_31.parseError&&_31.parseError!=0){if(_31.documentElement.tagName=="parsererror"){_32=_31.documentElement.firstChild.data;_32+="\n"+_31.documentElement.firstChild.nextSibling.firstChild.data;}else{_32=Sarissa.getText(_31.documentElement);}}return _32;};}Sarissa.getText=function(_33,_34){var s="";var _36=_33.childNodes;for(var i=0;i<_36.length;i++){var _38=_36[i];var _39=_38.nodeType;if(_39==Node.TEXT_NODE||_39==Node.CDATA_SECTION_NODE){s+=_38.data;}else{if(_34==true&&(_39==Node.ELEMENT_NODE||_39==Node.DOCUMENT_NODE||_39==Node.DOCUMENT_FRAGMENT_NODE)){s+=Sarissa.getText(_38,true);}}}return s;};if(window.XMLSerializer){Sarissa.serialize=function(_3a){var s=null;if(_3a){s=_3a.innerHTML?_3a.innerHTML:(new XMLSerializer()).serializeToString(_3a);}return s;};}else{if(Sarissa.getDomDocument&&(Sarissa.getDomDocument("","foo",null)).xml){Sarissa.serialize=function(_3c){var s=null;if(_3c){s=_3c.innerHTML?_3c.innerHTML:_3c.xml;}return s;};XMLSerializer=function(){};XMLSerializer.prototype.serializeToString=function(_3e){return _3e.xml;};}}Sarissa.stripTags=function(s){return s.replace(/<[^>]+>/g,"");};Sarissa.clearChildNodes=function(_40){while(_40.firstChild){_40.removeChild(_40.firstChild);}};Sarissa.copyChildNodes=function(_41,_42,_43){if((!_41)||(!_42)){throw "Both source and destination nodes must be provided";}if(!_43){Sarissa.clearChildNodes(_42);}var _44=_42.nodeType==Node.DOCUMENT_NODE?_42:_42.ownerDocument;var _45=_41.childNodes;if(_44.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<_45.length;i++){_42.appendChild(_44.importNode(_45[i],true));}}else{for(var i=0;i<_45.length;i++){_42.appendChild(_45[i].cloneNode(true));}}};Sarissa.moveChildNodes=function(_48,_49,_4a){if((!_48)||(!_49)){throw "Both source and destination nodes must be provided";}if(!_4a){Sarissa.clearChildNodes(_49);}var _4b=_48.childNodes;if(_48.ownerDocument==_49.ownerDocument){while(_48.firstChild){_49.appendChild(_48.firstChild);}}else{var _4c=_49.nodeType==Node.DOCUMENT_NODE?_49:_49.ownerDocument;if(_4c.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<_4b.length;i++){_49.appendChild(_4c.importNode(_4b[i],true));}}else{for(var i=0;i<_4b.length;i++){_49.appendChild(_4b[i].cloneNode(true));}}Sarissa.clearChildNodes(_48);}};Sarissa.xmlize=function(_4f,_50,_51){_51=_51?_51:"";var s=_51+"<"+_50+">";var _53=false;if(!(_4f instanceof Object)||_4f instanceof Number||_4f instanceof String||_4f instanceof Boolean||_4f instanceof Date){s+=Sarissa.escape(""+_4f);_53=true;}else{s+="\n";var _54="";var _55=_4f instanceof Array;for(var _56 in _4f){s+=Sarissa.xmlize(_4f[_56],(_55?"array-item key=\""+_56+"\"":_56),_51+"   ");}s+=_51;}return s+=(_50.indexOf(" ")!=-1?"</array-item>\n":"</"+_50+">\n");};Sarissa.escape=function(_57){return _57.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");};Sarissa.unescape=function(_58){return _58.replace(/&apos;/g,"'").replace(/&quot;/g,"\"").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");};