function AjaxManager(strPage, strContent) {
	this.strPage = strPage;
	this.strContent = strContent;

	AjaxManager.prototype.getContent=getContent;

	this.xmlhttp = false;
	// If the user is using Mozilla/Firefox/Safari/etc
	if (window.XMLHttpRequest) {
		//Intiate the object
		this.xmlhttp = new XMLHttpRequest();        
		if(this.xmlhttp.overrideMimeType){               
			//Set the mime type
			this.xmlhttp.overrideMimeType('text/xml');
		}            
	} else if (window.ActiveXObject) {
		//Intiate the object
		this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}	
	
	//function to call on event fire
	var eventAction = null;
	
	//subscribe a function to the event
	this.subscribe = function(fn) {
		eventAction = fn;
	};

	//fire the event
	this.fire = function(sender, eventArgs) {
		if(eventAction != null) {
			eventAction(sender, eventArgs);
		}
	}	
	
	// ****************************************************************************
	// getContent
	// ****************************************************************************
	function getContent() {		
		document.getElementById(this.strContent).innerHTML = "";
		// send to order processor
		this.xmlhttp.open('GET', this.strPage, true);			
		this.xmlhttp.onreadystatechange = (function(obj) 
    {
			return function()
			{
				if(obj.xmlhttp.readyState == 4 && obj.xmlhttp.status == 200) {
					document.getElementById(obj.strContent).innerHTML = obj.xmlhttp.responseText;
					// fire event
					obj.fire(null, {message: 'Nice'});						
				}				
			}
    })(this);
		this.xmlhttp.send(null);		
	}	
}
