// JavaScript Document
function showPhoto(p) {
	getPhoto(p);
	return false;
}
function getPhoto(p) {
	var xPos=1;
	var yPos=1;
	//handle quirks of different browsers
	if(window.pageYOffset)
		yPos+=window.pageYOffset;
	else if(document.documentElement && document.documentElement.scrollTop)
		yPos+=document.documentElement.scrollTop;
	else if(document.body)
		yPos+=document.body.scrollTop;	
	
	var popup = document.getElementById('photopopup');
	var popupImg = document.getElementById('popupImage');
	
	popupImg.src = photos[p].src;
	popup.style.top=parseInt(yPos)+"px";
	popup.style.left=parseInt(xPos)+"px";
	popup.style.height=parseInt(popupImg.height)+"px";
	popup.style.width=parseInt(popupImg.width)+"px";
	popup.style.visibility = 'visible';
}
function hidePhoto() {
	var popup = document.getElementById('photopopup');
	popup.style.visibility = 'hidden';
}
