/* Ajax Script for SFU Surface page.
	Author: Dave "RogueEntity"
	Email: rogue@scifiunited.com
*/
// Initialise the XHR, bearing in mind IE always breaks things.

var http=false; // We didn't create an object yet
try {
	http = new ActiveXObject("Microsoft.XMLHTTP");
}	catch(e) { http=false; }

if(!http && typeof XMLHttpRequest!='undefined')
{
	try {
		http = new XMLHttpRequest();
	}	catch(e) { http=false; }
}
// We assume that the XHR was created successfully.
// If triggered, retreive page contents.
function getPage(params)
{
	var sss = './update.php';
	
	http.open("GET", sss + "?page=" + params, true);
	http.onreadystatechange = useHttpResponse;
	http.send(null);
}

// Update Page with new contents.
function useHttpResponse()
{
	if(http.readyState == 4)
	{
		document.getElementById("contents").innerHTML = http.responseText;
	}
}



