var _BT=(function(){var a=function(c){return navigator.userAgent.indexOf(c)!=-1};var b="Other";if(a("MSIE")){b="IE"}else{if(a("Gecko/")){b="Moz"}else{if(a("Opera/")){b="Op"}}}return b})();var browser={type:_BT,isIE:(_BT=="IE"),isMoz:(_BT=="Moz"),isOpera:(_BT=="Op"),isNoIE:(_BT!="IE")};var isIE=browser.isIE,isMoz=browser.isMoz;var jsXML={getXMLHttpRequest:function(){return(typeof(XMLHttpRequest)!="undefined")?new XMLHttpRequest():createObject("Msxml2.XMLHTTP","Microsoft.XMLHTTP")},setPost:function(a){a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")},sendSync:function(b,a,d){var c=this.getXMLHttpRequest();method=(arguments[3])?arguments[3]:"POST";c.open(method,b,false);if(method=="POST"){jsXML.setPost(c)}if(d!=null&&(typeof(d)=="function")){d(c)}c.send(a);return c.responseText},sendAsync:function(a,b,e,d,f,i,c){var g=this.getXMLHttpRequest();var h=function(){if(g.readyState==4){try{if(g.status&&g.status==200){if(d!=null){d(g.responseText,g)}g=null}else{if(f!=null){f(g.statusText)}}}catch(j){}}else{if(i!=null){i(g.readyState)}}};g.onreadystatechange=h;g.open(a,b,true);if(a=="POST"){jsXML.setPost(g)}if(c!=null&&(typeof(c)=="function")){c(g)}if(e==null){e=""}g.send(e)},sendSyncPost:function(b,a){return this.sendSync(b,a,"POST")},sendSyncGet:function(b,a){return this.sendSync(b,a,"GET")},sendAsyncGet:function(b,a,d,c,e){this.sendAsync("GET",b,a,d,c,e)},sendAsyncPost:function(b,a,d,c,e){this.sendAsync("POST",b,a,d,c,e)},direct:function(b,a){return jsXML.parseXMLDocument(jsXML.sendSync(b,a,arguments[2]||"POST"))},deserialize:function(e){var g={};var h=arguments[1]||null;for(var d=0;d<e.attributes.length;d++){var b=e.attributes[d];var c=b.nodeName,f=b.nodeValue;g[c]=f;if(h&&typeof(h)=="function"){h(g,c,f)}}return g},deserializeList:function(a){var c=[];var d=arguments[1]||null;for(var b=0;b<a.length;b++){c.push(this.deserialize(a[b],d))}return c},insertAfter:function(c,a){var b=a.parentNode;if(b.lastChild==a){b.appendChild(c)}else{b.insertBefore(c,a.nextSibling)}},moveNode:function(d,e,b){var a=d.parentNode;if(a==e.parentNode){var f=d.cloneNode(true);if(b=="before"){a.insertBefore(f,e)}else{this.insertAfter(f,e)}a.removeChild(d)}else{throw"nodes not have same parent"}},moveBefore:function(a,b){this.moveNode(a,b,"before")},moveAfter:function(a,b){this.moveNode(a,b,"after")},parseXMLDocument:function(c,a){var b=(a)?a:"";var d=jsXML.createDOMDocument(b,"root");d.loadXML(c);return d},openDOMDocument:function(a){var b=this.createDOMDocument("","root");b.async=false;b.load(a);return b},newDOMInstance:function(){if(browser.isNoIE){return this.standardDomInstance("","",null)}else{return this.IEDomInstance()}},newDOMDocument:function(){var a=(arguments[0]==null)?"root":arguments[0];return jsXML.createDOMDocument("",a)},createDOMDocument:function(b,c){var a=null;if(browser.isNoIE){a=this.standardDomInstance(b,c,null);if(!a.load){a.addEventListener("load",_Document_onload,false)}}else{a=this.IEDomInstance();if(c&&c!=""){if(b){a.loadXML("<a0:"+c+' xmlns:a0="'+b+'" />')}else{a.loadXML("<"+c+"/>")}}}return a},removeAttribute:function(b,a){if(b.hasAttribute(a)){att_node=b.getAttributeNode(a);b.removeAttributeNode(att_node)}},getPrevious:function(b){var a=b.previousSibling;while(true){if(!a){return null}if(a.nodeType==1){return a}else{a=a.previousSibling}}},getNext:function(b){var a=b.nextSibling;while(true){if(!a){return null}if(a.nodeType==1){return a}else{a=a.nextSibling}}},getXML:function(a){return(browser.isIE)?a.xml:_Node_getXML.call(a)},getText:function(a){return("text" in a)?a.text:_Node_getText.call(a)},setText:function(a,b){if("text" in a){a.text=b}else{_Node_setText.call(a,b)}},IEDomInstance:function(){return createObject("Msxml2.DOMDocument","Microsoft.XmlDom")},standardDomInstance:function(){return document.implementation.createDocument(arguments[0],arguments[1],arguments[2])}};if(browser.isIE){function createObject(){var a=arguments;for(var c=0;c<a.length;c++){try{return new ActiveXObject(a[c])}catch(b){}}return null}}if(browser.isNoIE){function _Document_load(a){this.loadXML(jsXML.sendSync(a,"","GET"))}function handleOnLoad(a){if(!a.documentElement||a.documentElement.tagName=="parsererror"){a.parseError=-9999999}}function _Node_getText(){var b="";for(var a=0;a<this.childNodes.length;a++){if(this.childNodes[a].nodeType==3){b+=this.childNodes[a].nodeValue}else{if(this.childNodes[a].nodeType==4){b+=this.childNodes[a].nodeValue}}}return b}function _Node_setText(b){var a=this.childNodes.length;while(--a>=0){this.removeChild(this.childNodes[a])}this.appendChild(this.ownerDocument.createTextNode(b))}function _Node_getXML(){return new XMLSerializer().serializeToString(this)}Document.prototype.loadXML=function(e){var c=new DOMParser();var a=c.parseFromString(e,"text/xml");while(this.hasChildNodes()){this.removeChild(this.lastChild)}for(var b=0;b<a.childNodes.length;b++){var d=this.importNode(a.childNodes[b],true);this.appendChild(d)}handleOnLoad(this)};Document.prototype.transformNodeToObject=function(c,d){var a=new XSLTProcessor();a.importStylesheet(c);var b=a.transformToFragment(this,document);d.loadXML(jsXML.getXML(b))};Element.prototype.transformNodeToObject=function(b,c){var a=document.implementation.createDocument("","",null);a.loadXML(jsXML.getXML(this));a.transformNodeToObject(b,c)};Document.prototype.transformNode=function(c){var a=new XSLTProcessor();a.importStylesheet(c);var b=a.transformToFragment(this,document);return jsXML.getXML(b)};Element.prototype.transformNode=function(b){var a=document.implementation.createDocument("","",null);a.loadXML(jsXML.getXML(this));return a.transformNode(b)};Document.prototype.readyState="0";Document.prototype.__load__=Document.prototype.load;Document.prototype.load=_Document_load;Document.prototype.onreadystatechange=null;Document.prototype.parseError=0;if(browser.isMoz){Node.prototype.__defineGetter__("text",_Node_getText);Node.prototype.__defineSetter__("text",_Node_setText);Node.prototype.__defineGetter__("xml",_Node_getXML)}if(browser.isNoIE&&!browser.isMoz){Node.prototype.xml="node.xml not supported in Opera use jsXML.getXML(node) instead!"}if(browser.isMoz){XMLDocument.prototype.selectNodes=function(f,a){var e=this.createNSResolver(this.documentElement);var d=this.evaluate(f,(a?a:this),e,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var b=[];for(var c=0;c<d.snapshotLength;c++){b.push(d.snapshotItem(c))}return b};XMLDocument.prototype.selectSingleNode=function(b,a){var c=this.selectNodes(b,a);if(c.length>0){return c[0]}};Element.prototype.selectNodes=function(a){return this.ownerDocument.selectNodes(a,this)};Element.prototype.selectSingleNode=function(a){return this.ownerDocument.selectSingleNode(a,this)}}}function XMLGetDate(b){if(b=="0.00.00"){return""}var a=b.indexOf(" ");return b.substring(0,a)}function XMLGetTime(b){if(b=="0.00.00"){return""}var a=b.indexOf(" ");b=b.substr(a+1);b=b.substring(0,b.lastIndexOf("."));b=b.replace(".",":");return b};
