function setupChanges() {
	/* this is called when the page loads by the very bottom section of lightbox.js */
	/* Basically finds every element with the class 'changePage' and creates a new 'page' object out of it */
	pages = document.getElementsByClassName('changePage')
	for(i = 0; i < pages.length; i++){
		
		p = new page(pages[i])
	}
}

var bookFlag = 0;
function enableBooking() {

	if (bookFlag == 1) {
		bookFlag = 0;
		$('booking').innerHTML = "";
	} {	
		bookFlag = 1;
		$('booking').innerHTML = "For bookings call (02) 6239 4142";
	}

}

function disableBooking() {
	$('booking').innerHTML = "";
}

var page = Class.create()

page.prototype = {
 
	initialize: function(host) {
		/* called whenever a page object is created */
		this.content = host.href;
		/* this next line sets it up so that when you click the object it calls the change function. 
		   It's tough to understand by looking at it, for a better explanation ask paul in person */
		Event.observe(host, 'click', this.change.bindAsEventListener(this), false)
		host.onclick = function(){return false}
	},

	change: function() {
		AjaxHandler.sendRequest(this.content, this.processResults)
	},

	processResults: function(results) {
		contentPanel = document.getElementById('imageblock')
		contentPanel.innerHTML = results
	}

}
