var xmlHttp;

try {
    xmlHttp=new XMLHttpRequest();
}catch(e){
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
