<ja:include once page="bsh/slide.bsh">Code NOT Included</ja:include>

<%
	Common commonModel = (Common)slideModel;
	AbstractSlide absSlideModel = (AbstractSlide)slideModel;

	slideModel.updateVars();
	slideModel.setupOriginalSlide();
%>

<ja:include page="includes/html-header.inc" />
<html>
<head>
	<title><%= slideModel.getCurrentSlideFullTitle() %></title>

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

	<ja:if test="<%= slideModel.isVariableValueEqual( Constants.USER_VAR_INCLUDE_META_TAGS_ON_SLIDES, imageDirectory, true ) %>">
		<!-- Include Meta-Tags -->
		<ja:include page="includes/metatags-header.inc" />
	</ja:if>

	<ja:if test="<%= slideModel.isVariableValueEqual( Constants.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>

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

	<ja:if test="<%= slideModel.isVariableValueEqual( Constants.USER_VAR_INCLUDE_VIEWER_REMARKS_FEATURE_ON_SLIDES, imageDirectory, true ) %>">
		<!-- Remarks Support -->
		<script language="javascript" type="text/javascript" src="$resPath/js/remarks.js"></script>
	</ja:if>

	<ja:if test="<%= slideModel.isVariableValueEqual( Constants.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="<%= slideModel.isVariableValueEqual( Constants.USER_VAR_INCLUDE_SLIDE_SHOW, imageDirectory, true ) %>">
		<!-- SlideShow Support -->
		<script language="javascript" type="text/javascript" src="$resPath/js/multiple-onloads.js"></script>
		<script language="javascript" type="text/javascript" src="$resPath/js/slideshow.js"></script>
	</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>
</head>

<body id="body">
	<%
		String voiceAnnotationConsole = slideModel.getSlideVoiceAnnotationConsole();
		String slideBackgroundPath = slideModel.getSlideBackgroundPath();

        String upAction = slideModel.getActionBlock("javascript:upPage()", "$text.index-page", slideModel.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="slide-pagebody" width="100%" border="0" cellspacing="0" cellpadding="0">
				</ja:else>
					<ja:if test="<%= slideModel.isSlideCommentAtTopAboveNavigation() %>">
						<!-- Slide comment -->
						<ja:include page="includes/slide-comment.inc" />
					</ja:if>

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

					<ja:if test="<%= slideModel.isSlideCommentAtTopBelowNavigation() %>">
						<!-- 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="<%= slideModel.getThumbLinksColumnWidth(); %>">
										<!-- table for slide page left thumbnail bar -->
										<%= slideModel.getThumbnails(false); %>
									</td>
									<td width="100%" align="center" nowrap="nowrap">
										<!-- table for slide image is generated by an external function -->
										<%= slideModel.getCurrentSlideContent(); %>

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

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

					<ja:if test="<%= slideModel.isSlideCommentAtBottom() %>">
						<!-- Slide comment -->
						<ja:include page="includes/slide-comment.inc" />
					</ja:if>

					<ja:if test="<%= voiceAnnotationConsole!=null %>">
						<!-- Add and play voice annotations -->
						<tr width="100%">
							<td width="100%" align="center">
 								${voiceAnnotationConsole}
							</td>
						</tr>
					</ja:if>

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

					<ja:if test="<%= slideModel.isVariableValueEqual( Constants.USER_VAR_INCLUDE_VIEWER_REMARKS_FEATURE_ON_SLIDES, imageDirectory, true ) %>">
						<tr valign="top">
							<td width="100%">
								<ja:include page="includes/slide-remarks.inc" />
							</td>
						</tr>
					</ja:if>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<!-- Page Footer -->
				<ja:include page="includes/footer.inc" />
			</td>
		</tr>
	</table>

	<ja:if test="<%= !slideModel.readUserVariableAsString( Constants.USER_VAR_ONLINE_PRINTING_SUPPORT, imageDirectory, Constants.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>

<% slideModel.purgeUnnecessaryDirectoryCachedData(); %>