function array_key_exists(b,a){if(!a||(a.constructor!==Array&&a.constructor!==Object)){return false}return b in a}function array_pop(d){var c="",a="";if(d.hasOwnProperty("length")){if(!d.length){return null}return d.pop()}else{for(c in d){if(d.hasOwnProperty(c)){a=c}}if(a){var b=d[a];delete (d[a]);return b}else{return null}}}function array_shift(e){var d=false,a=undefined,g="",c=/^\d$/,f=-1,b=function(h,k,j){if(h[k]!==undefined){var i=k;k+=1;if(k===j){k+=1}k=b(h,k,j);h[k]=h[i];delete h[i]}return k};if(e.length===0){return null}if(e.length>0){return e.shift()}}function current(a){this.php_js=this.php_js||{};this.php_js.pointers=this.php_js.pointers||[];var f=function(k){for(var h=0,j=this.length;h<j;h++){if(this[h]===k){return h}}return -1};var c=this.php_js.pointers;if(!c.indexOf){c.indexOf=f}if(c.indexOf(a)===-1){c.push(a,0)}var e=c.indexOf(a);var g=c[e+1];if(a instanceof Array){return a[g]||false}var d=0;for(var b in a){if(d===g){return a[b]}d++}return false}function end(a){this.php_js=this.php_js||{};this.php_js.pointers=this.php_js.pointers||[];var f=function(k){for(var h=0,j=this.length;h<j;h++){if(this[h]===k){return h}}return -1};var c=this.php_js.pointers;if(!c.indexOf){c.indexOf=f}if(c.indexOf(a)===-1){c.push(a,0)}var e=c.indexOf(a);if(!(a instanceof Array)){var d=0;for(var b in a){d++;var g=a[b]}if(d===0){return false}c[e+1]=d-1;return g}if(a.length===0){return false}c[e+1]=a.length-1;return a[c[e+1]]}function in_array(e,d,c){var b="",a=!!c;if(a){for(b in d){if(d[b]===e){return true}}}else{for(b in d){if(d[b]==e){return true}}}return false}function key(a){this.php_js=this.php_js||{};this.php_js.pointers=this.php_js.pointers||[];var e=function(j){for(var g=0,h=this.length;g<h;g++){if(this[g]===j){return g}}return -1};var c=this.php_js.pointers;if(!c.indexOf){c.indexOf=e}if(c.indexOf(a)===-1){c.push(a,0)}var f=c[c.indexOf(a)+1];if(!(a instanceof Array)){var d=0;for(var b in a){if(d===f){return b}d++}return false}if(a.length===0){return false}return f}function basename(d,c){var a=d.replace(/^.*[\/\\]/g,"");if(typeof(c)=="string"&&a.substr(a.length-c.length)==c){a=a.substr(0,a.length-c.length)}return a}function dirname(a){return a.replace(/\\/g,"/").replace(/\/[^\/]*\/?$/,"")}function json_decode(str_json){var json=this.window.JSON;if(typeof json==="object"&&typeof json.parse==="function"){try{return json.parse(str_json)}catch(err){if(!(err instanceof SyntaxError)){throw new Error("Unexpected error type in json_decode()")}this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var j;var text=str_json;cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if((/^[\],:{}\s]*$/).test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return j}this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null}function json_encode(g){var e,b=this.window.JSON;try{if(typeof b==="object"&&typeof b.stringify==="function"){e=b.stringify(g);if(e===undefined){throw new SyntaxError("json_encode")}return e}var d=g;var a=function(h){var j=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};j.lastIndex=0;return j.test(h)?'"'+h.replace(j,function(k){var l=i[k];return typeof l==="string"?l:"\\u"+("0000"+k.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+h+'"'};var f=function(s,o){var q="";var j="    ";var m=0;var l="";var t="";var h=0;var p=q;var n=[];var r=o[s];if(r&&typeof r==="object"&&typeof r.toJSON==="function"){r=r.toJSON(s)}switch(typeof r){case"string":return a(r);case"number":return isFinite(r)?String(r):"null";case"boolean":case"null":return String(r);case"object":if(!r){return"null"}if((this.PHPJS_Resource&&r instanceof this.PHPJS_Resource)||(window.PHPJS_Resource&&r instanceof window.PHPJS_Resource)){throw new SyntaxError("json_encode")}q+=j;n=[];if(Object.prototype.toString.apply(r)==="[object Array]"){h=r.length;for(m=0;m<h;m+=1){n[m]=f(m,r)||"null"}t=n.length===0?"[]":q?"[\n"+q+n.join(",\n"+q)+"\n"+p+"]":"["+n.join(",")+"]";q=p;return t}for(l in r){if(Object.hasOwnProperty.call(r,l)){t=f(l,r);if(t){n.push(a(l)+(q?": ":":")+t)}}}t=n.length===0?"{}":q?"{\n"+q+n.join(",\n"+q)+"\n"+p+"}":"{"+n.join(",")+"}";q=p;return t;case"undefined":case"function":default:throw new SyntaxError("json_encode")}};return f("",{"":d})}catch(c){if(!(c instanceof SyntaxError)){throw new Error("Unexpected error type in json_encode()")}this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null}}function echo(){var arg="",argc=arguments.length,argv=arguments,i=0;var win=this.window;var d=win.document;var ns_xhtml="http://www.w3.org/1999/xhtml";var ns_xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";var holder;var stringToDOM=function(str,parent,ns,container){var extraNSs="";if(ns===ns_xul){extraNSs=' xmlns:html="'+ns_xhtml+'"'}var stringContainer="<"+container+' xmlns="'+ns+'"'+extraNSs+">"+str+"</"+container+">";if(win.DOMImplementationLS&&win.DOMImplementationLS.createLSInput&&win.DOMImplementationLS.createLSParser){var lsInput=DOMImplementationLS.createLSInput();lsInput.stringData=stringContainer;var lsParser=DOMImplementationLS.createLSParser(1,null);return lsParser.parse(lsInput).firstChild}else{if(win.DOMParser){try{var fc=new DOMParser().parseFromString(stringContainer,"text/xml");if(!fc||!fc.documentElement||fc.documentElement.localName!=="parsererror"||fc.documentElement.namespaceURI!=="http://www.mozilla.org/newlayout/xml/parsererror.xml"){return fc.documentElement.firstChild}}catch(e){}}else{if(win.ActiveXObject){var axo=new ActiveXObject("MSXML2.DOMDocument");axo.loadXML(str);return axo.documentElement}}}if(d.createElementNS&&(d.documentElement.namespaceURI||d.documentElement.nodeName.toLowerCase()!=="html"||(d.contentType&&d.contentType!=="text/html"))){holder=d.createElementNS(ns,container)}else{holder=d.createElement(container)}holder.innerHTML=str;while(holder.firstChild){parent.appendChild(holder.firstChild)}return false};var ieFix=function(node){if(node.nodeType===1){var newNode=d.createElement(node.nodeName);var i,len;if(node.attributes&&node.attributes.length>0){for(i=0,len=node.attributes.length;i<len;i++){newNode.setAttribute(node.attributes[i].nodeName,node.getAttribute(node.attributes[i].nodeName))}}if(node.childNodes&&node.childNodes.length>0){for(i=0,len=node.childNodes.length;i<len;i++){newNode.appendChild(ieFix(node.childNodes[i]))}}return newNode}else{return d.createTextNode(node.nodeValue)}};for(i=0;i<argc;i++){arg=argv[i];if(this.php_js&&this.php_js.ini&&this.php_js.ini["phpjs.echo_embedded_vars"]){arg=arg.replace(/(.?)\{\$(.*?)\}/g,function(s,m1,m2){if(m1!=="\\"){return m1+eval(m2)}else{return s}})}if(d.appendChild){if(d.body){if(win.navigator.appName=="Microsoft Internet Explorer"){d.body.appendChild(stringToDOM(ieFix(arg)))}else{var unappendedLeft=stringToDOM(arg,d.body,ns_xhtml,"div").cloneNode(true);if(unappendedLeft){d.body.appendChild(unappendedLeft)}}}else{d.documentElement.appendChild(stringToDOM(arg,d.documentElement,ns_xul,"description"))}}else{if(d.write){d.write(arg)}}}}function sprintf(){var g=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;var h=arguments,f=0,k=h[f++];var b=function(n,a,i,m){if(!i){i=" "}var l=(n.length>=a)?"":Array(1+a-n.length>>>0).join(i);return m?n+l:l+n};var c=function(m,l,p,a,i,o){var n=a-m.length;if(n>0){if(p||!i){m=b(m,a,o,p)}else{m=m.slice(0,l.length)+b("",n,"0",true)+m.slice(l.length)}}return m};var j=function(p,o,n,q,i,a,m){var l=p>>>0;n=n&&l&&{"2":"0b","8":"0","16":"0x"}[o]||"";p=n+b(l.toString(o),a||0,"0",false);return c(p,n,q,i,m)};var e=function(m,o,i,a,l,n){if(a!=null){m=m.slice(0,a)}return c(m,"",o,i,l,n)};var d=function(z,m,n,r,B,w,l){var a;var v;var i;var A;var t;if(z=="%%"){return"%"}var s=false,o="",q=false,y=false,x=" ";var p=n.length;for(var u=0;n&&u<p;u++){switch(n.charAt(u)){case" ":o=" ";break;case"+":o="+";break;case"-":s=true;break;case"'":x=n.charAt(u+1);break;case"0":q=true;break;case"#":y=true;break}}if(!r){r=0}else{if(r=="*"){r=+h[f++]}else{if(r.charAt(0)=="*"){r=+h[r.slice(1,-1)]}else{r=+r}}}if(r<0){r=-r;s=true}if(!isFinite(r)){throw new Error("sprintf: (minimum-)width must be finite")}if(!w){w="fFeE".indexOf(l)>-1?6:(l=="d")?0:undefined}else{if(w=="*"){w=+h[f++]}else{if(w.charAt(0)=="*"){w=+h[w.slice(1,-1)]}else{w=+w}}}t=m?h[m.slice(0,-1)]:h[f++];switch(l){case"s":return e(String(t),s,r,w,q,x);case"c":return e(String.fromCharCode(+t),s,r,w,q);case"b":return j(t,2,y,s,r,w,q);case"o":return j(t,8,y,s,r,w,q);case"x":return j(t,16,y,s,r,w,q);case"X":return j(t,16,y,s,r,w,q).toUpperCase();case"u":return j(t,10,y,s,r,w,q);case"i":case"d":a=parseInt(+t,10);v=a<0?"-":o;t=v+b(String(Math.abs(a)),w,"0",false);return c(t,v,s,r,q);case"e":case"E":case"f":case"F":case"g":case"G":a=+t;v=a<0?"-":o;i=["toExponential","toFixed","toPrecision"]["efg".indexOf(l.toLowerCase())];A=["toString","toUpperCase"]["eEfFgG".indexOf(l)%2];t=v+Math.abs(a)[i](w);return c(t,v,s,r,q)[A]();default:return z}};return k.replace(g,d)}function trim(e,d){var b,a=0,c=0;e+="";if(!d){b=" \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000"}else{d+="";b=d.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1")}a=e.length;for(c=0;c<a;c++){if(b.indexOf(e.charAt(c))===-1){e=e.substring(c);break}}a=e.length;for(c=a-1;c>=0;c--){if(b.indexOf(e.charAt(c))===-1){e=e.substring(0,c+1);break}}return b.indexOf(e.charAt(0))===-1?e:""}function ucfirst(b){b+="";var a=b.charAt(0).toUpperCase();return a+b.substr(1)}function rawurldecode(a){return decodeURIComponent(a)}function rawurlencode(a){a=(a+"").toString();return encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function urldecode(a){return decodeURIComponent(a.replace(/\+/g,"%20"))}function urlencode(a){a=(a+"").toString();return encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}function intval(b,d){var a;var c=typeof(b);if(c==="boolean"){return(b)?1:0}else{if(c==="string"){a=parseInt(b,d||10);return(isNaN(a)||!isFinite(a))?0:a}else{if(c==="number"&&isFinite(b)){return Math.floor(b)}else{return 0}}}}function is_array(c){var b="";var a=function(e){var d=(/\W*function\s+([\w\$]+)\s*\(/).exec(e);if(!d){return"(Anonymous)"}return d[1]};if(!c){return false}this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};if(typeof c==="object"){if(this.php_js.ini["phpjs.objectsAsArrays"]&&((this.php_js.ini["phpjs.objectsAsArrays"].local_value.toLowerCase&&this.php_js.ini["phpjs.objectsAsArrays"].local_value.toLowerCase()==="off")||parseInt(this.php_js.ini["phpjs.objectsAsArrays"].local_value,10)===0)){return c.hasOwnProperty("length")&&!c.propertyIsEnumerable("length")&&a(c.constructor)!=="String"}if(c.hasOwnProperty){for(b in c){if(false===c.hasOwnProperty(b)){return false}}}return true}return false}function is_numeric(a){return(typeof(a)==="number"||typeof(a)==="string")&&a!==""&&!isNaN(a)}function is_string(a){return(typeof(a)=="string")}function print_r(i,l){var g="",a=" ",f=4,j=this.window.document;var b=function(e){var d=(/\W*function\s+([\w\$]+)\s*\(/).exec(e);if(!d){return"(Anonymous)"}return d[1]};var k=function(d,m){var n="";for(var e=0;e<d;e++){n+=m}return n};var c=function(q,p,o,m){if(p>0){p++}var d=k(o*p,m);var n=k(o*(p+1),m);var r="";if(typeof q==="object"&&q!==null&&q.constructor&&b(q.constructor)!=="PHPJS_Resource"){r+="Array\n"+d+"(\n";for(var e in q){if(q[e] instanceof Array){r+=n+"["+e+"] => "+c(q[e],p+1,o,m)}else{r+=n+"["+e+"] => "+q[e]+"\n"}}r+=d+")\n"}else{if(q===null||q===undefined){r=""}else{r=q.toString()}}return r};g=c(i,0,f,a);if(l!==true){if(j.body){this.echo(g)}else{try{j=XULDocument;this.echo('<pre xmlns="http://www.w3.org/1999/xhtml" style="white-space:pre;">'+g+"</pre>")}catch(h){this.echo(g)}}return true}else{return g}};
