pbXMLLibReady=true;var pbXMLLibHeader="[AjaMyAjax XML Lib]";
this.processXML=function(a,b,d,h,e){function q(u){for(var w=u.childNodes.length,r=0;r<w;r++){var g=u.childNodes[r];if(g.nodeType==1&&g.nodeName!==s)if(i!=="CDATA"){c+="<th id='myHeaderID'>"+g.nodeName+"</th>";t.push("<th id='myHeaderID'>"+g.nodeName+"</th>");if(n.indexOf(g.nodeName)==-1){n+="<th id='myHeaderID'>"+g.nodeName+"</th>";j++}}var f=g.nodeValue;if(f)f=f.replace(/^\s+|\s+$/g,"");if(g.nodeType==3&&f!=="")if(i!=="CDATA"){f=o=g.nodeValue;f=f.toLowerCase();var v=f.indexOf("http://");f=v!=-1?
xml_addAnchorTag(f,o,v):o;f="<td>"+f+"</td>";c+=f;k.push(f);l=true}if(g.nodeType==4){f=g.nodeValue;c+=f;k.push(f);l=true}if(g.hasChildNodes())q(g);else if(g.nodeType==3&&l)if(i!=="CDATA"){c+="</tr><tr id='myRowID'>";m.push("<th id='myHeaderID'>"+g.parentNode.nodeName+"</th>");l=false}}}a=a?a:null;b=b?b:null;d=d?d:null;var i=h?h:null;h=e?e:null;var s=e=null;if(a&&d){if(h){if(e=a.getElementsByTagName(h).item(0))e=e.parentNode}else e=a.getElementsByTagName("*").item(0);if(e)if(i==="NODETEXT"){b=aja_getXmlNodeText(e);
b=window.XMLHttpRequest?b.replace(/\r|\n|\r\n/g,"<br>"):b.replace(/\s/g,"<br>");aja_fill(d,b);b=null}else{h||(s=xml_getRootName(e.childNodes));var n=a="",j=0,t=[],m=[],k=[],o="",l=false,c="<table id='myTableID' width='auto'><tr id='myRowID'>";q(e);c+="</tr></table>";if(i==="HTABLE"){if(t.length==m.length||j<3){j--;a="<table id='myTableID' width='auto'><tr id='myRowID'>"+n+"</tr>"}else{j=m.length;a="<table id='myTableID' width='auto'>";for(e=0;e<j;e++)a+=m[e]}var p=0,x=k.length;for(e=0;e<x;e++){if(p==
0)a+="<tr id='myRowID'>";a+=k[e];if(p==j){a+="</tr>";p=0}else p++}a+="</table>";aja_fill(d,a)}else{if(i==="ULIST"){c=c.replace(/(\<table>|\<\/table>)/gi,"");c=c.replace(/(\<th id='myHeaderID'>)/gi,"<th>");c=c.replace(/(\<tr id='myRowID'>)/gi,"<tr>");c=c.replace(/(th>|tr>|td>)/gi,"li>");c=c.replace(/\<li\>\<\li\>/gi,"<li>");c=c.replace(/\<\/li\>\<\/li\>/gi,"</li>");c=c.replace(/\<li\>\<\/li\>/gi,"")}aja_fill(d,c)}try{if(b)b=null;if(d)d=null;if(i)i=null;if(h)h=null;c=l=o=k=m=t=j=n=a=s=e=q=null}finally{a=
null}}else{aja_empty(d);pbshowAlertMsgs&&aja_alertMsg(pbXMLLibHeader,"Sorry, cannot retrieve data requested for "+b)}}};xml_addAnchorTag=function(a,b,d){if(a&&b){if(d>0){var h=d=b.substr(0,d);d=d.toLowerCase();if(d.indexOf("href")==-1){b=h;a=a.replace(d,"")}}a="<a href='"+a+"'>"+b+"</a>"}return a};xml_getRootName=function(a){for(var b=null,d=a.length,h=0;h<d;h++){b=a[h].nodeName;if(b.indexOf("#")==-1)break}return b};
