// JavaScript Document
function AJAX() {
	xmlHttp = GetXmlHttpObject();
	requestobj = new Object();
	this.responseText;
	
	function GetXmlHttpObject() {
		var xmlHttp=null;
		try
			{
			  // Firefox, Opera 8.0+, Safari
			  xmlHttp=new XMLHttpRequest();
			}
		catch (e)
			{
			// Internet Explorer
				try
				{
					xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch (e)
				{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
			}
		return xmlHttp;
	}
	
	function HTTPrequest(requestURL,responsefunction) {
			var method = (requestobj.method!==undefined) ? requestobj.method : "GET";
			if (xmlHttp==null)	{
				return;
			}
			xmlHttp.onreadystatechange=responsefunction;
			xmlHttp.open(method,requestURL,true);
			xmlHttp.send(null);
	}
	
	function returnrequest() {
		if (xmlHttp.readyState==4) {
			requestobj.func(xmlHttp.responseText);
		}
	}
	
	this.request = function(obj) {
		requestobj = obj;
		HTTPrequest(obj.url,returnrequest);
	}
	
}
