/* AJAX callback function
 */

function doCallback(url, callbackFunction)
{
  var xmlObj =null;
  if(window.XMLHttpRequest)
    xmlObj = new XMLHttpRequest();
  else if(window.ActiveXObject)
    xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
    
  var xmlHttpReq = false;
  // Mozilla/Safari
  if (window.XMLHttpRequest) {
    xmlHttpReq = new XMLHttpRequest();
    if (xmlHttpReq.overrideMimeType) {
      xmlHttpReq.overrideMimeType('text/xml');
    }
    // IE
  } else if (window.ActiveXObject) { // IE
    try {
      xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {}
    }
  } 

 
  if(xmlHttpReq == null)
    return false;

  xmlHttpReq.onreadystatechange =
    function(){
      if(xmlHttpReq.readyState == 4)
      {
        callbackFunction(xmlHttpReq.responseText);
      }
    }

  xmlHttpReq.open ('GET', url, true);
  xmlHttpReq.setRequestHeader('Content-Type', 
    'application/x-www-form-urlencoded');    
  xmlHttpReq.send ('');
 
  return true;
}

