function AJAXHandler() {
  var _oXMLHTTP;
  this.elementToUpdate = null;
  this.url = "";
   this.setElementToUpdate = setElementToUpdate;


  // get() - Initialises XMLHTTP object and requests URL using asynchronous or synchronous connection
  this.get = function(url, async) {
		this.url = url;
    // need to set this variable here because what follows is a function where the this.elementToUpdate variable is not within its scope
		var elementToUpdate = this.elementToUpdate;
		
    _onSend(elementToUpdate);
    if (!_oXMLHTTP) {
      _oXMLHTTP = _initXMLHTTP();
    }

    if (_oXMLHTTP) {
      _oXMLHTTP.open("GET", url, async);
      _oXMLHTTP.onreadystatechange = function() {
        if (_oXMLHTTP.readyState == 4) {
          _onLoad(elementToUpdate);
        }
      }
      _oXMLHTTP.send(null);
    }
  }

  // _initXMLHTTP() - Internal function to initialise the XMLHTTP object
  function _initXMLHTTP() {
    var _oXMLHTTP;
    try {
      // Mozilla / Safari / Internet Explorer 7
      _oXMLHTTP = new XMLHttpRequest;
    } catch (e) {
      // Internet Explorer (Older versions)
      var XMLHTTPIDs = new Array("MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP");
      for (var i = 0; i < XMLHTTPIDs.length && !_oXMLHTTP; i++) {
        try {
          _oXMLHTTP = new ActiveXObject(XMLHTTPIDs[i]);
        } catch (e) {
        }
      }
    }
    if (!_oXMLHTTP) {
      alert("Error: Unable to create XMLHTTP Request.");
    }
    return _oXMLHTTP;
  }

  // _onSend() - Internal function specifying which actions to perform prior to request being sent
  function _onSend(elementToUpdate) {

		// clear the content of the container
//    document.getElementById(this.elementToUpdate).innerHTML = "";
//		document.getElementById(elementToUpdate).innerHTML = "<img src=\"/fcrisk/assets/gfx/loading.gif\" alt=\"Loading...\" />";
		document.getElementById(elementToUpdate).disabled = true;

  }
	
  // _onLoad() - Internal function specifying which actions to perform when the request has been received
  function _onLoad(elementToUpdate) {
		// place the received content inside the container
    document.getElementById(elementToUpdate).innerHTML = _oXMLHTTP.responseText;
		document.getElementById(elementToUpdate).disabled = false;
  }
	
	function setElementToUpdate(element) {
    this.elementToUpdate = element;
	}
	
	this.refresh = function() {
		this.get(this.url, true);
	}

}