
xmlhttp = new Array();

function ajaxload(url, params, containerid, oncomplete)
{
  xmlhttp[containerid]='';
  // code for Mozilla, etc.
  if (window.XMLHttpRequest)
    {
    xmlhttp[containerid]=new XMLHttpRequest()
    }
  // code for IE
  else if (window.ActiveXObject)
    {
    xmlhttp[containerid]=new ActiveXObject("Microsoft.XMLHTTP")
    }

  xmlhttp[containerid].onreadystatechange=function(){
    if (xmlhttp[containerid].readyState == 4 && (xmlhttp[containerid].status==200 || window.location.href.indexOf("http")==-1))
    {
        if(getElem(containerid)){getElem(containerid).innerHTML = xmlhttp[containerid].responseText;}
        if(oncomplete){setTimeout(oncomplete,100);};
    }
  }
  xmlhttp[containerid].open('POST', url, true)
  xmlhttp[containerid].setRequestHeader('Content-Type','application/x-www-form-urlencoded')
  xmlhttp[containerid].send(params)
}
