
  /* Modified by Alex Spooner, 2007-09-26 */

  function ajaxLoad(func,method,url,vars)
  {
    try
    {
      xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
      new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (e)
    {
      alert("Your browser doesn't support ajax. Use newer FireFox or IE!");
    }
    xmlhttp.onreadystatechange = function ajaxTrigger()
    {
      if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200))
      {
        eval(func)(xmlhttp.responseText);
      }
    }
    if (vars.length>0)
    {
      vars = vars + '&ajaxtimestamp=' + new Date();
    }
    else
    {
      vars = 'ajaxtimestamp=' + new Date();
    }
    if (method == "GET")
    {
      xmlhttp.open("GET", encodeURI(url + '?' + vars), true);
      xmlhttp.send(null);
    }
    if (method == "POST")
    {
      xmlhttp.open("POST", encodeURI(url), true);
			xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');      
      xmlhttp.send(encodeURI(vars));
    }
  }
  
