function Ajax(url,data,raw){var xmlHttp=null;var onSuccessCbF='';var onSuccessMth='';var onFailureCbF='';var onLoadingCbF='';var onLoadedCbF='';var onSuccessArg='';var onFailureArg='';var onLoadingArg='';var onLoadedArg='';var notrun=true;if(typeof(raw)=="undefined"){raw=false;} function init(){if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest();}else if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}} this.doRequest=function(nodes){init();if(typeof(data)!="undefined"){var encoded=JSON.stringify(data);var method=getMethod(encoded,url);if(method=="GET"){encoded=_URLEncode(encoded);if(url.indexOf("?")>=0){url=url+"&ajaxget="+encoded;}else{url=url+"?ajaxget="+encoded;}}}else{method="GET";} xmlHttp.onreadystatechange=getResponse;xmlHttp.open(method,url,true);if(!this.raw){xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");} if(typeof(nodes)=="object"&&typeof(nodes.join)!="undefined"){xmlHttp.setRequestHeader("HTML-Nodes",nodes.join(";"));} if(method!="GET"){xmlHttp.send(encoded);}else{xmlHttp.send(null);}};function getMethod(data,url){if(data.length>800){return"POST";} var encoded=_URLEncode(data);var length=encoded.length+url.length;if(length>1000){return"POST";} return"GET";} function _URLEncode(str){var histogram={},tmp_arr=[];var ret=str.toString();var replacer=function(search,replace,str){var tmp_arr=[];tmp_arr=str.split(search);return tmp_arr.join(replace);};histogram["'"]='%27';histogram['(']='%28';histogram[')']='%29';histogram['*']='%2A';histogram['~']='%7E';histogram['!']='%21';histogram['%20']='+';ret=encodeURIComponent(ret);for(var search in histogram){replace=histogram[search];ret=replacer(search,replace,ret);} return ret.replace(/(\%([a-z0-9]{2}))/g,function(full,m1,m2){return"%"+m2.toUpperCase();});return ret;} function getResponse(){switch(xmlHttp.readyState){case 1:_onLoading();break;case 2:_onLoaded();break;case 4:if(xmlHttp.status==200){_onSuccess();}else{_onFailure();} break;default:break;}} function getXmlResponse(){return xmlHttp.responseXML;} function getTextResponse(){return xmlHttp.responseText;} function _onSuccess(){if(onSuccessCbF==''){delete xmlHttp;return false;} var output='';switch(onSuccessMth){default:case"text":output=getTextResponse();break;case"xml":output=getXmlResponse();break;} if(!raw){try{output=eval("("+output+")");}catch(e){alert(e+"\n"+output);}} var ref=null;if(typeof(onSuccessCbF)=="string"){if(onSuccessCbF.indexOf(".")>=0){var objs=onSuccessCbF.split(".");objs.pop();ref=objs.join(".");ref=eval(ref);} eval(onSuccessCbF).call(ref,output,onSuccessArg);}else if(typeof(onSuccessCbF)=="object"){if(typeof(onSuccessCbF.length)!="undefined"){onSuccessCbF[1].call(onSuccessCbF[0],output,onSuccessArg);}else{onSuccessCbF(output,onSuccessArg);}} delete xmlHttp;return true;} function _onFailure(){var output=getTextResponse();if(onFailureCbF==''){alert(output);}else{var ref=null;if(typeof(onFailureCbF)=="string"){if(onFailureCbF.indexOf(".")>=0){var objs=onFailureCbF.split(".");objs.pop();ref=objs.join(".");ref=eval(ref);} eval(onFailureCbF).call(ref,output,onFailureArg);}else if(typeof(onFailureCbF)=="object"){if(typeof(onFailureCbF.length)!="undefined"){onFailureCbF[1].call(onFailureCbF[0],output,onFailureArg);}else{onFailureCbF(output,onFailureArg);}}}delete xmlHttp;return true;} function _onLoading(){if(notrun){notrun=false;if(onLoadingCbF==''){delete xmlHttp;return false;} var ref=null;if(typeof(onLoadingCbF)=="string"){if(onLoadingCbF.indexOf(".")>=0){var objs=onLoadingCbF.split(".");objs.pop();ref=objs.join(".");ref=eval(ref);} eval(onLoadingCbF).call(ref,onLoadingArg);}else if(typeof(onLoadingCbF)=="object"){if(typeof(onLoadingCbF.length)!="undefined"){onLoadingCbF[1].call(onLoadingCbF[0],onLoadingArg);}else{onLoadingCbF(onLoadingArg);}} delete xmlHttp;return true;}} function _onLoaded(){if(onLoadedCbF==''){delete xmlHttp;return false;} var ref=null;if(typeof(onLoadedCbF)=="string"){if(onLoadedCbF.indexOf(".")>=0){var objs=onLoadedCbF.split(".");objs.pop();ref=objs.join(".");ref=eval(ref);} eval(onLoadedCbF).call(ref,onLoadedArg);}else if(typeof(onLoadedCbF)=="object"){if(typeof(onLoadedCbF.length)!="undefined"){onLoadedCbF[1].call(onLoadedCbF[0],onLoadedArg);}else{onLoadedCbF(onLoadedArg);}} delete xmlHttp;return true;};this.onSuccess=function(callback_fce,arg){onSuccessCbF=callback_fce;onSuccessMth="text";onSuccessArg=arg;};this.onFailure=function(callback_fce,arg){onFailureCbF=callback_fce;onFailureArg=arg;};this.onLoading=function(callback_fce,arg){onLoadingCbF=callback_fce;onLoadingArg=arg;};this.onLoaded=function(callback_fce,arg){onLoadedCbF=callback_fce;onLoadedArg=arg;}} 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