ContentDispatcher = Class.create();
ContentDispatcher.prototype = {
	initialize: function(section) {
		this.currentSection		= section;
		this.contentCage		= 'dispatchedContent';
	},
	
	getContent: function(section) {
		if(Ajax.activeRequestCount == 0 && this.currentSection != section) {
			this.currentSection = section;
			var url = section + '.php';
			
			var myAjax = new Ajax.Updater(this.contentCage,url,{method: 'post'});
		}
	},
	
	sendMessage: function() {
		if($F('firstName') == '')		alert('Please enter a first name');
		else if($F('lastName') == '')	alert('Please enter a last name');
		else if($F('address1') == '')	alert('Please enter an address');
		else if($F('city') == '')		alert('Please enter a city');
		else if($F('state') == '')		alert('Please enter a state');
		else if($F('zip') == '')		alert('Please enter a zip');
		else if($F('phone') == '')		alert('Please enter a phone');
		else if($F('email') == '')		alert('Please enter an email');
		else {
			var pars = Form.serialize('contactForm') + '&doSubmit=1';
			
			var myAjax = new Ajax.Updater(this.contentCage,'contact.php',{method: 'post',parameters: pars});
		}
	}
}