<%-- ExhibitPlus V1.4a 25.10.2005. Author: Mark Fyvie. Official site: http://exhibitplus.fyvie.net
 
  ****************************************************************************************************************
  Please take note: If you plan to modify this skin, including modifications which may affect the resulting HTML:
  
  The output from this skin has been authored as XHTML 1.0 - this is a very strict DOCTYPE.
   
  Ensure that you do *NOT* use depreciated HTML elements, and that any modifications you make conform to XHTML 1.0
  If you have modified the skin, please check your generated pages at validator.w3.org to ensure compliance!
  **************************************************************************************************************** --%>
<ja:include once page="index.bsh">index.bsh not included</ja:include>
<%-- Allow user to override variables on a per folder basis --%>
<ja:include page="variables.inc"></ja:include>

<%
  time = new se.datadosen.util.Timer();
  time.start();
  variableInit(); // This sets up initial values for variables
  iconFileCheck(); // Check to see if there are any icon files present in a button set which should overwrite the default buttons in the res directory
  filterCheck(); // Install or remove filters
  readMetaFile(); // Read the meta.properties file for folder title and description information
  firefoxCheck(); // if we are advertising Firefox, introduce some randomness to show the different logos on all the pages
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$language">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=$textEncoding" />
<meta name="keywords" content="photo album,gallery,photo gallery,digital,photo,gallery,online,exhibitplus_v_onepointfour" />
<title>${title1}</title>
<link href="${resPath}/basestyle.css" rel="stylesheet" />
<link href="${resPath}/$style" rel="stylesheet" />
<!-- Include styles.inc from root image directory if present -->
<ja:include page="$rootPath/styles.inc"></ja:include>
<ja:if test="${keyboardShortcuts}">
	<script type="text/javascript">
	<!--
	var nextIndexPageUrl = null;
	<ja:if exists="totalIndexes"><ja:if exists="nextIndexPage">nextIndexPageUrl="$nextIndexPage";</ja:if><ja:else>nextIndexPageUrl="$firstIndexPage";</ja:else></ja:if>
	var prevIndexPageUrl = null;
	<ja:if exists="totalIndexes"><ja:if exists="previousIndexPage">prevIndexPageUrl="$previousIndexPage";</ja:if><ja:else>prevIndexPageUrl="$lastIndexPage";</ja:else></ja:if>
	var parentIndexPageUrl = null;
	<ja:if exists="parentIndexPage">parentIndexPageUrl="$parentIndexPage";</ja:if>
	var firstIndexPageUrl = null;
	<ja:if exists="totalIndexes">firstIndexPageUrl="$firstIndexPage";</ja:if>
	var lastIndexPageUrl = null;
	<ja:if exists="totalIndexes">lastIndexPageUrl="$lastIndexPage";</ja:if>
	var isSlideShow = false; 
	-->
	</script>
	<script type="text/javascript" src="${resPath}/keyboard.js">
	</script>
	<script type="text/javascript" src="${resPath}/navindex.js">
	</script>
</head>
<body onload="initKeyboard();">
</ja:if>
<ja:else>
</head>
<body>
</ja:else>
<noscript><div style="position: absolute; bottom: 25px; left: 5px"><img src="${resPath}/warning_icon.gif" alt="$text.noscriptWarning" title="$text.noscriptWarning" /></div></noscript>
<!-- Include header.inc from root image directory if present -->
<ja:include page="<%=globalHeader ? out.print(rootPath):out.print(imageDirectory);%>/header.inc"><ja:include page="$rootPath/header.inc"></ja:include></ja:include>
<ja:if test="${protectIndexImages}">
	<script type="text/javascript">
	<!-- 
	var message="$text.noRightClick"; // Message for the alert box 
	function click(e) { 
		if (document.all) { 
			if (event.button == 2) { 
				alert(message); 
				return false; 
			} 
		} 
		if (document.layers) { 
			if (e.which == 3) { 
				alert(message); 
				return false; 
			} 
		} 
	} 
	if (document.layers) { 
		document.captureEvents(Event.MOUSEDOWN); 
	} 
	document.onmousedown=click; 
	-->
	</script>
</ja:if>
<div id="centercontent">
<%-- This nest of if/else statement processes the user variable upButtonAtRootIndexPage to check whether to place an UP button on the root index page --%>
<ja:if test="${upButtonAtRootIndexPageForce}">
	<!-- Index button (always place on root folder regardless of conditions) -->
	<ja:if test="$authorUseOnly"><a href="../sample.html"></ja:if><ja:else><ja:if exists="parentIndexPage"><a href="$parentIndexPage"></ja:if><ja:else><a href="../"></ja:else></ja:else><img src="${resPath}/${buttonSet}/up.gif" alt="$text.upOneLevel" title="$text.upOneLevel" /></a><%upButtonActive=true;%>
</ja:if>
<ja:else>
	<ja:if test="${upButtonAtRootIndexPageNever}">
		<!-- Index button (never place on root folder) -->
		<ja:if test="${rootLevel}"></ja:if><ja:else><a href="$parentIndexPage"><img src="${resPath}/${buttonSet}/up.gif" style="float: left; margin-right: 4px" alt="$text.upOneLevel" title="$text.upOneLevel" /></a><%upButtonActive=true;%></ja:else>
	</ja:if>
	<ja:else>
		<!-- Index button (place on root folder only if a parent html file exists one level above the root (e.g. main web site home page) -->
		<ja:if exists="parentIndexPage"><a href="$parentIndexPage"><img src="${resPath}/${buttonSet}/up.gif" style="float: left; margin-right: 4px" alt="$text.upOneLevel" title="$text.upOneLevel"/></a><%upButtonActive=true;%></ja:if>
	</ja:else>
</ja:else>

<ja:if test="${multiNavIndex}"><!-- Multilevel index links for index page --><span class="folderNavigation"><% indexLinks (); %></span><!-- End multilevel index links for index page --></ja:if>	

	<!-- Insert the title and description of the folder -->
	
	<ja:if test="<%=!((descript == texts.getString("noDescript")) && (level ==0))%>">
	  <ja:if test="${upButtonActive}"><br /><br /></ja:if>
	  <ja:if test="<%=!((title1 == texts.getString("rootFolderName")) && (level ==0))%>"><span class="header">${title1}</span><br /></ja:if>${descript}<br /><br />
	</ja:if>

<!-- HERE'S THE PAGE SELECTION CODE -->
<ja:if exists="totalIndexes">
	<div style="position: relative; top: -6px">
	<ja:if exists="previousIndexPage"><a href="$previousIndexPage"><img src="${resPath}/${buttonSet}/index_previous.gif" style="vertical-align: bottom" alt="$text.previousPage" title="$text.previousPage" /></a></ja:if><ja:else><img src="${resPath}/${buttonSet}/index_previous_disabled.gif" style="vertical-align: bottom" alt="$text.atFirstPage" title="$text.atFirstPage" /></ja:else>
	  
	  <!-- The relative pixel positioning used below might need to be changed if different buttons are used (currently 3 and 6 pixels) -->
	  <span style="position: relative; top: 1px;">
	  <select style="border: 0px none;" onchange="window.location.href = this.options[this.selectedIndex].value">
		<% addLinks() %>
	  </select></span>
<ja:if exists="nextIndexPage"><a href="$nextIndexPage"><img src="${resPath}/${buttonSet}/index_next.gif" style="vertical-align: bottom" alt="$text.nextPage" title="$text.nextPage" /></a></ja:if><ja:else><img src="${resPath}/${buttonSet}/index_next_disabled.gif" style="vertical-align: bottom" alt="$text.atLastPage" title="$text.atLastPage" /></ja:else>
	<span style="position: relative; top: -3px; vertical-align: bottom"><%=1+(indexNum-1)*rows*cols%>-<%=(indexNum-1)*rows*cols+indexImageCount%> ($text.of $totalImages $text.found)</span><br />
	</div>
</ja:if>
<!-- PAGE SELECTION CODE ENDS -->
<!-- Section Start: Big folder containing photos or folders -->

<div id="indexframe">

<ja:if test="${fixedFormatIndexPage}"><% tableElement1="" %></ja:if>
<ja:rowiterator>
<ja:coliterator>
<ja:include page="variables.inc"></ja:include>
<%
  utils.updateVars();
  
  // Initialise some variables inside the coliterator
  descript = "";

  boolean entryIsDirectory = false;
  if (currentFile.isDirectory()) entryIsDirectory = true;

  if (fixedFormatIndexPage) {
    if (thumbCount % cols == 0) {
      tableElement2="<div style=\"clear: left\"></div><div style=\"width: " + rowWidth + "px\">"; 
    }
  }
%>
<ja:if test="${fixedFormatIndexPage}"><% tableElement3="<div style=\"float:left\u003b min-width:" + (maxThumbWidth+(2*imagePadding)) + "px\u003b width:" + maxThumbWidth + "px\">" %></ja:if>
 
<ja:if not test="${entryIsDirectory}">
${spacerDiv}${tableElement1}${tableElement2}${tableElement3}
<% spacerDiv=""; tableElement1=""; tableElement2=""; tableElement3=""; // Reset the values for the next iteration %>
</ja:if>

<%
  utils.thumbScaleInit (); // Normally, any thumbnails representing folders will be the same size as folder.gif, but here we can scale them if desired, but backup the value first
%>
<ja:if test="${useThumbForFolderIcon}"><% utils.getFolderIcons(); %></ja:if>
<%
  // Calculate aspect ratio
  aspectRatio = ((float)utils.thumbWidth / utils.thumbHeight);
%>
 
<ja:if test="${entryIsDirectory}">
<%-- This is a folder, not a thumb, so we will display a text description in a single or multiple column arrangement --%>
<% getFolderDescription (); %>
<%= imageNum % numberIndexColumns == 1 ? "<div style=\"clear: left\"></div>" : "" %>
<div style="float:left; width:<%=(100/numberIndexColumns)%>%">
<div style="clear: left; padding:10px 10px 10px 5px">
<div style="float: left; width:${miniThumbContainer}px; text-align: center; overflow:hidden; margin-right: 3px">
<a href="$closeupPath" title="${label}"><img style="margin: 0 auto; padding-top: 3px" src="${thumbPath}" width="<%=(int)(utils.origThumbWidth*aspectRatio)%>" height="${origThumbHeight}" title="${label}" alt="${label}" /></a>
</div>
<div>
<ja:if test="<%= Dates.dateDiff('d', fileDate, Dates.now()) > (0 - folderAgeNew) %>"><div style="position: relative; right: 55px"><a href="$closeupPath" title="$text.exploreThisFolder"><img src="${resPath}/foldernew.gif" style="position: absolute; padding-top: 3px" alt="$text.exploreThisFolder" title="$text.exploreThisFolder" /></a></div></ja:if>
<a href="$closeupPath" title="$text.exploreThisFolder">${title1}</a>&nbsp;
<span class="folderData"><ja:if test="<%= (numberIndexColumns < 3) %>">|&nbsp;&nbsp;</ja:if><ja:else><br /></ja:else>$text.totalImages: <% if (currentFile.isDirectory()) out.print(engine.countFiles(currentFile));%>
<ja:if test="${displayFolderDateAdded}">&nbsp;|&nbsp;&nbsp;$text.dateAdded: <% out.print(Dates.format(fileDate, dateFormat)); %></ja:if>
</span>
<div class="folderDescription" style="margin-left: ${miniThumbContainer}px; padding-left: 3px">${descript}</div>
<div style="position: absolute"> <!-- Stupid workaround for IE6 bug, please don't remove a div here, it won't validate!! --></div>
</div></div></div>
</ja:if>
<ja:else>
	<%-- OK, this is a thumbnail of an image, not a directory --%>
 
	<% thumbStuff (); %> 
	${thumbFormatStart}
	<ja:if exists="comment"><% if (comment.indexOf("<") != -1) comment = comment.substring(0,comment.indexOf("<")); %></ja:if>
	<ja:if test ="${imageNameUnderThumbnail}"><%caption = label%></ja:if>
	<a href="<ja:if test="${linkOriginalsViaScaled}"><ja:if test="${jumpDirectFullscreen}"><%="slides/orig_" + fName + engine.getPageExtension()%></ja:if><ja:else>$closeupPath</ja:else></ja:if><ja:else>$closeupPath</ja:else>"><img src="$thumbPath" title="${label} ${comment}" alt="${label} ${comment}" width="${thumbW}" height="${thumbH}" ${thumbStyle} /></a>
	<ja:if test ="${imageDateUnderThumbnail}"><ja:if exists="originalDate"><span class="thumbDate">$originalDate<br /></span></ja:if></ja:if>
	<span class="thumbName"><a href="<ja:if test="${linkOriginalsViaScaled}"><ja:if test="${jumpDirectFullscreen}"><%="slides/orig_" + fName + engine.getPageExtension()%></ja:if><ja:else>$closeupPath</ja:else></ja:if><ja:else>$closeupPath</ja:else>">${caption}</a></span>

	<ja:if test ="${imageCommentUnderThumbnail}"><p class="thumbComment">${comment}</p></ja:if>
	
	${thumbFormatEnd}
	
	<% thumbCount++; // Increment the image counter (excluding folders) 	
	   noFloatForFirstThumb = ""; // Kill this we only needed it for the first image %>
 
</ja:else>

<ja:if not test="${entryIsDirectory}"> 
<% 
	album.put("lastProcessedWasThumb", true);
	lastProcessedWasThumb = true;
%>
</ja:if>
<ja:if test="${lastProcessedWasThumb}"><ja:if test="${fixedFormatIndexPage}"></div></ja:if></ja:if>
<% thumbStuff2 (); %>
<%-- Note that we do not really use the rowiterator and coliterator in this skin, since we use a "flowing" design. That is unless we use the variable fixedFormatIndexPage to override the default and set up a fixed rows and column layout --%>
</ja:coliterator>
</ja:rowiterator>
<ja:include page="variables.inc"></ja:include>

<!-- this is done to extend the indexframe right to the bottom - required for mozilla --> <div style="clear: left; margin-bottom: 9px"></div> 
</div>
<!-- Section end: Big black folder containing photos or folders -->

<ja:if exists="nextIndexPage">
	<div style="text-align: right">
		<span style="position: relative; top: -6px;">$text.page $indexNum $text.of $totalIndexes</span>
		<a href="$nextIndexPage"><img src="${resPath}/${buttonSet}/index_next.gif" alt="$text.nextPage" title="$text.nextPage" /></a>	
	</div>
</ja:if>
 
<br /><div class="footer">$text.thisAlbumHas $totalAlbumImages $text.itemsInTotal&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;$text.albumWasUpdated $currentDate&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;$text.generatedBy <a href="$generatorUrl" title="JAlbum - Freeware web photo album generator">$generator</a>, $text.customSkin <a href="http://www.fyvie.net/photos/info_exhibitplus.html" title="ExhibitPlus by Mark Fyvie - Information">ExhibitPlus 1.4a</a></div>
 
<!-- Include news.inc from image directory if present -->
<ja:include page="news.inc"></ja:include>
 
<!-- Include footer.inc from root image directory if present -->
<ja:include page="<%=globalFooter ? out.print(rootPath):out.print(imageDirectory);%>/footer.inc"><ja:include page="$rootPath/footer.inc"><br /><br /></ja:include></ja:include>

<ja:if test="${displayW3CLogosOnIndex}">
	<div id="w3clogosright">
		<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a>		
		<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="http://jigsaw.w3.org/css-validator/images/vcss.gif" alt="valid CSS!" /></a>
		<ja:if test="${promotionalLogos}">${promotionBanner}</ja:if>
	</div>
</ja:if>
</div><!--Generated: <% out.print(time); time.stop(); %>-->
<%-- System.out.println(time + "(" + title1 + ")"); --%>
</body>
</html>