<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=$textEncoding" />
<title>$label</title>
<link href="$stylePath" rel=stylesheet>
<script language="javascript">
	showing = false;

	function toggleInfo() {
			if (showing == false) {
				if (document.all || document.getElementById) document.getElementById('imageinfo').style.visibility="visible";	// IE & Gecko
				else document.layers['imageinfo'].visibility="show"; // Netscape 4
				showing = true;
			}
			else {
				if (document.all || document.getElementById) document.getElementById('imageinfo').style.visibility="hidden";	// IE & Gecko
				else document.layers['imageinfo'].visibility="hide";	// Netscape 4
				showing = false;
		}
	}
</script>
</head>

<body id="slide" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table align="center" background="$resPath/blue-brain-dark.gif" cellpadding="0" cellspacing="0" border="0" width="80%" height="40">
	<tr>
		<td nowrap valign="bottom" width="33%"><img src="$resPath/corner-w-ll.gif" width="20" height="20"></td>
		<td align="center" nowrap width="33%">
			<h1>$title / $label</h1>
		</td>
		<td nowrap valign="bottom" width="33%" align="right"><img src="$resPath/corner-w-lr.gif"></td>
	</tr>
</table>
<table cellpadding="3" cellspacing="0" border="0" width="75%" align="center">
	<tr valign="middle">
		<td nowrap width="20%">
			<!-- Index button -->
			<a href="../$indexPage"><img src="$resPath/index.gif" border=0 alt="Index page"></a>
			<!-- Next button -->
			<!--<ja:if exists=flash><img src="$resPath/camera.gif" alt="Fotographic information" border=0></ja:if>-->
		</td>
		<td nowrap align="center" width="60%">
			<!-- Previous button -->
			<ja:if exists="previousPage"><a href="$previousPage"><img src="$resPath/previous.gif" alt="Previous page" border=0 align="absmiddle"></a>
			</ja:if>
			<ja:else><img src="$resPath/previous_disabled.gif" alt="At first page" align="absmiddle">
			</ja:else><!--<b>$imageNum</b> of $totalImages -->
			<% // Produce links to all other pages, cooler than just next, prevous links
				for (int i=0; i<files.length; i++) {
					Map vars = (Map)fileVariables.get(files[i]);
					if (i+1 != imageNum) out.print("<a href=\"" + vars.get("currentPage") + "\">");
					else out.print("<b>");
					out.print(" " + (i+1));
					if (i+1 != imageNum) out.print("</a>");
					else out.print("</b>");
				}
			%>
			<ja:if exists="nextPage"><a href="$nextPage"><img src="$resPath/next.gif" alt="Next page" border=0 align="absmiddle"></a>
			</ja:if>
			<ja:else> <img src="$resPath/next_disabled.gif" alt="At last page" align="absmiddle">
			</ja:else></td>
		<td nowrap align="right" width="20%"><ja:if exists="originalDate">$originalDate</ja:if><ja:else>$fileDate</ja:else></td>
	</tr>
</table>
<table cellpadding="3" cellspacing="0" border="0" width="$imageWidth" align="center">
	<tr class="head">
		<td class="navigation" colspan="4" align="center">
			<!-- Image, maybe with link to original -->
			<ja:if exists=originalPath>
				<a href="$originalPath" target="_blank">
				<img src="$imagePath" width="$imageWidth" height="$imageHeight" border=0 Title="$label / $originalWidth x $originalHeight / <%=(int)fileSize/1000%>kbytes">
				</a>
				</ja:if>
			<ja:else>
				<img src="$imagePath" width="$imageWidth" height="$imageHeight">
			</ja:else>

			<!-- Always display comment below image (if exists) -->
			<ja:if exists="comment">
				<br>
				<div class="name">$comment</div>
			</ja:if>
			<ja:else>
				<!-- Try to extract the comment from a file carrying the same base name as this image -->
				<br>
				<div class="name">
					<ja:include page="<%= new File(imageDirectory, label+".txt") %>" />
				</div>
			</ja:else>
		</td>
	</tr>
	<tr>
		<td>
			<%
				File textFile = new File(imageDirectory, label+".txt");
				if (textFile.exists())
				out.println(se.datadosen.util.IO.readTextFile(textFile));
			%>
		</td>
	</tr>
</table>

<div class="generator">
	<p>
	<a href="$generatorUrl" target="_blank">$generator</a>
	</p>
</div>
</body>
</html>
