function ajaxObject(url, callbackFunction, prevent_cache) {
   var that=this;      
   this.prevent_cache = ( prevent_cache === null ) ?  true : prevent_cache;
   this.updating = false;
   this.abort = function() {
      if (that.updating) {
         that.updating=false;
         that.AJAX.abort();
         that.AJAX=null;
      }
   }
   this.update = function(passData,postMethod) { 
      that.passData = ( passData === null ) ?  "" : passData;
      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;                                         
            }                                                      
         }                                                        
         that.updating = new Date();                              
         if (/post/i.test(postMethod)) {
            var uri;
            if (that.prevent_cache) {
               uri=urlCall+'?'+that.updating.getTime()
            } else {
               uri=urlCall;
            }
            that.AJAX.open("POST", uri, true);
            that.AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            that.AJAX.setRequestHeader("Content-Length", that.passData.length);
            that.AJAX.send(that.passData);
         } else {
            var uri; 
            if (that.prevent_cache) {
               uri=urlCall+'?'+that.passData+'&ajaxObject_timestamp='+(that.updating.getTime())
            } else {
               uri=urlCall+'?'+that.passData; 
            }
            that.AJAX.open("GET", uri, true);                             
            that.AJAX.send(null);                                         
         }              
         return true;                                             
      }                                                                           
   }
   // New 21 Sep 2008 JDG.
   // Check if the ajax object is stalled.  
   // Returns true if stalled, false if not.
   // "stall_limit" is the number of milliseconds 
   // before the ajax object is considered "stalled".
   // Defaults to 10000 milliseconds (10 seconds).
   this.stalled = function(stall_limit) {
      that.stall_limit = (stall_limit === null) ?  10000 : stall_limit;
      if ( that.updating && ((new Date()).getTime() - that.updating) > that.stall_limit ) { 
         that.abort();
         return true;
      }
      return false;
   }
   var urlCall = url;        
   this.callback = callbackFunction || function () { };
}