<!--
//// JavaScript Navigation for slide
// Variables from setup.js: nextPageUrl, prevPageUrl, indexPageUrl, firstPageUrl, lastPageUrl
function nextPage() {
	document.location=nextPageUrl;
	takenAction = false;
}
function prevPage() {
	document.location=prevPageUrl;
	takenAction = false;
}
function indexPage() {
	document.location=indexPageUrl;
	takenAction = false;
}
function firstPage() {
	document.location=firstPageUrl;
	takenAction = false;
}
function lastPage() {
	document.location=lastPageUrl;
	takenAction = false;
}
function zoom() {
	if (zoomPageUrl != "")
		document.location=zoomPageUrl;
	takenAction = false;
}
function navSlideShow() {
	if (readCookie('orig_slideShow') == 'true') {
		stopSlideShow();
		document.location.reload(false); 
	} else {
		setSlideShowCookie();
		nextPage();
	}
	takenAction = false;
}

function setSlideShowCookie() {
	saveCookie('orig_slideShow', 'true');
}
 
function stopSlideShow() {
	try {
		clearTimeout(timeout);
	} catch(e) {
	}
	saveCookie('orig_slideShow', '', -1);
}

function navToggleInfo() {
	toggleEXIFInfo();
	takenAction = false;
}
function navToggleComment() {
	toggleCommentInfo();
	takenAction = false;
}

function getWindowWidth() {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return x;
}

function getWindowHeight() {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return y;
}

function resizePhoto(origWidth, origHeight) {
	windowWidth = getWindowWidth();
	windowHeight = getWindowHeight();
	displayWidth = origWidth;
	displayHeight = origHeight;

	if (origWidth > windowWidth-20)
	{
		displayWidth = windowWidth-20;
		displayHeight = (displayWidth*origHeight)/origWidth;
		if (displayHeight > windowHeight-20)
		{
			displayHeight = windowHeight-20;
			displayWidth = (displayHeight*origWidth)/origHeight;
		}
	}
	else if (origHeight > windowHeight-20)
	{
		displayHeight = windowHeight-20;
		displayWidth = (displayHeight*origWidth)/origHeight;
	}
	document.getElementById('photo').style.width = displayWidth + "px";
	document.getElementById('photo').style.visibility = "visible";
}
 

-->
