function createXMLHTTP() 
{
  var xmlHttp = null;
  try 
  {
    // Firefox, Opera 8.0+, Safari
    xmlHttp = new XMLHttpRequest();
  } catch (e) 
  {
    // Internet Explorer
    try 
    {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) 
    {
      xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlHttp;
}

function getDataForDIV(url, divID) 
{
  var xmlHTTP = createXMLHTTP();

  if(!xmlHTTP) 
  {
    alert('sorry, no ajax for you');
    return false;
  }

  xmlHTTP.onreadystatechange = function() 
  {
    if (xmlHTTP.readyState == 4) 
    {
      document.getElementById(divID).innerHTML = xmlHTTP.responseText;
    }
  };

  xmlHTTP.open('GET', url, true);
  xmlHTTP.send(null);
}

