if($){$.extend({xmlToJSON:function(h){try{if(!h){return null}var i={};i.typeOf="JSXBObject";var j=(h.nodeType==9)?h.documentElement:h;i.RootName=j.nodeName||"";if(h.nodeType==3||h.nodeType==4){return h.nodeValue}var k=function(s){var a="";if(s&&typeof s=="string"){a=s}var b=/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/;return b.test(a)};function formatName(a){var b=/-/g;var c=String(a).replace(b,"_");return c}function setAttributes(b,c){if(c.attributes.length>0){var a=c.attributes.length-1;var d;b._attributes=[];do{d=String(formatName(c.attributes[a].name));b._attributes.push(d);b[d]=$.trim(c.attributes[a].value)}while(a--)}}function setHelpers(g){g.getNodeByAttribute=function(a,b){if(this.length>0){var c;var d=this.length-1;try{do{c=this[d];if(c[a]==b){return c}}while(d--)}catch(e){return false}return false}};g.contains=function(a,b){if(this.length>0){var c=this.length-1;try{do{if(this[c][a]==b){return true}}while(c--)}catch(e){return false}return false}};g.indexOf=function(a,b){var c=-1;if(this.length>0){var d=this.length-1;try{do{if(this[d][a]==b){c=d}}while(d--)}catch(e){return-1}return c}};g.SortByAttribute=function(e,f){if(this.length){function getValue(a,b){var c=a[b];c=(k(c))?parseFloat(c):c;return c}function sortFn(a,b){var c=0;var d,tB;d=getValue(a,e);tB=getValue(b,e);if(d0){setAttributes(a,b)}a.Text="";if(b.hasChildNodes()){var g=b.childNodes.length-1;var n=0;do{d=b.childNodes[n];switch(d.nodeType){case 1:a._children=[];c=(d.localName)?d.localName:d.baseName;c=formatName(c);if(f!=c){a._children.push(c)}if(!a[c]){a[c]=[]}e={};a[c].push(e);if(d.attributes.length>0){setAttributes(e,d)}if(!a[c].contains){setHelpers(a[c])}f=c;if(d.hasChildNodes()){setObjects(e,d)}break;case 3:a.Text+=$.trim(d.nodeValue);break;case 4:a.Text+=(d.text)?$.trim(d.text):$.trim(d.nodeValue);break}}while(n++