var debug = true;


	function ajax() {
	   this.method = 'GET';
	}
	
	ajax.prototype = {
	   // request calls a webservice
	   // onreadychange, calls the callback function through a inline function
	   // so the XmlHttpRequest object is transferred (and not lost) since we are not using lame global
	   // XMLHttpRequest variables.
	   // Optionally you add an referenceobject to be included.
	   // Since the callback is normally out of bounds of any object, you can use the reference object within your
	   // callback function.
	   request : function(url, callback, referenceobj) {
	      var xml_obj = false;
	      if (window.XMLHttpRequest) { // Mozilla, Safari,...
	          xml_obj = new XMLHttpRequest();
	          if (xml_obj.overrideMimeType) {
	              xml_obj.overrideMimeType('text/xml');
	          }
	      } else if (window.ActiveXObject) { // IE
	      
	          try {
	              xml_obj = new ActiveXObject("Msxml2.XMLHTTP");
              } catch (e) {
                  try {
                      xml_obj = new ActiveXObject("Microsoft.XMLHTTP");
                  } catch (e) {
                      alert('Cannot create XMLHTTP instance');
                  }
              }
          }
                    
          if (!xml_obj) {
             alert('Cannot create XMLHTTP instance');
             return false;
          }
          xml_obj.open('GET',url,true);
          xml_obj.onreadystatechange = function() { 
              if (referenceobj!=null) {
                callback(xml_obj, referenceobj);
              } else {
                callback(xml_obj);
              }
          };
          xml_obj.send(null);

	   }
	}
