function requestSinglePage(pgName, idToFill)
{
	var xmlHttp;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	} 										catch (e)
	{	
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		document.getElementById(idToFill).innerHTML = "";
		if(xmlHttp.readyState==4)
		{
			document.getElementById(idToFill).innerHTML=xmlHttp.responseText;
		}	
	}
	// get the AJAX request for the main content
	xmlHttp.open("GET",pgName,true);
	xmlHttp.send(null);
}
function saveState(entry, value)
{
	var xmlHttp;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	} 										catch (e)
	{	
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function()
	{
		// do nothing (all server-side)
		// only using for saving state
		// triggering a $_SESSION change
	}
	// get the AJAX request for the main content
	xmlHttp.open("GET","savestate.php?entry="+entry+"&value="+value,true);
	xmlHttp.send(null);
}