
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>The Massachusetts Historical Society | From Our Cabinet</TITLE>
<LINK rel="stylesheet" href="style_cabinet.css" type="text/css" />
<SCRIPT language="JavaScript" src="../scripts/script_global.js" type="text/JavaScript"></SCRIPT>
</HEAD>

<BODY aLink=#CCCCCC bgColor="#000066" leftMargin=0 link=#6699CC onload=scroll(0,0) 
rightMargin=0 topMargin=0 vLink=#6699CC marginheight="0" marginwidth="0" text="#CCCCCC">


<!--- IMAGE VIEWER Version 3 --->



<span class="topicTitle">&nbsp;&nbsp;<i>Image Viewer</i></span><br>
<br>

<cfset currentImage="#img#">



<!--- display caption with short description --->

<table width="96%" align="center" border="0" cellpadding="8" cellspacing="0">
<tr>
<td width="50%">

	<CF_display_caption 
		queryRecordID="#queryID#">


<cfoutput>
<br><br>
<a href="query3.cfm?queryID=#queryID#" class="text1sm">Go to full description</a>
</cfoutput>

</td>
<td width="50%" class="text2" align="center" valign="top">


<!--- 	query on_view_images table	 --->

<cfquery name=imgQuery1 datasource="mhs_mssql" username="bshl" password="bshl2001">
SELECT * FROM on_view_images WHERE recordID=#queryID#
</cfquery>  

		<cfoutput query=imgQuery1>

<cfif isdefined("smallImg") AND (smallImg is not "")>
	
	<!--- count the images in the list variable.  --->
	
	<cfset imageCount=ListLen(smallImg)>
	<cfset imageCount2=ListLen(largeImg)>
	
	
	<!--- If there is one image, use standard display --->
	<cfif imageCount is "1">

		<div align="center" class="pageTitleSm">
		<b>Image View Options:</b></div>
		<img src="../images/space.gif" width="4" height="4" border="0"><br>
		<div align="center">
		<a href="enlarge.cfm?img=#smallImg#&queryID=#queryID#" class="text2">Small</a>
		<cfif isdefined("largeImg") AND (largeImg is not "")>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enlarge.cfm?img=#largeImg#&queryID=#queryID#" class="text2">Large</a>
		</cfif>
		</div>
	<!--- If there is more than one image, use multiple page display --->
	<cfelse>

		<div align="center" class="pageTitleSm">
		<b>Image View Options:</b></div>
		<img src="../images/space.gif" width="4" height="4" border="0"><br>
		<span class="text1">
		&nbsp;&nbsp;<b>Small:</b>&nbsp;&nbsp;Page </span>
		<cfset pageNum=1>
		<cfset loopList=#smallImg#>
		<cfloop index="imageCount" from="#imageCount#" to="1" step="-1">
			<cfset thisImage=ListFirst(#loopList#)>
			<a href="enlarge.cfm?img=#thisImage#&queryID=#queryID#" class="text2">#pageNum#</a>&nbsp;
			<cfset loopList=ListDeleteAt(loopList,1)>
			<cfset pageNum=#pageNum#+1>
		</cfloop><br>
		<img src="../images/space.gif" width="4" height="4" border="0"><br>
		<span class="text1">
		&nbsp;&nbsp;<b>Large:</b>&nbsp;&nbsp;&nbsp;Page </span>
		<cfset pageNum=1>
		<cfset loopList=#largeImg#>
		<cfloop index="imageCount2" from="#imageCount2#" to="1" step="-1">
			<cfset thisImage=ListFirst(#loopList#)>
			<a href="enlarge.cfm?img=#thisImage#&queryID=#queryID#" class="text2">#pageNum#</a>&nbsp;
			<cfset loopList=ListDeleteAt(loopList,1)>
			<cfset pageNum=#pageNum#+1>
		</cfloop>
		<br>
		<img src="../images/space.gif" width="4" height="4" border="0"><br>
	</cfif>
		
		
<cfelse>

<!--- if smallImg is not defined, assume that there are no enlargements available, display reference image without a link --->
	<div align="center" class="pageTitleSm">
	<b>Image View Options</b></div>
	<img src="../images/space.gif" width="4" height="8" border="0"><br>
	<span class="text1sm">
	There are currently no enlargement images available for this item.
	</span>
</cfif>

</cfoutput>



</td>
</tr>

<tr>
<td colspan="2">
<cfoutput>

<IMG src="../database/images/#currentImage#" border="0">

<br><br>
<a href="javascript:history.back()" class="topLink">Back</a>
</cfoutput>

</td>
</tr>
</table>

<br><br><br>

<font face="Verdana, Arial, Helvetica, sans-serif" size="2">&copy;2002.<br>
                  <a href="http://www.masshist.org">The Massachusetts Historical 
                  Society</a>.<br>
                  All rights reserved. <a href="http://www.masshist.org/legal/rights.cfm">Terms and Conditions</a>.</font><br>
				  <br>
</html>