//Load a new page of information. The pageid field only applies to the News page.
function processChange(pagename, pagetitle, menuchange, pageid)
{
	//document.getElementById("ajaxcontents").innerHTML = "<p>This is an AJAX test</p>";
	document.title = "Hair extensions, colouring - Taylor Ferguson - hairdresser Glasgow, Scotland"+pagetitle;
	document.getElementById("main").setAttribute("class", menuchange);
	document.getElementById("main").setAttribute("className", menuchange);
	var url="processajax.php?pagename=" + escape(pagename) + "&pageid=" + escape(pageid);
	url=url+"&dummy="+new Date().getTime();
	request.open("GET", url, true);
	request.onreadystatechange=showConfirmation;
	request.send(null);
}
function showConfirmation()
{
	if (request.readyState == 4)
	{
		if (request.status == 200)
		{
			var response = request.responseText;
			//Find the data to be deleted on the page
			var list=document.getElementById("ajaxcontents");
			//Create some replacement text
			document.getElementById("ajaxcontents").innerHTML = response;
		}
		else
		{
			document.getElementById("ajaxcontents").innerHTML = "<p>There was a problem connecting to the server. Please wait a few moments and try loading the page again.</p>";
		}
	}
}
