/*  _ajax JavaScript framework, version 0.3a
 *  (c) 2006 Jonathan Borgne <skingecko.com>
 *  _ajax is freely distributable ,  all copywrites and comment blocks must
 * stay intact. You can modify if you wish, however it is not recommended
*/
var cls={make:function(){return function(){}}}

var _ajax = cls.make();
_ajax.prototype = {
	getResponse:function(URL,ID){
		var obj = sethttp();
		if(obj) {
			obj.open("GET", URL);
			obj.onreadystatechange = function(){
				if (obj.readyState == 4 && obj.status == 200) {
					document.getElementById(ID).innerHTML = obj.responseText;
					obj = false;
				}
			}
			obj.send(null);
		}
	},
	responseText:function(URL){
		var obj = sethttp();
		if(obj) {
			obj.open("GET", URL);
			obj.onreadystatechange = function(){
				if (obj.readyState == 4 && this.obj.status == 200) {
					return obj.responseText;
					obj = false;
				}
			}
			obj.send(null);
		}
	}
}

function sethttp() {
	if (window.XMLHttpRequest) { //IE7, Mozilla, Safari,...
		return new XMLHttpRequest();
	} else if (window.ActiveXObject) { // IE
		try {
			return new ActiveXObject('MSXML2.XMLHTTP.3.0');
		} catch (e) {
			try {
			   return new ActiveXObject('Msxml2.XMLHTTP');
			} catch (e) {
				try {
					return new ActiveXObject('Microsoft.XMLHTTP');
				} catch (e) {}
			}
		}
	} 
  }
	
	
	
	
	
