<%
	import java.text.MessageFormat;
	import java.util.*;

	int getSlideBorderSize(File dir)
	{
		return readUserVariableAsInteger(USER_VAR_BORDER_SIZE, dir, DEFAULT_SLIDE_BORDER_SIZE);
	}

	int getSlideThumbnailBorderSize(File dir)
	{
		return readUserVariableAsInteger(USER_VAR_SLIDE_THUMBNAIL_BORDER_SIZE, dir, (int) (getSlideBorderSize(dir)/1.5));
	}

	int getFolderThumbnailBorderSize(File dir)
	{
		return readUserVariableAsInteger(USER_VAR_FOLDER_THUMBNAIL_BORDER_SIZE, dir, getSlideThumbnailBorderSize(dir));
	}

	String getSlideBorderColor(File dir)
	{
		return readUserVariableAsString(USER_VAR_BORDER_COLOR, dir, DEFAULT_SLIDE_BORDER_COLOR);
	}

	String getSlideThumbnailBorderColor(File dir)
	{
		return readUserVariableAsString(USER_VAR_SLIDE_THUMBNAIL_BORDER_COLOR, dir, getSlideBorderColor(dir));
	}

	String getFolderThumbnailBorderColor(File dir)
	{
		return readUserVariableAsString(USER_VAR_FOLDER_THUMBNAIL_BORDER_COLOR, dir, getSlideThumbnailBorderColor(dir));
	}

	boolean shouldAddColorToSlideBorder(File dir)
	{
		return getSlideBorderType(dir).trim().equalsIgnoreCase("solid") && getSlideBorderSize(dir)>0;
	}

	boolean shouldAddColorToSlideThumbnailBorder(File dir)
	{
		return getSlideThumbnailBorderType(dir).trim().equalsIgnoreCase("solid") && getSlideThumbnailBorderSize(dir)>0;
	}

	boolean shouldAddColorToFolderThumbnailBorder(File dir)
	{
		return getFolderThumbnailBorderType(dir).trim().equalsIgnoreCase("solid") && getFolderThumbnailBorderSize(dir)>0;
	}

	String getSlideBorderType(File dir)
	{
		String border_type = readUserVariableAsString(USER_VAR_BORDER_TYPE, dir, DEFAULT_SLIDE_BORDER_TYPE);

		addToUsedObjects(border_type, CACHE_KEY_USED_BORDERS);
		return border_type;
	}

	String getSlideThumbnailBorderType(File dir)
	{
		String border_type = readUserVariableAsString(USER_VAR_SLIDE_THUMBNAIL_BORDER_TYPE, dir, getSlideBorderType(dir));

		addToUsedObjects(border_type, CACHE_KEY_USED_BORDERS);
		return border_type;
	}

	String getFolderThumbnailBorderType(File dir)
	{
		String border_type = readUserVariableAsString(USER_VAR_FOLDER_THUMBNAIL_BORDER_TYPE, dir, getSlideThumbnailBorderType(dir));

		addToUsedObjects(border_type, CACHE_KEY_USED_BORDERS);
		return border_type;
	}

	String getSlideBorderResourcePath(File dir)
	{
		return resPath + "/borders/" + getSlideBorderType(dir);
	}

	String getSlideThumbnailBorderResourcePath(File dir)
	{
		return resPath + "/borders/" + getSlideThumbnailBorderType(dir);
	}

	String getFolderThumbnailBorderResourcePath(File dir)
	{
		return resPath + "/borders/" + getFolderThumbnailBorderType(dir);
	}

	String getIconSet(File dir)
	{
		String icon_set = readUserVariableAsString(USER_VAR_ICON_SET, dir, DEFAULT_ICON_SET);

		addToUsedObjects(icon_set, CACHE_KEY_USED_ICON_SETS);
		return icon_set;
	}

	String getIconSetPath(File dir)
	{
		return resPath + "/actions/" + getIconSet(dir);
	}

	String getStylePath(File dir)
	{
		String style = readUserVariableAsString(USER_VAR_STYLE, dir, style);
		String style_path = resPath + "/styles/" + style;
		int index = style.toLowerCase().indexOf(".css");

		addToUsedObjects(style, CACHE_KEY_USED_FULL_STYLES);

		if( index!=-1 )
			style = style.substring(0, index);
		addToUsedObjects(style, CACHE_KEY_USED_STYLES);
		return style_path;
	}

	void addToUsedObjects(Object usedObj, Object key)
	{
		List usedObjects = (List) album.get(key);

		if( usedObjects==null )
		{
			usedObjects = new LinkedList();
			album.put(key, usedObjects);
		}

		if( !usedObjects.contains(usedObj) )
			usedObjects.add(usedObj);
	}

	File getOriginalVoiceAnnotationFile(File file)
	{
		File baseDir = file.isDirectory() ? file : file.getParentFile();
		String voiceFileName;
		File sound;
		
		if( file.isDirectory() )
			voiceFileName = readFromFolderMetadata(META_FOLDER_VOICE, baseDir);
		else
			voiceFileName = readFromFolderMetadata(META_SLIDE_VOICE+getFileName(file), baseDir);

		if( !isEmptyString(voiceFileName) )
		{
			sound = new File(baseDir, voiceFileName);
			if( sound.exists() )
				return sound;
		}

		voiceFileName = getLabel(file);
		
		if( file.isDirectory() )
			voiceFileName = "_" + voiceFileName;

		sound = new File(baseDir, voiceFileName+".WAV");
		if( sound.exists() )
			return sound;

		sound = new File(baseDir, voiceFileName+".MP3");
		if( sound.exists() )
			return sound;

		sound = new File(baseDir, voiceFileName+".WMA");
		if( sound.exists() )
			return sound;

		sound = new File(baseDir, voiceFileName+".VOC");
		if( sound.exists() )
			return sound;

		sound = new File(baseDir, voiceFileName+".MID");
		if( sound.exists() )
			return sound;

		return null;
	}

	boolean isInsideAlbum(File file)
	{
	    if( file==null )
	        return false;
	    else
		    return file.getCanonicalPath().startsWith(rootImageDirectory.getCanonicalPath());
	}

	File getBackgroundImageFile(String var_name, File dir)
	{
		String backgroundFileName = readFromFolderMetadata(var_name, dir, true, "../");
		File background;
		
		if( !isEmptyString(backgroundFileName) )
		{
			background = new File(dir, backgroundFileName);
			if( background.exists() )
				return background;
			else
				displayMessage( "The specified background image '" + backgroundFileName + "' does not exist!" );
		}

		return null;
	}

	String getSlideInternalComment(File myfile)
	{
		Map vars = getVariableContainer(myfile);

		if( !vars.containsKey(CACHE_KEY_SLIDE_INTERNAL_COMMENT) )
			vars.put(CACHE_KEY_SLIDE_INTERNAL_COMMENT, getSlideInternalCommentImpl(myfile));

		return vars.get(CACHE_KEY_SLIDE_INTERNAL_COMMENT);
	}

	String getSlideInternalCommentImpl(File myfile)
	{
		String result = "";

		if( myfile!=null )
		{
			Map vars = (Map)fileVariables.get(myfile);

			if( vars.get("comment")!=null )
				result = vars.get("comment").toString();
		}
		else
		{
			if( comment!=void && comment!=null )
				result = comment.toString();
		}

		return result;
	}

	String getSlideExternalComment(File myfile, boolean tooltip)
	{
		Map vars = getVariableContainer(myfile);
		String key = CACHE_KEY_SLIDE_EXTERNAL_COMMENT + tooltip;

		if( !vars.containsKey(key) )
			vars.put(key, getSlideExternalCommentImpl(myfile, tooltip));

		return vars.get(key);
	}
	
	String getSlideExternalCommentImpl(File myfile, boolean tooltip)
	{
		File comment_file = new File(imageDirectory, getLabel(myfile)+".txt");
		String result = "";

		if( comment_file.exists() )
			result = readTextFile(comment_file);

		String desc = readFromFolderMetadata(META_SLIDE_DESCRIPTION + getFileName(myfile), imageDirectory);

		return appendString(result, desc, tooltip);
	}

	String getThumbnailTooltip(File myfile)
	{
		Map vars = getVariableContainer(myfile);

		if( !vars.containsKey(CACHE_KEY_THUMBNAIL_TOOLTIP) )
			vars.put(CACHE_KEY_THUMBNAIL_TOOLTIP, getThumbnailInfoImpl(myfile, USER_VAR_THUMBNAIL_TOOLTIP_CONTENT, DEFAULT_THUMBNAIL_TOOLTIP_CONTENT, true));

		return vars.get(CACHE_KEY_THUMBNAIL_TOOLTIP);
	}

	String getThumbnailInfoImpl(File myfile, String info_key, String default_value, boolean tooltip)
	{
		if( myfile==null )
			myfile = files[imageNum-1];

		String info_content = readUserVariableAsString(info_key, myfile, default_value);
		StringTokenizer st = new StringTokenizer(info_content, ",;|~");
		String result = "";

		while( st.hasMoreTokens() )
		{
			String token = st.nextToken().trim().toLowerCase();

			if( token.equals("title") )
				result = appendString(result, getSlideTitle(myfile), tooltip);
			else if( token.equals("filename") )
				result = appendString(result, getFileName(myfile), tooltip);
			else if( token.equals("filetype") )
				result = appendString(result, "(" + se.datadosen.util.FileFilters.getExtensionOf(myfile) + ")", tooltip);
			else if( token.equals("internalcomment") || token.equals("exifcomment") || token.equals("embeddedcomment") )
				result = appendString(result, getSlideInternalComment(myfile), tooltip);
			else if( token.equals("externalcomment") )
				result = appendString(result, getSlideExternalComment(myfile, tooltip), tooltip);
			else if( token.equals("dimension") )
				result = appendString(result, getFileDimension(myfile, true), tooltip);
			else if( token.equals("slidedimension") )
				result = appendString(result, getFileDimension(myfile, false), tooltip);
			else if( token.equals("filesize") )
				result = appendString(result, "(" + getFileSize(myfile) + ")", tooltip);
			else if( token.equals("date") )
				result = appendString(result, getSlideDate(myfile), tooltip);
		}

		return( tooltip ? clearHtmlCode(result) : result );
	}

	String getSlideDate(File myfile)
	{
		String myFileDate;

		if( myfile!=null )
		{
			Map vars = (Map)fileVariables.get(myfile);

			if( vars.containsKey("originalDate") )
				myFileDate = vars.get("originalDate");
			else
				myFileDate = vars.get("fileDate");
		}
		else
		{
			if( originalDate!=void )
				myFileDate = originalDate;
			else
				myFileDate = fileDate;
		}
		
		return myFileDate;
	}
	
	String getFileDimension(File myfile, boolean original)
	{
		long myWidth;
		long myHeight;

		if( myfile!=null )
		{
			Map vars = (Map)fileVariables.get(myfile);

			if( original )
			{
				myWidth = vars.get("originalWidth");
				myHeight = vars.get("originalHeight");
			}
			else
			{
				myWidth = vars.get("imageWidth");
				myHeight = vars.get("imageHeight");
			}
		}
		else
		{
			if( original )
			{
				myWidth = originalWidth;
				myHeight = originalHeight;
			}
			else
			{
				myWidth = imageWidth;
				myHeight = imageHeight;
			}
		}

		return myWidth + " x " + myHeight;
	}

	String getFileSize(File myfile)
	{
		long myFileSize;

		if( myfile!=null )
		{
			Map vars = (Map)fileVariables.get(myfile);

			myFileSize = ((Long)vars.get("fileSize")).longValue();
		}
		else
			myFileSize = fileSize;

		if( myFileSize >= 1024*1024 ) 
			return( ((double)((int)(myFileSize/10000))/100) + "MB");
		else 
			return( (myFileSize / 1024) + "KB");
	}

	File getMovieThumbnailFile(File file)
	{
		File thumbnailFile = new File(imageDirectory, getFileName(file)+".thumb");

		if( thumbnailFile.exists() )
			return thumbnailFile;
		else
			return null;
	}

	String getCopyrightContent()
	{
		return readUserVariableAsString(USER_VAR_COPYRIGHT_NOTE, imageDirectory, null);
	}

	String getFooterContent()
	{
		return getFooterContent(null, false);
	}

	String getFooterContent(File dir, boolean tooltip)
	{
		Map vars = getVariableContainer(dir);
		String cache_key = CACHE_KEY_PREFIX + META_FOLDER_FOOTER + tooltip;

		if( !vars.containsKey(cache_key) )
			vars.put(cache_key, getFooterContentImpl(dir, tooltip));

		return vars.get(cache_key);
	}

	String getFooterContentImpl(File dir, boolean tooltip)
	{
		File footer_file = new File((dir!=null) ? dir : imageDirectory, "footer.inc");
		String footer_content = null;

		if( footer_file.exists() )
			footer_content = readTextFile(footer_file);

		return appendString(footer_content, readFromFolderMetadata(META_FOLDER_FOOTER, dir), tooltip);
	}

	String getSlideTitle(File myfile)
	{
		Map vars = getVariableContainer(myfile);
		String cache_key = CACHE_KEY_PREFIX + META_SLIDE_TITLE;

		if( !vars.containsKey(cache_key) )
			vars.put(cache_key, getSlideTitleImpl(myfile));

		return vars.get(cache_key);
	}

	String getSlideTitleImpl(File myfile)
	{
		String slide_title = readFromFolderMetadata(META_SLIDE_TITLE+getFileName(myfile), imageDirectory);

		if( isEmptyString(slide_title) )
			slide_title = getLabel(myfile);

		return slide_title;
	}

	String getDirectoryTitle(File dir)
	{
		Map vars = getVariableContainer(dir);
		String cache_key = CACHE_KEY_PREFIX + META_FOLDER_TITLE;

		if( !vars.containsKey(cache_key) )
			vars.put(cache_key, getDirectoryTitleImpl(dir));

		return vars.get(cache_key);
	}

	String getDirectoryTitleImpl(File dir)
	{
		String dir_title = readFromFolderMetadata(META_FOLDER_TITLE, dir);

		if( isEmptyString(dir_title) )
		{
			if( dir!=null )
			{
				Map vars = (Map)fileVariables.get(dir);

				if( vars!=null )
					dir_title = vars.get("label");
				else // Top level directory!
				{
					dir_title = getAlbumTitle();

                    if( isEmptyString(dir_title) )
                        dir_title = rootOutputDirectory.getName();//dir.getName();
				}
			}
			else
				dir_title = title;
		}

		return dir_title;
	}

	String getAlbumTitle()
	{
		String album_title = album.get("rootName");

		if( album_title==null )
			album_title = title;

		return album_title;
	}

	String getAlbumPageTitlePrefix()
	{
		String album_title = getAlbumTitle();

		if( !isEmptyString(album_title) )
			return album_title + " - ";
		else
			return "";
	}

	String getFrameBlock(String display_path, String link_path, boolean target_new_window, String tooltip, Dimension display_size, String border_rsc_path, int border_size, String border_color, boolean display_as_movie, boolean apply_size_on_display, String mini_sign)
	{
		String color_template = !isEmptyString(border_color) ? "BGCOLOR=\""+border_color+"\"" : "";
		String line_template = "<td "+color_template+"><img src=\""+border_rsc_path+"/{0}\" width=\"{1}\" height=\"{2}\" border=\"0\" alt=\"\"/></td>\n";
		StringBuffer template = new StringBuffer();

		template.append("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" width=\"" + ((border_size*2)+display_size.width) + "\">\n");
		template.append("<tr>\n");
		template.append(MessageFormat.format(line_template, new String[] {"border_top_left.gif", ""+border_size, ""+border_size}));
		template.append(MessageFormat.format(line_template, new String[] {"border_top_middle.gif", ""+display_size.width, ""+border_size}));
		template.append(MessageFormat.format(line_template, new String[] {"border_top_right.gif", ""+border_size, ""+border_size}));
		template.append("</tr>\n");

		template.append("<tr>\n");
		template.append(MessageFormat.format(line_template, new String[] {"border_left.gif", ""+border_size, ""+display_size.height}));

		template.append("<td align=\"center\" valign=\"middle\">\n");
	    template.append("<div style=\"position:relative; top:0px; left:0px;\">");
		if( display_as_movie )
			template.append( getMovieBlock(display_path, display_size) );
		else
		{
			String linkExtraParameters = target_new_window ? " target=\"_blank\"" : null;
			String imageExtraParameters = apply_size_on_display ? (" width=\"" + display_size.width + "\" height=\"" + display_size.height + "\"") : null;
			String actionBlock = getActionBlock(link_path, linkExtraParameters, tooltip, display_path, imageExtraParameters);

			template.append(actionBlock);

			if( !isEmptyString(mini_sign) )
			{
				if( !isEmptyString(link_path) )
					template.append("<a href=\""+link_path+"\" title=\""+tooltip+"\">");
				template.append("<img src=\""+mini_sign+"\" border=\"0\" alt=\""+tooltip+"\" style=\"position:absolute; right:0px; bottom:0px;\"/>");
				if( !isEmptyString(link_path) )
					template.append("</a>");
			}
		}
		template.append("</div></td>\n");

		template.append(MessageFormat.format(line_template, new String[] {"border_right.gif", ""+border_size, ""+display_size.height}));
		template.append("</tr>\n");

		template.append("<tr>\n");
		template.append(MessageFormat.format(line_template, new String[] {"border_bottom_left.gif", ""+border_size, ""+border_size}));
		template.append(MessageFormat.format(line_template, new String[] {"border_bottom_middle.gif", ""+display_size.width, ""+border_size}));
		template.append(MessageFormat.format(line_template, new String[] {"border_bottom_right.gif", ""+border_size, ""+border_size}));
		template.append("</tr>\n");
		template.append("</table>");

		return template.toString();
	}

	String getMovieBlock(String display_path, Dimension display_size)
	{
		StringBuffer movie = new StringBuffer();

        movie.append("<embed align=\"center\" src=\""+display_path+"\"");
        movie.append(" width=\"" + display_size.width + "\" height=\"" + display_size.height + "\"");
        movie.append(" autoplay=\"true\" controller=\"true\" cache=\"true\"");
        movie.append(" pluginspage=\"http://www.apple.com/quicktime/download/\"></embed>\n");
        return movie.toString();
	}

	String getActionBlock(String targetUrl, String label, String imagePath)
	{
		return getActionBlock(targetUrl, null, label, imagePath, null);
	}

	String getActionBlock(String hyperLink, String hyperLinkExtraParameters, String tooltip, String imagePath, String imageExtraParameters)
	{
		StringBuffer block = new StringBuffer();

		if( !isEmptyString(hyperLink) )
		{
			block.append("<a href=\"" + hyperLink + "\"");
			if( hasToolTip() )
				block.append(" title=\"" + tooltip + "\"");
			if( !isEmptyString(hyperLinkExtraParameters) )
				block.append(" " + hyperLinkExtraParameters);
			block.append(">");
		}

		block.append("<img src=\"" + imagePath + "\" border=\"0\"");
		if( hasToolTip() )
			block.append(" alt=\"" + tooltip + "\"");

		if( hasStatusBar() )
			block.append(" onmouseover=\"setStatusbarTip('" + tooltip + "', 0);\" onmouseout=\"setStatusbarTip('&nbsp;',0);\"");

		if( !isEmptyString(imageExtraParameters) )
			block.append(" " + imageExtraParameters);

		if( !isEmptyString(hyperLink) )
			block.append("/></a>");
		else
		{
			if( hasToolTip() )
				block.append("title=\"" + tooltip + "\"");
			block.append("/>");
		}

		return block.toString();
	}

	String getExternalHomePath(boolean slide_page)
	{
		String external_home = readUserVariableAsString(USER_VAR_EXTERNAL_HOME_PATH, imageDirectory, null);

		if( external_home!=null )
		{
			external_home = external_home.trim();

			if( external_home.toLowerCase().startsWith("http:") || external_home.toLowerCase().startsWith("https:") ||
			    external_home.toLowerCase().startsWith("ftp:") || external_home.toLowerCase().startsWith("ftps:") ||
			    external_home.toLowerCase().startsWith("mailto:") || external_home.startsWith("/") )
			    return external_home;
			else
			{
				String validRootPath = isEmptyString(rootPath) ? "." : rootPath;

				return (slide_page ? "../" : "") + validRootPath + "/" + external_home;
			}
		}

		return null;
	}

	boolean hasStatusBar()
	{
		String helpStyle = readUserVariableAsString(USER_VAR_CONTEXT_HELP_STYLE, imageDirectory, DEFAULT_CONTEXT_HELP_STYLE);

		return( helpStyle.equalsIgnoreCase("statusbar") || helpStyle.equalsIgnoreCase("both") );
	}

	boolean hasToolTip()
	{
		String helpStyle = readUserVariableAsString(USER_VAR_CONTEXT_HELP_STYLE, imageDirectory, DEFAULT_CONTEXT_HELP_STYLE);

		return( helpStyle.equalsIgnoreCase("tooltip") || helpStyle.equalsIgnoreCase("both") );
	}

	boolean hasTopNavigationBar()
	{
		String navigationBar = readUserVariableAsString(USER_VAR_NAVIGATION_BAR_VERTICAL_LOCATION, imageDirectory, DEFAULT_NAVIGATION_BAR_VERTICAL_LOCATION);

		return( navigationBar.equalsIgnoreCase("Top") || navigationBar.equalsIgnoreCase("Both") );
	}

	boolean hasBottomNavigationBar()
	{
		String navigationBar = readUserVariableAsString(USER_VAR_NAVIGATION_BAR_VERTICAL_LOCATION, imageDirectory, DEFAULT_NAVIGATION_BAR_VERTICAL_LOCATION);

		return( navigationBar.equalsIgnoreCase("Bottom") || navigationBar.equalsIgnoreCase("Both") );
	}

	boolean hasJumpFacility()
	{
		return /*totalIndexes!=void &&*/ isVariableValueEqual( USER_VAR_INCLUDE_JUMP_TO_PAGE_ACTION, imageDirectory, true );
	}

	void printHelpTips()
	{
		if( !album.containsKey(CACHE_KEY_NAVIGATION_HELP_TIPS) )
			album.put(CACHE_KEY_NAVIGATION_HELP_TIPS, getHelpTips());

		return out.println( album.get(CACHE_KEY_NAVIGATION_HELP_TIPS) );
	}

	// JAlbum doesn't deal correctly with non-JPG images! It just store their thumbnail & slide images as JPG so have to do some checkings here...
	String convertImageNameToJPG(String name)
	{
	    int index = name.lastIndexOf(".");

	    if( index>=name.length()-1 || index<=0 )
	        return name;

	    String extension = name.substring(index).toLowerCase();

	    if( extension.equals(".gif") || extension.equals(".png") || extension.equals(".bmp") || extension.equals(".tif") )
	        name = name.substring(0, name.length()-4) + ".jpg";

	    return name;
	}

	String getHelpTips()
	{
		StringBuffer buffer = new StringBuffer();

		buffer.append("<tr><td height=\"20\" valign=\"top\" colspan=\"3\"><b>" + getFromResourceBundle("nav-tips") + "</b></td></tr>\n");

		appendShortcut(buffer, "RIGHT Arrow", getFromResourceBundle("right-arrow-desc"));
		appendShortcut(buffer, "LEFT Arrow", getFromResourceBundle("left-arrow-desc"));
		appendShortcut(buffer, "Page UP", getFromResourceBundle("page-up-desc"));
		appendShortcut(buffer, "HOME", getFromResourceBundle("home-desc"));
		appendShortcut(buffer, "END", getFromResourceBundle("end-desc"));
		appendShortcut(buffer, "S, s", getFromResourceBundle("s-key-desc"));
		appendShortcut(buffer, "ESC", getFromResourceBundle("esc-desc"));
		appendShortcut(buffer, "I, i", getFromResourceBundle("i-key-desc"));
		appendShortcut(buffer, "H, h", getFromResourceBundle("h-key-desc"));
		return buffer.toString();
	}

	void appendShortcut(StringBuffer buffer, String shortcut, String description)
	{
		buffer.append("<tr>");
		buffer.append("<td><b>" + shortcut + "</b></td>");
		buffer.append("<td align=\"center\" width=\"15\"><b>:</b></td>");
		buffer.append("<td>" + description + "</td>");
		buffer.append("</tr>\n");
	}

	boolean isFixedShapeFilterAppliedOnThumbnails()
	{
		Iterator it;

		includeFixedShapeFilterOnThumbnails = false;

		it = engine.filterIterator(4);
		while( it.hasNext() )
		{
			if( it.next() instanceof FixedShapeFilter )
			{
				includeFixedShapeFilterOnThumbnails = true;
				break;
			}
		}

		if( !includeFixedShapeFilterOnThumbnails )
		{
			it = engine.filterIterator(5);
			while( it.hasNext() )
			{
				if( it.next() instanceof FixedShapeFilter )
				{
					includeFixedShapeFilterOnThumbnails = true;
					break;
				}
			}
		}

		return( includeFixedShapeFilterOnThumbnails );
		//return( includeFixedShapeFilterOnThumbnails!=void && includeFixedShapeFilterOnThumbnails==true );
	}

	boolean isFixedShapeFilterAppliedOnSlides()
	{
		Iterator it = engine.filterIterator(3);

		includeFixedShapeFilterOnSlides = false;
		while( it.hasNext() )
		{
			if( it.next() instanceof FixedShapeFilter )
			{
				includeFixedShapeFilterOnSlides = true;
				break;
			}
		}

		return( includeFixedShapeFilterOnSlides );
		//return( includeFixedShapeFilterOnSlides!=void && includeFixedShapeFilterOnSlides==true );
	}
%>