  function ajax (url,m_ethod,callbackFunction)
  {
   var uri =  url;
   var httpreq =null;
   var target = null;
   var method =  m_ethod;
   var self = this;
   if (window.XMLHttpRequest) {
      httpreq = new XMLHttpRequest();
        } else {
      httpreq = new ActiveXObject("Microsoft.XMLHTTP");
    }
   
   
  this.request = function(params){
                 
         httpreq.onreadystatechange = function() {
                      if (httpreq.readyState == 4) {
                self.callback(httpreq.responseText,httpreq.status);        
             }
         }
         
        if (method == "POST") {
          httpreq.open("POST",uri,true);
          httpreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
          httpreq.setRequestHeader("Content-Length", params.length);
          httpreq.send(params);
        }
        else {
          httpreq.open("GET",uri+'?'+params,true);
          httpreq.send(null);
            
        }
        
   }
   
  this.callback = callbackFunction || function() { };   
   
    
  }
//--------------------------------------------------------------
