<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:HTML="http://www.w3.org/Profiles/XHTML-transitional">

<!-- File last modified: 20 Sept 1999, dwr -->

	<xsl:template><xsl:value-of/></xsl:template>
	
	<xsl:template match="/">
		<HTML>
			<HEAD>
				<TITLE>
					<xsl:value-of select="ead/frontmatter/titlepage/titleproper"/>
				</TITLE>
		<STYLE>
			 BODY		{ margin:1em; background-color: #ffffeb; width: 30em;
							font-family: Arial, Helvetica, sans-serif; font-size: x-small; }
			 H4			{ color: #888833; text-align: center}
			.H4			{ color: #7700AA; font-size: x-small;}
			.H5			{ color: #888833; font-size: x-small;}
			 HR			{ color: #888833; font-size: x-small;}
			.collnum	{ text-align: center; font-size: x-small; }
			.label		{ color: #888833; font-size: x-small;}
			.itemblock	{ margin-left:1em; }
			.itemsign	{ display: inline; font-size: x-small; }
			.item		{ display: inline; font-size: x-small; }
			.orgitem	{ margin-left:2em; text-align: left; font-size: x-small; 
							text-indent: -1em; }
			.img		{ text-align: center;}
			.normal		{ margin-left:1em; font-size: x-small; vertical-align: top;}
			.linkover	{ color: blue }
			.linkoff	{ text-decoration: none; color: black }
			.linkon		{ text-decoration: none; color: blue }
        </STYLE>
		
		<SCRIPT language="JavaScript">
			<xsl:comment>
				<![CDATA[
				
				// assign file name without extension (collection number) here:
				
					collNumber = "RMM07627";
					
					
					function makeURL(anch) {
						url = collNumber + '.xml#' + anch;
						window.open(url,'main');
					}
					function loadEAD() {
						xurl = collNumber + '.xml';
						window.open(xurl,'_top');
					}
					function showDsc() {
						vDsc.style.display="block";
						hDsc.style.display="none";
					}
					function hideDsc() {
						hDsc.style.display="block";
						vDsc.style.display="none";
					}
					function highlightOn(id) {
						document.links[id].className="linkover";
					}
					function highlightOff(id) {
						document.links[id].className="linkoff";
					}
			]]>
			</xsl:comment>
		</SCRIPT>
		
			</HEAD>
			<BODY>
				<DIV class="img">
					<A href="http://rmc.library.cornell.edu/" target="_top">
						<IMG ALIGN="CENTER">
							<xsl:attribute name="src">../images/rmclogo.gif</xsl:attribute>
						</IMG>
					</A>
				</DIV>

				<BR/>
					<xsl:apply-templates select="ead/frontmatter/titlepage/publisher"/>
				<HR/>
					<xsl:apply-templates select="ead/frontmatter/titlepage/num"/>
				<HR/>
				
				<DIV class="itemblock">
				
				<xsl:if test="ead/frontmatter/div/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(1); return true;" onMouseOut="highlightOff(1)" HREF="javascript:makeURL('aa1')">
					<xsl:apply-templates select="ead/frontmatter/div/head"/>
				</A>

				<xsl:if test="ead/archdesc/did/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(2); return true;" onMouseOut="highlightOff(2)" HREF="javascript:makeURL('a1')">
					<xsl:apply-templates select="ead/archdesc/did/head"/>
				</A>

				<xsl:if test="ead/archdesc/bioghist/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(3); return true;" onMouseOut="highlightOff(3)" HREF="javascript:makeURL('a2')">
					<xsl:apply-templates select="ead/archdesc/bioghist/head"/>
				</A>

				<xsl:if test="ead/archdesc/scopecontent/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(4); return true;" onMouseOut="highlightOff(4)" HREF="javascript:makeURL('a3')">
					<xsl:apply-templates select="ead/archdesc/scopecontent/head"/>
				</A>

				<xsl:if test="ead/archdesc/admininfo/custodhist/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(5); return true;" onMouseOut="highlightOff(5)" HREF="javascript:makeURL('a4')">
					<xsl:apply-templates select="ead/archdesc/admininfo/custodhist/head"/>
				</A>
				
				<xsl:if test="ead/archdesc/admininfo/acqinfo/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(6); return true;" onMouseOut="highlightOff(6)" HREF="javascript:makeURL('a5')">
					<xsl:apply-templates select="ead/archdesc/admininfo/acqinfo/head"/>
				</A>
				
				<xsl:if test="ead/archdesc/controlaccess/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(7); return true;" onMouseOut="highlightOff(7)" HREF="javascript:makeURL('a6')">
					<xsl:apply-templates select="ead/archdesc/controlaccess/head"/>
				</A>
				
				<xsl:if test="ead/archdesc/admininfo/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(8); return true;" onMouseOut="highlightOff(8)" HREF="javascript:makeURL('a7')">
					<xsl:apply-templates select="ead/archdesc/admininfo/head"/>
				</A>
				
				<xsl:if test="ead/archdesc/add/relatedmaterial/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(9); return true;" onMouseOut="highlightOff(9)" HREF="javascript:makeURL('a8')">
					<xsl:apply-templates select="ead/archdesc/add/relatedmaterial/head"/>
				</A>

				<xsl:if test="ead/archdesc/arrangement/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(10); return true;" onMouseOut="highlightOff(10)" HREF="javascript:makeURL('a9')">
					<xsl:apply-templates select="ead/archdesc/arrangement/head"/>
				</A>

				<xsl:if test="ead/archdesc/organization/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(11); return true;" onMouseOut="highlightOff(11)" HREF="javascript:makeURL('a10')">
					<xsl:apply-templates select="ead/archdesc/organization/head"/>
				</A>
				
				<xsl:apply-templates select="ead/archdesc/dsc/head"/>
					
				<xsl:if test="ead/archdesc/add/head">
					<DIV class="itemsign"><IMG><xsl:attribute name="src">../images/block.gif</xsl:attribute></IMG> </DIV>
				</xsl:if>
				<A CLASS="linkoff" onMouseOver="highlightOn(16); return true;" onMouseOut="highlightOff(16)" HREF="javascript:makeURL('a12')">
					<xsl:apply-templates select="ead/archdesc/add/head"/>
				</A>
				
				</DIV>

				<HR/>
				<DIV class="normal">
				<A CLASS="linkoff" onMouseOver="highlightOn(17); return true;" onMouseOut="highlightOff(17)" HREF="javascript:loadEAD()">View XML finding aid without frames (suitable for printing)</A>
				</DIV>
				
				<HR/>
				<DIV class="normal">
				<A CLASS="linkoff" onMouseOver="highlightOn(18); return true;" onMouseOut="highlightOff(18)" href="http://cidc.library.cornell.edu/xml" target="_top">EAD/XML Finding Aids Home</A><BR/>
				<A CLASS="linkoff" onMouseOver="highlightOn(19); return true;" onMouseOut="highlightOff(19)" href="http://rmc.library.cornell.edu" target="_top">RMC Home</A><BR/>
				<A CLASS="linkoff" onMouseOver="highlightOn(20); return true;" onMouseOut="highlightOff(20)" href="mailto:rareref@cornell.edu">E-mail RMC Reference</A><BR/>
				</DIV>
			</BODY>
		</HTML>
	</xsl:template>
	

	<!-- PUBLISHER INFO -->
	<xsl:template match="publisher">
		<H4>
			<xsl:apply-templates/>
		</H4>
	</xsl:template>


	<!-- COLLECTION NUMBER -->
	<xsl:template match="num">
		<DIV class="collnum">
			<xsl:apply-templates/>
		</DIV>
	</xsl:template>


	<!-- NAVIGATIONAL HEADINGS -->

	<xsl:template match="div/head | did/head | bioghist/head | scopecontent/head | custodhist/head | acqinfo/head | controlaccess/head | admininfo/head | relatedmaterial/head | arrangement/head | organization/head | add/head">
		<DIV class="item">
			<xsl:value-of/>
		</DIV><BR/>
	</xsl:template>

	<xsl:template match="dsc/head">
		<DIV id="hDsc" class="item">
			<A CLASS="linkon" href="javascript:showDsc();"><IMG BORDER="0"><xsl:attribute name="src">../images/bplus.gif</xsl:attribute></IMG> </A>
			<A CLASS="linkoff" onMouseOver="highlightOn(13); return true;" onMouseOut="highlightOff(13)" HREF="javascript:makeURL('a11')">
				<xsl:apply-templates/>
			</A><BR/>
		</DIV>
		<DIV id="vDsc" class="item" STYLE="display:none">
			<A CLASS="linkon" href="javascript:hideDsc();"><IMG BORDER="0"><xsl:attribute name="src">../images/bminus.gif</xsl:attribute></IMG> </A>
			<A CLASS="linkoff" onMouseOver="highlightOn(15); return true;" onMouseOut="highlightOff(15)" HREF="javascript:makeURL('a11')">
				<xsl:apply-templates/>
			</A>
			<DIV STYLE="margin-left:1em">
				<xsl:apply-templates select="../../organization/list"/>
			</DIV>
		</DIV>
	</xsl:template>
	
	
	<!-- ORGANIZATION -->
	
	<xsl:template match="ead/archdesc/organization/list">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="organization/list/defitem">
		<xsl:choose>
			<xsl:when test="item/list/defitem">
				<DIV class="orgitem">
					<xsl:apply-templates select="label"/>
					<xsl:apply-templates select="item"/>
				</DIV>
			</xsl:when>
			<xsl:otherwise>
				<DIV class="orgitem">
					<xsl:apply-templates select="label"/>
				</DIV>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
	<xsl:template match="organization/list/defitem/item | list/defitem/item/list">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="item/list/defitem">
		<DIV class="orgitem">
			<xsl:apply-templates select="label"/>
		</DIV>
	</xsl:template>
	

	<!-- LOW-LEVEL ELEMENTS -->

	<xsl:template match="lb">
		<xsl:apply-templates/>
		<BR/>
	</xsl:template>
	
</xsl:stylesheet>
