
  // AJAX by EMEDOR ver 1.01 @ 6810 - Alexander SPOONER //
  // MODIFIED VERSION !!

  function ajaxLoad(target,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))
      {
        document.getElementById(target).innerHTML = xmlhttp.responseText;
        document.getElementById('LastMsg').scrollIntoView(true);
      }
    }
    if (vars.length>0)
    {
      vars = vars + '&ajaxtimestamp=' + new Date();
    }
    else
    {
      vars = 'ajaxtimestamp=' + new Date();
    }
    if (method == "GET")
    {
      xmlhttp.open("GET", encodeURI(url + '?' + vars));
      xmlhttp.send(null);
    }
    if (method == "POST")
    {
      xmlhttp.open("POST", url);
      xmlhttp.send(vars);
    }
  }
	
