function AjaxObject(randNr)
{
   this.HeaderMethod    = "POST";
   this.ScriptLocation  = "";       
   AdditionalContent    = "";
   this.PostParams      = "";
   CallBackName			= "";
   Loading				   = "";				
   logID                = 0;
   isOddRow             = false;
   isHeader             = false;

//resolve browsers       
   if (window.XMLHttpRequest) {
      randNr = new XMLHttpRequest();
   } 
   
   else if (window.ActiveXObject) {
      randNr = new ActiveXObject("Microsoft.XMLHTTP");
   }
   
//initiate randNr
   this.RetrieveData    = function()
   {  
      if(randNr)
      {  
         randNr.open("POST",this.ScriptLocation,true);
         randNr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
         randNr.onreadystatechange = this.CheckState;
      }        

      randNr.send(this.PostParams);
   }
      
//perform randNr status tests
   this.CheckState          = function()
   {  
      var state   = randNr.readyState;
      if (state == 1)
      {
         if (Loading != "")
         	eval(Loading+'()');
      }     
      if (state == 2)
      {
         
      }     
      if (state == 3)
      {
         
      }        
      if (state == 4)
      {
         
      }            

      var status;
     
      // check status
      if (state > 3)
         status = randNr.status;

      if (state == 4 && status == 200 )
      {  
         eval(CallBackName+"(randNr.responseText,"+logID+","+isOddRow+","+isHeader+")");
      }
   }  

   //====================SETTINGS=========================//   
   this.LoadingCallBack  = function(param)
   {  
      Loading = param;
   }      
   
   this.SetPostParams = function(param)
   {
      this.PostParams = param;
   }  

   this.setScriptLocation = function(param)
   {
      this.ScriptLocation = param;
   }
   
   this.CallBack = function(param)
   {
      CallBackName  = param;
   }

   this.SetContent = function(param)
   {
      Content = param;
   }

   this.SetLogId = function(param)
   {
      logID = param;
   }

   this.SetOddFlag = function(param)
   {
      isOddRow = param;
   }

   this.SetHeaderFlag = function(param)
   {
      isHeader = param;
   }

}

