<%!
	import se.datadosen.util.*;
	// Make links to sibling directories that contain an index.html file
	void siblingLinks() {
		File[] dirs = outputDirectory.getParentFile().listFiles(new FileFilter() {
			public boolean accept(File f) {
				return f.isDirectory() && new File(f, "index.html").exists();
			}
		});
		for (int i=0; i<dirs.length; i++) {
			out.println("\t\t\t\t<td class=\"tabspace\"></td>");
			String name = dirs[i].getName();
			out.println("\t\t\t\t<td valign=\"middle\" class=\"tab" + (name.equals(title) ? " activetab" : "") + "\">" +
			"<a href=\"../" + name + "/index.html\">" + name + "</a></td>");
		}
	}

%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>$title</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=$textEncoding">
<link href="$stylePath" rel="stylesheet" type="text/css">
</HEAD>

<BODY style="margin: 0">

<TABLE WIDTH=660 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD COLSPAN=4 id="toparea"></TD>
	</TR>
	<TR>
		<TD COLSPAN=4 align="right" id="tabarea">
			<table BORDER=0 CELLPADDING=0 CELLSPACING=0>
				<tr>
<%= siblingLinks() %>
					<td class="tabmargin"></td>
				</TR>
			</TABLE>
		</TD>
  </TR>
	<TR>
		<TD id="leftarea"></TD>
		<TD>
			<table id="thumbnailarea" border="0">
			<ja:rowiterator>
				<tr>
				<ja:coliterator>
					<td align="center" width="$maxThumbWidth">
						<a title="$label" href="$closeupPath">
							<ja:if exists="iconPath">
								<!-- No frames around icons like folders and movie files -->
								<img src="$iconPath" border=0 alt="$label"></a>
								<br>
								$label
							</ja:if>
							<ja:else>
								<img src="$thumbPath" border=0 alt="$label"></a>
							</ja:else>
					</td>
				</ja:coliterator>
				</tr>
			</ja:rowiterator>
			</table>
		</TD>
		<TD id="rightarea"></TD>
	</TR>
	<TR>
		<TD COLSPAN=4 id="bottomarea"></TD>
	</TR>
</TABLE>
<ja:include page="footer.inc" />
</BODY>
</HTML>