function _HTTPrequestId(){
  var xmlHttp=null;

  try{
    if (window.XMLHttpRequest){// code for IE7, Firefox, Opera, etc.
      xmlHttp=new XMLHttpRequest();
    }
    else if (window.ActiveXObject){// code for IE6, IE5
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }catch(e){}

  return xmlHttp;
}

function SendAsync(xmlHttp,method,url,body,action,onfault,onwait){
  try{
    var state_Change = function (){
      if (xmlHttp.readyState==4){
        if (xmlHttp.status==200){
          if(action!=null) eval(action(xmlHttp.responseText));
        }
        else{
          if(onfault!=null) eval(onfault(xmlHttp.statusText));
        }
      }
      else{
        if(onwait!=null) eval(onwait(xmlHttp.readyState));
      }
    }
    xmlHttp.onreadystatechange=state_Change;
    xmlHttp.open(method,url,true);
    xmlHttp.setRequestHeader('Content-Type','text/xml');

    xmlHttp.send(body);
  }catch(e){}

  return true;
}

