var panoramioReq;
function panoramioLoad(lat, lng) {
	if (window.ActiveXObject) {
		panoramioReq = new ActiveXObject("Microsoft.XMLHTTP");
	} else if (window.XMLHttpRequest) {
		panoramioReq = new XMLHttpRequest();
	}
	panoramioReq.onreadystatechange = panoramioProcessReqChange;
	panoramioReq.open("GET", "/panoramio.php?lat=" + lat + "&lng=" + lng);
	panoramioReq.send(null);
}
function panoramioProcessReqChange() {
	if (panoramioReq.readyState == 4) {
		document.getElementById("panoramiothumb").innerHTML = panoramioReq.responseText;
	}
}
function changePhoto(photoFileUrl, photoUrl, ownerUrl, ownerName, photoTitle) {
	document.getElementById("panoramiophoto").src = photoFileUrl;
	document.getElementById("panoramiophotolink").href = photoUrl;
	document.getElementById("panoramiouserlink").href = ownerUrl;
	document.getElementById("panoramiouserlink").innerHTML = ownerName;
	document.getElementById("panoramiophototitle").innerHTML = photoTitle;
	document.getElementById("panoramiosmall").style.visibility = "visible";
}