function n__ajaxRequest(n__requestType, n__requestURL, n__requestParam, n__asynchronous, n__sendNoCache)
{
	var n__ajaxRequest = {

		n__ajaxRequestObject : new getHTTPObject(),
		
		n__requestAsync : n__asynchronous,
		n__requestType : n__requestType,
		n__requestURL : n__requestURL,
		n__requestParam : n__requestParam,
		n__sendNoCache : n__sendNoCache,

		n__timeoutTimer : null,

		n__onResponse : function(n__responseText){},
		n__onError : function(err){},
		
		n__process : function()
		{
			this.n__requestType = this.n__requestType.toUpperCase();

			var n__param = "";
			
			//if we want to allow caching, then dont pass the random number
			if(this.n__sendNoCache)
			{
				n__param = 'noCache=' + (new Date()).getTime() + '&' + this.n__requestParam;
			}
			else
			{
				n__param = this.n__requestParam;				
			}

			if (this.n__ajaxRequestObject.readyState == 4 || this.n__ajaxRequestObject.readyState == 0) 
			{	
				var n__requestURL = this.n__requestURL;
				
				//if we are doing a get submission, then add the parameters to the header
				if(this.n__requestType == "GET")
				{
					n__requestURL += "?" + n__param;
				}				

				this.n__ajaxRequestObject.open(this.n__requestType, n__requestURL, this.n__requestAsync);
				this.n__ajaxRequestObject.onreadystatechange = n__handleAjaxRequest; 
				
				if(this.n__requestType == "POST")
				{
					this.n__ajaxRequestObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					//this.n__ajaxRequestObject.setRequestHeader("Connection", "close");
					this.n__ajaxRequestObject.send(n__param);
				}
				else
				{
					this.n__ajaxRequestObject.send(null);
				}
				
				//abort the request after 20 seconds, try to abort the request, and throw onError
				this.n__timeoutTimer = setTimeout( function()
												{
													try{n__ajaxRequest.n__ajaxRequestObject.abort();}catch(err){};
													n__ajaxRequest.n__onError("timeout");
												}, 20000);
			}

			function n__handleAjaxRequest()
			{
				
				if (n__ajaxRequest.n__ajaxRequestObject.readyState == 4) 
				{	
					//clear the timeout timer
					try{clearTimeout(n__ajaxRequest.n__timeoutTimer);}catch (err){};

					try
					{
						n__ajaxRequest.n__onResponse(n__ajaxRequest.n__ajaxRequestObject.responseText);	
					}
					catch (err)
					{
						n__ajaxRequest.n__onError(err);
					}

					//avoid memory leak
					try{n__ajaxRequest.n__ajaxRequestObject.onreadystatechange = null;}catch(err){};
					try{n__ajaxRequest.n__ajaxRequestObject.abort();}catch(err){};
				}
			}
		},
		
		abort : function()
		{
			clearTimeout(n__ajaxRequest.n__timeoutTimer);
			try
			{
				this.n__ajaxRequestObject.abort()	
			}
			catch (err){}
		}
	}
	return n__ajaxRequest;
}