// AJAX class

var xAjax={
   xmlHttp:false,
   
   init: function(){
      try{ 
        this.xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
      }
      catch (e){  
      try{
        this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");  // Internet Explorer 6+
      }
      catch (e){
        try{
          this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer 5.5
          }
        catch (e){
            this.xmlHttp = false;
           // return false;
          }
        }
      }
   }, // init
   
   request: function(url, respFunction){
     this.init();
     if (this.xmlHttp==false){
        alert("You browser not support ajax");
        return false;
     }

     var xml=this.xmlHttp;
     xml.onreadystatechange=function(){
      if(xml.readyState==4){
        respFunction(xml.responseText);
      }
     }
         
  this.xmlHttp.open("GET", url, true);
  this.xmlHttp.send(null);
  
     return false;
   } // request

}  // xAjax
