var sajax_debug_mode=false;var sajax_failure_redirect="";var sajax_remote_uri="";var sajax_request_type="";var sajax_target_id="";function sajax_debug(text){if(sajax_debug_mode){alert(text);}return true;}function sajax_failure(text){if(sajax_failure_redirect!=""&&!sajax_debug_mode){window.location.href=sajax_failure_redirect;}else{sajax_debug(text);}return false;}var sajax_requests=[];function sajax_cancel(id){if(arguments.length===0){for(var i=0;i<sajax_requests.length;i++){if(sajax_requests[i]){sajax_requests[i].abort();sajax_requests.splice(i,1,null);}}}else if(sajax_requests[id]){sajax_requests[id].abort();sajax_requests.splice(id,1,null);}}if(typeof(encodeURIComponent)=="undefined"){encodeURIComponent=function(string){this.encodeChar=function(c){c=c.charCodeAt(0);var utf8="";if(c<128){utf8+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){utf8+=String.fromCharCode((c>>6)|192);utf8+=String.fromCharCode((c&63)|128);}else{utf8+=String.fromCharCode((c>>12)|224);utf8+=String.fromCharCode(((c>>6)&63)|128);utf8+=String.fromCharCode((c&63)|128);}var encoded="";for(var i=0;i<utf8.length;i++){encoded+="%"+utf8.charCodeAt(i).toString(16).toUpperCase();}return encoded;};string=string.replace(/\r\n/g,"\n");var encoded="";for(var n=0;n<string.length;n++){if(string.charAt(n).match(/[~!*()'a-z0-9]/i)===null){encoded+=encodeChar(string.charAt(n));}else{encoded+=string.charAt(n);}}return encoded;};}if(typeof(window.XMLHttpRequest)=="undefined"){window.XMLHttpRequest=function(){var msxmlhttp=Array('Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');for(var i=0;i<msxmlhttp.length;i++){try{return new window.ActiveXObject(msxmlhttp[i]);}catch(e){}}return null;};}function sajax_do_call(func_name,args,method,asynchronous,uri){switch(arguments.length){case 0:return false;case 1:var args=[];case 2:var method="GET";case 3:var asynchronous=true;case 4:var uri="";}if(sajax_request_type!=""){method=sajax_request_type;}if(method!=="POST"){method="GET";}if(sajax_remote_uri!=""){uri=sajax_remote_uri;}if(uri==""){uri=window.location.href.replace(/#.*$/,"");}var i,x;var geturi="";var data;var target_id=sajax_target_id;var argsarray=Array();sajax_debug("in sajax_do_call().."+method+"/"+sajax_target_id);for(i=0;i<args.length-1;i++){argsarray[i]=args[i];}data="rs="+encodeURIComponent(func_name);if(argsarray.length>0){try{data+="&rsargs="+encodeURIComponent(JSON.stringify(argsarray))+'&';}catch(e){return sajax_failure("JSON.stringify() failed for user agent:\n"+navigator.userAgent);}}try{x=new window.XMLHttpRequest();}catch(e){}if(x===null||typeof x.readyState!=="number"){return sajax_failure("NULL sajax object for user agent:\n"+navigator.userAgent);}if(method=="POST"&&typeof x.setRequestHeader=="undefined"){if((uri+data).length<512){sajax_debug("Browser did not support POST, switching to GET");method="GET";}else{return sajax_failure("Request failed for user agent:\n"+navigator.userAgent);}}if(method=="GET"){geturi=uri;if(geturi.indexOf("?")==-1){geturi+="?"+data;}else{geturi+="&"+data;}if(geturi.length>512){method="POST";sajax_debug("Data to long for GET switching to POST");}else{uri=geturi;data=null;}}x.open(method,uri,asynchronous);if(method=="POST"){x.setRequestHeader("Method","POST "+uri+" HTTP/1.1");x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}var alreadydone=false;var responcefunc=function(){if(alreadydone===true){return false;}if(x.readyState!=4){return false;}var status;var data;var txt=x.responseText.replace(/^\s*|\s*$/g,"");status=txt.charAt(0);if(status=="-"||status=="+"){data=txt.substring(2);}else{data=txt;}if(status==""&&(x.status==200||x.status==""||x.status=="12019")){return false;}else if(status!="+"||x.status!=200){alert("Error "+x.status+": "+data);return false;}else{alreadydone=true;var callback;var extra_data=false;if(typeof args[args.length-1]=="object"){callback=args[args.length-1].callback;extra_data=args[args.length-1].extra_data;}else{callback=args[args.length-1];}try{if(typeof(JSON)!="undefined"&&typeof(JSON.parse)!="undefined"){try{var res=JSON.parse(data);}catch(e){return sajax_failure("JSON.parse failed for user agent:\n"+navigator.userAgent);}}else{sajax_debug("Warning: JSON is being directly executed via eval()!");eval("var res = ("+data+"); res;");}if(target_id){document.getElementById(target_id).innerHTML=res;}else{callback(res,extra_data);}sajax_requests.splice(id,1,null);}catch(e){sajax_debug("Caught error "+e+": Could not parse "+data);return false;}}return true;};if(asynchronous){x.onreadystatechange=responcefunc;}sajax_debug(func_name+" uri = "+uri+"/post = "+data);try{x.send(data);}catch(e){if(method==="POST"&&geturi===""){sajax_debug("Browser did not support POST, tyring GET instead");sajax_request_type="";return sajax_do_call(func_name,args,"GET",asynchronous);}else{return sajax_failure("Request failed for user agent:\n"+navigator.userAgent);}}sajax_debug(func_name+" waiting..");if(asynchronous){var id=sajax_requests.length;sajax_requests[id]=x;return id;}else{return responcefunc();}}
//json2_stringify.js
"use strict";if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?'0'+n:n}if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key)}if(typeof rep==='function'){value=rep.call(holder,key,value)}switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null'}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null'}v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v}if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v}}if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' '}}else if(typeof space==='string'){indent=space}rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}return str('',{'':value})}}}());
//json_stringify.js
var JSON=JSON||{};JSON.stringify=JSON.stringify||function(obj){var t=typeof(obj);if(t=="undefined"){return;}else if(typeof obj.toJSON!="undefined"){obj=obj.toJSON();if(typeof(obj)=="string")obj='"'+obj.replace(/"/g,'\\"')+'"';return String(obj);}else if(t!="object"||obj===null){if(t=="string")obj='"'+obj.replace(/"/g,'\\"')+'"';return String(obj);}else{var n,v,json=[],arr=(obj&&obj.constructor==Array);for(n in obj){v=JSON.stringify(obj[n]);json[json.length]=(arr?"":'"'+n+'":')+String(v);}return(arr?"[":"{")+String(json)+(arr?"]":"}");}};if(typeof Date.prototype.toJSON=='undefined'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();}}
//json_parse_state.js
if(!this.JSON){this.JSON={}}if(typeof(JSON.parse)=="undefined"){this.JSON.parse=(function(){var state,stack,container,key,value,escapes={'\\':'\\','"':'"','/':'/','t':'\t','n':'\n','r':'\r','f':'\f','b':'\b'},string={go:function(){state='ok'},firstokey:function(){key=value;state='colon'},okey:function(){key=value;state='colon'},ovalue:function(){state='ocomma'},firstavalue:function(){state='acomma'},avalue:function(){state='acomma'}},number={go:function(){state='ok'},ovalue:function(){state='ocomma'},firstavalue:function(){state='acomma'},avalue:function(){state='acomma'}},action={'{':{go:function(){stack.push({state:'ok'});container={};state='firstokey'},ovalue:function(){stack.push({container:container,state:'ocomma',key:key});container={};state='firstokey'},firstavalue:function(){stack.push({container:container,state:'acomma'});container={};state='firstokey'},avalue:function(){stack.push({container:container,state:'acomma'});container={};state='firstokey'}},'}':{firstokey:function(){var pop=stack.pop();value=container;container=pop.container;key=pop.key;state=pop.state},ocomma:function(){var pop=stack.pop();container[key]=value;value=container;container=pop.container;key=pop.key;state=pop.state}},'[':{go:function(){stack.push({state:'ok'});container=[];state='firstavalue'},ovalue:function(){stack.push({container:container,state:'ocomma',key:key});container=[];state='firstavalue'},firstavalue:function(){stack.push({container:container,state:'acomma'});container=[];state='firstavalue'},avalue:function(){stack.push({container:container,state:'acomma'});container=[];state='firstavalue'}},']':{firstavalue:function(){var pop=stack.pop();value=container;container=pop.container;key=pop.key;state=pop.state},acomma:function(){var pop=stack.pop();container.push(value);value=container;container=pop.container;key=pop.key;state=pop.state}},':':{colon:function(){if(Object.hasOwnProperty.call(container,key)){throw new SyntaxError('Duplicate key "'+key+'"');}state='ovalue'}},',':{ocomma:function(){container[key]=value;state='okey'},acomma:function(){container.push(value);state='avalue'}},'true':{go:function(){value=true;state='ok'},ovalue:function(){value=true;state='ocomma'},firstavalue:function(){value=true;state='acomma'},avalue:function(){value=true;state='acomma'}},'false':{go:function(){value=false;state='ok'},ovalue:function(){value=false;state='ocomma'},firstavalue:function(){value=false;state='acomma'},avalue:function(){value=false;state='acomma'}},'null':{go:function(){value=null;state='ok'},ovalue:function(){value=null;state='ocomma'},firstavalue:function(){value=null;state='acomma'},avalue:function(){value=null;state='acomma'}}};function debackslashify(text){return text.replace(/\\(?:u(.{4})|([^u]))/g,function(a,b,c){return b?String.fromCharCode(parseInt(b,16)):escapes[c]})}return function(source,reviver){var r,tx=/^[\x20\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;state='go';stack=[];try{for(;;){r=tx.exec(source);if(!r){break}if(r[1]){action[r[1]][state]()}else if(r[2]){value=+r[2];number[state]()}else{value=debackslashify(r[3]);string[state]()}source=source.slice(r[0].length)}}catch(e){state=e}if(state!=='ok'||/[^\x20\t\n\r]/.test(source)){throw state instanceof SyntaxError?state:new SyntaxError('JSON');}return typeof reviver==='function'?(function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}({'':value},'')):value}}())}