
function ajaxObject(url,callbackFunction){var that=this;var updating=false;var AJAX=null;var isS=false;this.setS=function(){that.isS=true;}
this.abort=function(){if(that.updating){that.updating=false;that.AJAX.abort();that.AJAX=null;}}
this.update=function(passData,postMethod){if(that.isS){alert("trying");}
if(that.updating){if(that.isS){alert("updating");}
return false;}
that.AJAX=null;if(window.XMLHttpRequest){that.AJAX=new XMLHttpRequest();}else if(window.ActiveXObject){that.AJAX=new ActiveXObject("Microsoft.XMLHTTP");}else{alert("Your browser doesn't support AJAX. Please update to a newer browser.");}
if(that.AJAX==null){if(that.isS){alert("AJAX NULL");}
return false;}else{try{that.AJAX.onreadystatechange=function(){if(that.AJAX.readyState==4){that.updating=false;that.callback(that.AJAX.responseText,that.AJAX.status,that.AJAX.responseXML);that.AJAX=null;}}}catch(u){if(that.isS){alert("AJAX Readystate Error:"+u);}}
that.updating=new Date();if(/post/i.test(postMethod)){var uri=urlCall+'?'+that.updating.getTime();if(that.isS){alert("POST:"+uri);}
that.AJAX.open("POST",uri,true);that.AJAX.setRequestHeader("Content-type","application/x-www-form-urlencoded");that.AJAX.setRequestHeader("Content-Length",passData.length);that.AJAX.send(passData);}else{var uri=urlCall+'?'+passData+'&timestamp='+(that.updating.getTime());try{if(that.isS){alert("Open:"+uri);}
that.AJAX.open("GET",uri,true);that.AJAX.send(null);}catch(E){if(that.isS){alert("AJAX GET ERROR: "+E);}}}
return true;}}
var urlCall=url;this.callback=callbackFunction||function(){};}
