function AjaxObject(Url, CallBackFunction, LoadingFunction) {
  var that = this;
  this.Updating = false;
  this.abort = function() {
    if (that.updating) {
      that.Updating = false;
      that.AJAX.abort();
      that.AJAX = null;
    }
  }
  this.Update = function(PassData, PostMethod) {
    if (that.Updating) {
      return false;
    }
    that.AJAX = null;
    if (window.XMLHttpRequest) {
      that.AJAX = new XMLHttpRequest();
    } else {
      that.AJAX = new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (that.AJAX == null) {
      return false;
    } else {
      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;
        } else {
          that.Loading();
        }
      }
      that.Updating = new Date();
      if (/post/i.test(PostMethod)) {
        var Uri = UrlCall + '?' + that.Updating.getTime();
        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());
        that.AJAX.open("GET", Uri, true);
        that.AJAX.send(null);
      }
      return true;
    }
  }
  var UrlCall = Url;
  this.Loading = LoadingFunction || function () {};
  this.CallBack = CallBackFunction || function () {};
}