function getRecentPublication(page) // Creates a new checkUser function.
{

	
	xmlHttp_rp=GetXmlHttpObject_rp();

	if (xmlHttp_rp==null) // Checks whether the users browser allows ajax
	{
		alert ("Please use a browser that has ajax enabled!"); // Alerts if the users browser does not support ajax
		return; // Returns the function
	}

	var url_rp="get_rp.php"; // Creates a new variable called url
	url_rp=url_rp+"?page="+page; // Assigns an id to the php file (usercheck.php?id=user)

	xmlHttp_rp.onreadystatechange=stateChanged_rp; // If the forms state has changed
	xmlHttp_rp.open("GET",url_rp,true); // Gets a pages content using ajax
	xmlHttp_rp.send(null);


//	alert(url_rp);
}



function stateChanged_rp()
{
	if (xmlHttp_rp.readyState==4)
	{
	document.getElementById("ShowRecentPublication").value=xmlHttp_rp.responseText;
	}
}


function GetXmlHttpObject_rp()
{
	var xmlHttp_rp=null;
	try
	{
		xmlHttp_rp=new XMLHttpRequest();
	}
	catch (e)
	{
		try
		{
			xmlHttp_rp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp_rp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
return xmlHttp_rp;
}


