function HTTP()
{
	this.toString = function() { return "HTTP Status Object"; }
	
	this.status = function( _status )
	{
		switch( _status )
		{
			case 200:
				return "success";
				break;
			case 404:
				return "File not found.";
				break;
			default:
				return "HTTP Status: " + _status;
		}
	}
}



function Ajax()
{
	this.toString = function() { return "Ajax Engine Object"; }
	this.http = new HTTP();
	
	this.makeRequest = function( _method, _url, _callbackMethod, _args )
	{
		this.request = ( window.XMLHttpRequest )? new XMLHttpRequest(): new ActiveXObject("MSXML2.XMLHTTP"); 
		this.request.onreadystatechange = _callbackMethod;
		this.request.open( _method, _url, true );
		this.request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		this.request.send( _args );	
	}
	
	this.checkReadyState = function()
	{
		if ( this.request.readyState == 4 ) 
		{
			return this.http.status( this.request.status );
		}
	}
}