
Ajax={_mergeObj:function(obj1,obj2){for(var property in obj2){obj1[property]=obj2[property];}
return obj1;},_objToQuery:function(obj){var s=[];for(var j in obj)
s.push(encodeURIComponent(j)+"="+encodeURIComponent(obj[j]));return s.join("&").replace(/%20/g,"+");},sendRequest:function(userOptions){var defaults={async:true,data:null,dataType:"text",onError:null,onSuccess:null,type:"GET",url:document.location.href};var s=this._mergeObj(defaults,userOptions);s.type=s.type.toUpperCase();if(s.data&&typeof s.data!="string")
s.data=this._objToQuery(s.data);if(s.data&&s.type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+data;s.data=null;}
var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xhr.open(s.type,s.url,s.async);if(s.data)
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.onreadystatechange=function(){if(xhr.readyState!=4)return;if(xhr.status!=200&&xhr.status!=304){if(s.onError)s.onError(xhr);return;};var data=xhr.responseText;if(s.dataType=="json")
data=eval("("+data+")");if(s.onSuccess)s.onSuccess(data,xhr);};if(xhr.readyState==4)return;xhr.send(s.data);}};
