Ajax = {
	Request:new Object(),
	BaseUrl:new String(),
	Url:new String(),
	Handlers:new Object(),
	Init:function(){
		if(window.XMLHttpRequest) {
	        try {
				Ajax.Request = new XMLHttpRequest();
	        } catch(e) {
				return false;
			}
		}else{
			try {
				Ajax.Request = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					Ajax.Request = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
					Ajax.Request = false;
				}
			}
		}
	},
	Get:function(Url){
		Ajax.Request.open("GET",Url,true);
		Ajax.Request.onreadystatechange = function(){
			switch(Ajax.Request.readyState){
				case 4:
					if(Ajax.Handlers.after !== undefined){
						Ajax.Handlers.after();
					}
				break;
				case 2:
					if(Ajax.Handlers.before !== undefined){
						Ajax.Handlers.before();
					}
				break;
			}
		};
		Ajax.Request.send(null);
	},
	Set:function(Url){
		Ajax.Request.open('POST',Url,true);
		Ajax.Request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		Ajax.Request.send(Ajax.Data);
		Ajax.Request.onreadystatechange = function(){
			switch(Ajax.Request.readyState){
				case 4:
					if(Ajax.Handlers.after !== undefined){
						Ajax.Handlers.after();
					}
				break;
				case 2:
					if(Ajax.Handlers.before !== undefined){
						Ajax.Handlers.before();
					}
				break;
			}
		}
	}
}