<%
	// Make sure that the first non-directory file is shown on startup
	File getFirstRealFile() {
		for (int i=0; i<files.length; i++) {
			if (!files[i].isDirectory()) return files[i];
		}
		return null;
	}
	
	String addFirstLink() {
		File firstFile = getFirstRealFile();
		if (firstFile != null) return ((Map)fileVariables.get(firstFile)).get("closeupPath");
		else return "$resPath/blank.html";
	}

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=$textEncoding" />
<title>$title</title>
</head>
<frameset rows="<%= rows*(maxThumbHeight+10)+36 %>,*">
  <frame frameborder=0 name="index" src="$firstIndexPage">
  <frame frameborder=0 name="slide" src="<%= addFirstLink() %>">
</frameset>
</html>
