<%--
	ExhibitPlus V1.4a 25.10.2005. Author: Mark Fyvie. Official site: http://exhibitplus.fyvie.net

	****************************************************************************************************************
	Please take note: If you plan to modify this skin, including modifications which may affect the resulting HTML:
 
	The output from this skin has been authored as XHTML 1.0 - this is a very strict DOCTYPE.
 
	Ensure that you do *NOT* use depreciated HTML elements, and that any modifications you make conform to XHTML 1.0
	If you have modified the skin, please check your generated pages at validator.w3.org to ensure compliance!
	****************************************************************************************************************

	Allow variables to be overridden on a per folder basis (see below)
--%>
<ja:include once page="slide.bsh">slide.bsh not included</ja:include>
<ja:include page = "variables.inc"></ja:include>
<%
	time = new se.datadosen.util.Timer();
	time.start();

	variableInitSlide();
	utils.imageCalc(); // This routine calculates values to be used later for the padding around the image.It allows for dynamic image sizes, and adjusts the and dimensions automatically
%>

<ja:if exists="originalPath">
<%
	String originalPage = originalPath;	// Default if no extra template page
	File template = new File(skinDirectory, "originalslide.htt");
	if (template.exists()) {
		originalPage = "orig_"+fName+engine.getPageExtension();
		engine.processTemplateFile(template, new File(outputDirectory,"slides/"+originalPage));
	}
%>
</ja:if>

<ja:if test="${metaPresent}"></ja:if>
<ja:else><ja:if exists="cameraMake"><% metaPresent = true; %></ja:if>
<ja:else><ja:if exists="cameraModel"><% metaPresent = true; %></ja:if></ja:else></ja:else>

<% // if we are advertising Firefox, introduce some randomness to show the different logos on all the pages
	firefoxCheck(); // This method is found in index.bsh
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$language">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=$textEncoding" />
<meta name="Keywords" content="photo album,gallery,photo gallery,digital,photo,gallery,online,exhibitplus_v_onepointfour" />
<title>${label}</title>
<link href="${resPath}/basestyle.css" rel="stylesheet" />
<link href="${resPath}/$style" rel="stylesheet" />
<!-- Include styles.inc from root image directory if present -->
<ja:include page="$rootPath/styles.inc"></ja:include>
<ja:if test="${keyboardShortcuts}">
	<script type="text/javascript">
	<!-- 
	var nextPageUrl = "<% if (imageNum == totalImages ) ( (slideShowContinuous) ? out.print("$firstPage") : out.print("#") ); else  out.print("$nextPage");%>";
	var prevPageUrl = "<% if (imageNum == 1 ) ( (slideShowContinuous) ? out.print("$lastPage") : out.print("#") ); else out.print("$previousPage");%>";
	var indexPageUrl = "../" + "$indexPage";
	var firstPageUrl = "$firstPage";
	var lastPageUrl = "$lastPage";
 	var zoomPageUrl = "<ja:if exists="originalPath">${originalPage}</ja:if><ja:else>#</ja:else>";
	var isSlideShow = true;
	-->
	</script>
	<script type="text/javascript" src="${resPath}/keyboard.js">
	</script>
	<script type="text/javascript" src="${resPath}/navslide.js">
	</script>
</head>
<body onload="initPage();initKeyboard();">
</ja:if>
<ja:else>
</head>
<body onload="initPage();">
</ja:else>
<noscript><div style="position: absolute; bottom: 25px; left: 5px"><img src="${resPath}/warning_icon.gif" alt="$text.noscriptWarning" title="$text.noscriptWarning" /></div></noscript>

<ja:if exists="next">			
	<script type="text/javascript">
	<!--
		next_image = new Image();
		next_image.src = "${next.imagePath}";
	-->
	</script>
</ja:if>

<!-- Include header.inc from root image directory if present -->
<ja:include page="<%=globalHeader ? out.print(rootPath):out.print(imageDirectory);%>/header.inc"><ja:include page="$rootPath/header.inc"></ja:include></ja:include>
 
<ja:if test="${shutterfly}"><ja:include page="shutterfly_xhtml.inc" /></ja:if>
 
<ja:if test="${displayEXIFuserselect}">
	<!-- EXIF INFO SCRIPT -->
	<script type="text/javascript">
	<!--
	showing = false;
	function toggleEXIFInfo() {
		if (showing == false) {
			if (document.all || document.getElementById)
				document.getElementById('photoDataPopup').style.visibility="visible";	
			<ja:if test="${keyboardShortcuts}">
				document.getElementById('keyboardDataPopup').style.visibility="hidden";	
			showingKeyboard = false;
			</ja:if>
			showing = true;
		} else {
			if (document.all || document.getElementById)
				document.getElementById('photoDataPopup').style.visibility="hidden";
			showing = false;
		}	
	}
	-->
	</script>
</ja:if>

<ja:if test="${keyboardShortcuts}">
	<!-- KEYBOARD INFO SCRIPT -->
	<script type="text/javascript">
	<!--
	showingKeyboard = false;
	function toggleKeyboardInfo() {
		if (showingKeyboard == false) {
			if (document.all || document.getElementById)
				document.getElementById('keyboardDataPopup').style.visibility="visible";
			<ja:if test="${metaPresent}"><ja:if test="${displayEXIFuserselect}">
				document.getElementById('photoDataPopup').style.visibility="hidden";
			showing = false;
			</ja:if></ja:if>
			showingKeyboard = true;
		} else {
			if (document.all || document.getElementById)
				document.getElementById('keyboardDataPopup').style.visibility="hidden";
			showingKeyboard = false;
		}	
	}
	-->
	</script>
</ja:if>
 
<ja:if test="${protectSlideImages}">
	<script type="text/javascript">
	<!--
	var message="$text.noRightClick"; // Message for the alert box 
	function click(e) { 
		if (document.all) { 
			if (event.button == 2) { 
				alert(message); 
				return false; 
			} 
		} 
		if (document.layers) { 
			if (e.which == 3) { 
				alert(message); 
				return false; 
			} 
		} 
	} 
	if (document.layers) { 
		document.captureEvents(Event.MOUSEDOWN); 
	} 
	document.onmousedown=click;
	-->
	</script>
</ja:if>
 
<script type="text/javascript">
<!--
function saveCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000))
		var expires = "; expires="+date.toGMTString()
	}
	else expires = ""
	document.cookie = name+"="+value+expires+"; path=/"
}
function readCookie(name) {
	var nameEQ = name + "="
	var ca = document.cookie.split(';')
	for(var i=0;i<ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length)
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)
	}
	return '';
}
function setSlideShowCookie() {
	saveCookie('slideShow', 'true');
}
 
function moveOn() {
<%
if (nextPage != void || slideShowContinuous) {
	out.print("	document.location.href = \"");
	if (imageNum == totalImages )  out.print("$firstPage"); else  out.print("$nextPage");	
	out.print("#theSlide" + "\";");
}
%>
}
function stopSlideShow() {
	try {
		clearTimeout(timeout);
	} catch(e) {
	}
	saveCookie('slideShow', '', -1);
}
 
var timeout = null;
function initPage() {
	if (readCookie('slideShow') == 'true') {
	<ja:if test="<%=((imageNum == totalImages) && !(slideShowContinuous)) %>">
			saveCookie('slideShow', '', -1);
	</ja:if>
	<ja:else>
		timeout = setTimeout('moveOn()', <%=slideShowDelay * 1000%>);
	</ja:else>
	}
}
-->
</script>

<div><map name="ee_multiarea" id="ee_multiarea">
	<ja:if exists="previousPage">
		<area alt="$text.previousPhoto" title="$text.previousPhoto" shape="rect" coords="0,0,${imageWidthBy3},${imageHeight}" href="$previousPage" style="cursor: w-resize;" />
	</ja:if>
	<ja:else>
		<area alt="$text.atFirstPhoto" title="$text.atFirstPhoto" shape="rect" coords="0,0,${imageWidthBy3},${imageHeight}" />
	</ja:else>
	<ja:if exists="nextPage">
		<area alt="$text.nextPhoto" title="$text.nextPhoto" shape="rect" coords="${imageWidthDoubleBy3},0,${imageWidth},${imageHeight}" href="$nextPage" style="cursor: e-resize;" />
	</ja:if>
	<ja:else>
		<area alt="$text.atLastPhoto" title="$text.atLastPhoto" shape="rect" coords="${imageWidthDoubleBy3},0,${imageWidth},${imageHeight}" />
	</ja:else>
	<ja:if exists="originalPath">
		<area alt="$text.viewFullSizeImage" title="$text.viewFullSizeImage" shape="rect" coords="${imageWidthBy3},0,${imageWidthDoubleBy3},${imageHeight}" href="${originalPage}" style="cursor: crosshair;" />
	</ja:if>
	<ja:else>
		<area alt="$text.thumbnailPage" title="$text.thumbnailPage" shape="rect" coords="${imageWidthBy3},0,${imageWidthDoubleBy3},${imageHeight}" href="../$indexPage" style="cursor: crosshair;" />
	</ja:else>
</map></div>

<!-- Cut here for nav stuff (begin) -->
 
<div id="centercontent">

<ja:if test="${multiNavSlide}">	
	<!-- Multilevel index links for index page -->
	<span class = "folderNavigation"><% indexLinksSlide (); %></span><div style="padding: 4px"></div>
	<!-- End multilevel index links for index page -->
</ja:if>	

<ja:if test="<%=( (navigationTop || portraitMode) && ( navigationTop || navigationBottom ) )%>">

<ja:if test="${landscapeMode}"><div class="minithumbBox">${miniThumbHTML}</div></ja:if>
<ja:if test="${portraitMode}"><div id="buttonbox_portrait"></ja:if>

${navElementHTML}

<ja:if test="${portraitMode}"></div></ja:if>
<ja:else>
<br /><ja:if test="${showPhotoName}"><span class="photoName">${label} &nbsp;</span><span class="photoPosition">[$imageNum $text.of $totalImages]</span></ja:if><br />
 
<br /><br />
<ja:if test="${portraitMode}"><!-- Cut here for nav stuff (end) --></ja:if>

</ja:else>
</ja:if>
<!--Without this comment IE6 doesn't display the nav buttons in the correct postion! -->

<ja:if test="${commentAboveSlide}"><div class="photoComments" style="position: relative; top: -5px; width: 88%; margin:0 auto; margin-top: 5px"><ja:if exists="comment">${comment}</ja:if></div></ja:if>

<ja:if test="${portraitMode}"><div id="photonavbar_inside_portrait"><div class="minithumbBox">${miniThumbHTML}</div></div></ja:if>
 
<div id ="frame" style="width: ${imageFrameWidth}px">
	<div id="toolTipAnchor"></div>
	<div class="slideFrameButtons" style="top: <%=utils.imageFrameHeight-23%>px">
 
		<!-- Add a download link to the original image if appropriate -->
		<ja:if exists="originalPath">
			<% originalPathFileSize = formatNumber(((float)fileSize)/1024/1024); %>
			<a href="$originalPath"><img src="${resPath}/download.gif" style="float: right" alt="$text.downloadOriginalImage (${originalPathFileSize} $text.MB)" title="$text.downloadOriginalImage (${originalPathFileSize} $text.MB)" /></a>
		</ja:if>
 
		<ja:if test="${shutterfly}">
			<!-- Add a link to order prints online -->
			<a onclick="stopSlideShow();" href="javascript:submitOrderForm()"><img src="${resPath}/orderprints.gif" style="float: right" alt="$text.orderPrint" title="$text.orderPrint" /></a>
		</ja:if>

		<ja:if test="${metaPresent}"><ja:if test="${displayEXIFuserselect}">
			<!-- EXIF Button -->
			<a href="javascript:toggleEXIFInfo()"><img src="${resPath}/info.gif" style="float: right" alt="$text.showEXIF" title="$text.showEXIF" /></a>
		</ja:if></ja:if>

		<ja:if test="${keyboardShortcuts}">
			<!-- Add a help button to explain keyboard shortcuts -->
			<a href="javascript:toggleKeyboardInfo()"><img src="${resPath}/help.gif" style="float: right" alt="$text.showKeyboard" title="$text.showKeyboard" /></a>
			<div id="keyboardDataPopup" class="keyboardDataPopup">
				$text.keyboard1<ja:if test="${metaPresent}"><ja:if test="${displayEXIFuserselect}">$text.keyboard2</ja:if></ja:if><ja:if exists="originalPath">$text.keyboard3</ja:if>
			</div>
		</ja:if>
	</div>
	<a id="theSlide"></a>
	<ja:if test="${portraitMode}"><ja:if test="${showPhotoName}"><span class="photoName" style="position: absolute; top: 3px; width: ${imageFrameWidth}px; z-index:3; text-align: center">${label} &nbsp;<span class="photoPosition">[$imageNum $text.of $totalImages]</span></span></ja:if></ja:if>
        <strong><a href="http://www.fyvie.net/photos/info_exhibitplus.html" title="Visit the ExhibitPlus homepage" style="position: absolute; z-index:-1; left: ${imagePaddingSlide}px; top: ${imagePaddingSlide}px">ExhibitPlus</a></strong>
	<img src="$imagePath" width="${imageWidth}" height="${imageHeight}" alt="${label} ${comment}" title="${label} ${comment}" style="margin-left: ${imagePaddingSlide}px; margin-right: ${imagePaddingSlide}px; margin-top: ${imagePaddingSlide}px; margin-bottom: <%=utils.imagePaddingBottom-2%>px" usemap="#ee_multiarea" />
</div>

<ja:if test="${displayW3CLogosOnSlide}"><ja:if test="${portraitMode}">
	<div style="position: absolute; top: <%=utils.imageFrameHeight-28%>px;"> 
		<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a>		
		<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="position: relative; bottom: 67px; display: block" src="http://jigsaw.w3.org/css-validator/images/vcss.gif" alt="valid CSS!" /></a>
		<ja:if test="${promotionalLogos}"><div style="position: relative; border: 0px; bottom: 133px; display: block">${promotionBanner}</div></ja:if>
	</div>
</ja:if></ja:if>

<ja:if not test="${commentAboveSlide}"><div class="photoComments"><ja:if exists="comment">${comment}</ja:if></div></ja:if>
<br />
<ja:if test="${metaPresent}"><ja:if not test="${displayEXIFnever}">

<ja:if test="${displayEXIFalways}">
	<div class="photoData">
</ja:if>
<ja:else>
	<div id="photoDataPopupBase" class="photoDataPopupBase">
	<div id="photoDataPopup" class="photoDataPopup">
</ja:else>
	<% loadMetaArray(); %>
	</div> 
<ja:if test="${displayEXIFuserselect}"></div></ja:if>
<ja:else><br /></ja:else>
</ja:if></ja:if>
 
<ja:if test="${navigationBottom}"><ja:if test="${landscapeMode}">
<!-- Cut here for nav stuff (begin) -->
 
<div class="minithumbBox">${miniThumbHTML}</div>

<div>
<ja:if test="${navigationTop}"></ja:if><ja:else><ja:if test="${showPhotoName}"><div class="photoName">${label} &nbsp;</div><div class="photoPosition">[$imageNum $text.of $totalImages]</div><div style="clear: left"></div></ja:if></ja:else>

${navElementHTML}

</div>
 
<!-- Cut here for nav stuff (end) -->
<br /><br />
</ja:if></ja:if>

<!-- Include visitor comment routine if present and required -->
<ja:if test="${guestBook}"><ja:include page="guestbook.inc" /></ja:if>

<!-- Include footer.inc from image directory if present -->
<ja:include page="<%=globalFooter ? out.print(rootPath):out.print(imageDirectory);%>/footer.inc"><ja:include page="$rootPath/footer.inc"><br /></ja:include></ja:include>
 
<ja:if test="${displayW3CLogosOnSlide}"><ja:if test="${landscapeMode}">
	<div id="w3clogosleft"> 
		<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a>		
		<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="http://jigsaw.w3.org/css-validator/images/vcss.gif" alt="valid CSS!" /></a>
		<ja:if test="${promotionalLogos}">${promotionBanner}</ja:if>
	</div>
</ja:if></ja:if>
</div>
<!--Generated: <% out.print(time); time.stop(); %>-->
<%-- System.out.println(time); --%>

</body>
</html>
