function clearTemp()
{
	var dt = new Date().getTime()
	ajax("app_code/clearTemp.php?dt="+dt)
}

function setImage(src)
{
	document.getElementById("span_largerImage").innerHTML="<img src='"+src+"'>"
}

function deleteEstablishment(estID, rowID, role)
{
	if(confirm('Are you sure you want to delete this establishment?'))
	{	
		var xmlhttp=new GetXmlHttpObject();
		
		xmlhttp.onreadystatechange= function()
		{
			if (xmlhttp.readyState==4)
			{
				window.location.reload()
			}
		}
	
		dt = new Date().getTime()
		
		xmlhttp.open("GET", 'app_code/deleteEstablishment.php?estID='+estID+"&dt="+dt, true);
		xmlhttp.send(null);
	}
}

function changeStatus(estID, picID)
{
	var xmlhttp=new GetXmlHttpObject();
	
	xmlhttp.onreadystatechange= function()
	{
		if (xmlhttp.readyState==4)
		{
			document.getElementById(picID).src=xmlhttp.responseText
		}
	}

	dt = new Date().getTime()
	
	xmlhttp.open("GET", 'app_code/changeStatus.php?estID='+estID+"&dt="+dt, true);
	xmlhttp.send(null);
}
