/**
 * @author KLE
 */

function ajaxRequest(theURL, sendString)
 {

  var thisRequestObject;
  
  thisRequestObject = initiateRequest();
  thisRequestObject.onreadystatechange = processRequest;
  
  function initiateRequest()
  {
   if (window.XMLHttpRequest)
    return new XMLHttpRequest();
   elseif (window.ActiveXObject)
    return new ActiveXObject("Microsoft.XMLHTTP");
   }
  
 function processRequest()
  {
   //leave cempty 
  }

  
  this.sendGetData = function()
  {
   if (theURL)
   {
    thisRequestObject.open("GET", theURL, true);
    thisRequestObject.send(sendString);
   }
  }
  
  this.sendPostData = function()
  {
   htmlSend = "200 OK";
   if (theURL)
   {
    thisRequestObject.open("POST", theURL, true);
    thisRequestObject.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    thisRequestObject.send(sendString);
   }
  }
}



