// Updates the content of the underlying div tag (via AJAX) to match the menu option just chosen
// in flash
function swapContent(newContent) {
	// Make an AJAX request
	sendAJAX(newContent, 'GET', 'updateContent', '', true)
}

// Updates the content with that received from the server
function updateContent(http) {
	// We have to make sure the XMLhttp object is ready before we go on,
	// to do this we can just check it's state; it has 5 of them, we should
	// be the last (number 4)
	/*	0: Uninitialized
		1: Loading
		2: Loaded
		3: Interactive
		4: Finished */
	if(http.readyState == 4) {
		// Set the content of the div
		document.getElementById('contentSansMenu').innerHTML = http.responseText;
	}
}

// Alerts the content in the div tag
function showContent() {
	alert(document.getElementById('contentSansMenu').innerHTML);
}