<ja:include once page="bsh/vars.bsh">Code NOT Included</ja:include>
<ja:include once page="bsh/base.bsh">Code NOT Included</ja:include>
<ja:include once page="bsh/common.bsh">Code NOT Included</ja:include>
<ja:include once page="bsh/photographic-meta-info.bsh">Code NOT Included</ja:include>
<ja:include once page="bsh/slide.bsh">Code NOT Included</ja:include>

<% setupOriginalSlide() %>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title><%= getCurrentSlideFullTitle() %></title>

	<!-- Include Header Common Parts -->
	<ja:include page="includes/header.inc" />

	<ja:if test="<%= isVariableValueEqual( USER_VAR_INCLUDE_BLENDING_EFFECT_ON_SLIDES, imageDirectory, true ) %>">
		<!-- Blending/Fading effect -->
		<meta http-equiv="page-enter" content="blendTrans(Duration=0.5)">
		<meta http-equiv="page-exit" content="blendTrans(Duration=0.5)">
	</ja:if>

	<!-- Page Setup -->
	<script language="javascript" type="text/javascript">
		<ja:include page="includes/setup-slide-common.js">JavaScript Code NOT Included</ja:include>
		<ja:include page="includes/setup-slide.js">JavaScript Code NOT Included</ja:include>
	</script>

	<ja:if test="<%= hasSlideMetaData() %>">
		<!-- Photographic meta information Support -->
		<script language="javascript" type="text/javascript" src="$resPath/js/photographic-meta-info.js"></script>
	</ja:if>

	<!-- Navigation Support -->
	<script language="javascript" type="text/javascript" src="$resPath/js/nav-slide.js"></script>

	<ja:if test="<%= isVariableValueEqual( USER_VAR_INCLUDE_KEYBOARD_SUPPORT, imageDirectory, true ) %>">
		<!-- Keyboard Support -->
		<script language="javascript" type="text/javascript" src="$resPath/js/keyboard.js"></script>
	</ja:if>

	<ja:if test="<%= isVariableValueEqual( USER_VAR_INCLUDE_SLIDE_SHOW, imageDirectory, true ) %>">
		<!-- SlideShow Support -->
		<script language="javascript" type="text/javascript" src="$resPath/js/slideshow.js"></script>
	</ja:if>
</head>

<body id="body" onload="startSlideShowCountDown();">
	<%
		String voicePath = getSlideVoiceAnnotationPath();
		String commentVerticalPosition = readUserVariableAsString(USER_VAR_SLIDE_COMMENT_VERTICAL_POSITION, imageDirectory, DEFAULT_SLIDE_COMMENT_VERTICAL_POSITION);
		String slideBackgroundPath = getSlideBackgroundPath();

        String upAction = getActionBlock("javascript:upPage()", "$text.index-page", getIconSetPath(imageDirectory) + "/index.gif");
	%>

	<ja:include page="includes/slide-photographic-meta-info.inc" />
	<ja:include page="includes/help.inc" />

	<!-- table for entire slide page -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="100%" height="100%">
				<!-- table for top path bar -->
				<ja:include page="includes/slide-topbar.inc" />
			</td>
		</tr>
		<tr>
			<td>
				<!-- table of navigation icons and slide image -->
				<ja:if test="<%= slideBackgroundPath!=null %>">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" background="<%= slideBackgroundPath %>">
						<tr>
							<td height="5"><img src="$resPath/empty.gif" alt=""/></td>
						</tr>
				</ja:if>
				<ja:else>
					<table class="pagebody" width="100%" border="0" cellspacing="0" cellpadding="0">
				</ja:else>
					<ja:if test="<%= commentVerticalPosition.trim().equalsIgnoreCase("TOP_ABOVE_NAVIGATION") %>">
						<!-- Slide comment -->
						<ja:include page="includes/slide-comment.inc" />
					</ja:if>

					<ja:if test="<%= hasTopNavigationBar() %>">
						<tr valign="top">
							<td width="100%">
								<ja:include page="includes/slide-top-navigation.inc" />
							</td>
						</tr>
					</ja:if>

					<ja:if test="<%= commentVerticalPosition.trim().equalsIgnoreCase("TOP_UNDER_NAVIGATION") %>">
						<!-- Slide comment -->
						<ja:include page="includes/slide-comment.inc" />
					</ja:if>

					<tr>
						<td class="topruler"/>
					</tr>

					<tr>
						<td width="100%">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td align="left" width="<%= getThumbLinksColumnWidth(); %>">
										<!-- table for slide page left thumbnail bar -->
										<% writeThumbnails(false); %>
									</td>
									<td width="100%" align="center" nowrap="nowrap">
										<!-- table for slide image is generated by an external function -->
										<% writeCurrentSlide(); %>

										<!-- Slide information (such as name, date and so) -->
										<ja:include page="includes/slide-info.inc" />
									</td>
									<td align="right" width="<%= getThumbLinksColumnWidth(); %>">
										<!-- table for slide page right thumbnail bar -->
										<% writeThumbnails(true); %>
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td class="bottomruler"/>
					</tr>

					<ja:if test="<%= commentVerticalPosition.trim().equalsIgnoreCase("BOTTOM") %>">
						<!-- Slide comment -->
						<ja:include page="includes/slide-comment.inc" />
					</ja:if>

					<ja:if test="<%= voicePath!=null %>">
						<!-- Add and play voice annotations -->
						<tr width="100%">
							<td width="100%" align="center">
								<ja:if test="<%= isVariableValueEqual( USER_VAR_SHOW_AUDIO_CONSOLE, imageDirectory, true ) %>">
									<embed src="<%= voicePath %>" height="20" width="150" controls="console" autostart="true"></embed>
								</ja:if>
								<ja:else>
									<embed src="<%= voicePath %>" hidden="true" height="0" width="0" autostart="true"></embed>
								</ja:else>
							</td>
						</tr>
					</ja:if>

					<ja:if test="<%= hasBottomNavigationBar() %>">
						<tr valign="top">
							<td width="100%">
								<ja:include page="includes/slide-bottom-navigation.inc" />
							</td>
						</tr>
					</ja:if>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<!-- Page Footer -->
				<ja:include page="includes/footer.inc" />
			</td>
		</tr>
	</table>

	<ja:if test="<%= !readUserVariableAsString( USER_VAR_ONLINE_PRINTING_SUPPORT, imageDirectory, DEFAULT_ONLINE_PRINTING_SUPPORT ).trim().equals("none") %>">
		<!-- Adding online printing support -->
		<ja:include page="printing.inc" />
	</ja:if>

	<script language="javascript" type="text/javascript">pageSetup();</script>
</body>
</html>