function getXmlHttpObject(){
 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 test(){
 var xmlHttp = getXmlHttpObject();
 if (xmlHttp == null){
  alert("Your browser does not support Ajax !");
  return;
 }
 xmlHttp.onreadystatechange=function(){
  if(xmlHttp.readyState == 4){
  }
 }

 xmlHttp.open("POST", "../library/test.php", true);
 xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
 xmlHttp.send(null);
}