<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
                xmlns="http://www.w3.org/TR/REC-html40">
    <xsl:template match="/">
	<HTML>
	<HEAD>
		<TITLE><xsl:value-of select="//Dataset_Id/DATASET_NAME"/></TITLE>
<script>
function detail(p) {
	window.status = p;
	details.document.location = p;
}

function ViewQL(path) {
  window.open(path, "QL", "toolbars=no, scrollbars=yes");
}

</script>
		
	</HEAD>
	<BODY bgcolor="#007a9d">
	<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" STYLE="page-break-inside: avoid">
		<TR>
		  <TD WIDTH="300 px">
		     <A>
		       <xsl:attribute name="HREF">
		         <xsl:value-of select="//Production/DATASET_PRODUCER_URL/@href"/>
		       </xsl:attribute>
                       <IMG WIDTH="120" src="LOGO.JPG" alt="Spot Image"/>
		     </A>
		  </TD>
		  <TD VALIGN="TOP">
		    <P>
			<FONT FACE="Trebuchet MS" STYLE="font-size: 12pt; font-weight: bold;">
				    <xsl:value-of select="//Dataset_Id/DATASET_NAME"/>
				  </FONT>
				  <HR/>
				  <FONT FACE="Trebuchet MS" STYLE="font-size: 10 pt">
				    <STRONG>Production info :</STRONG><BR/>
				      By :
				      <A>
				        <xsl:attribute name="href">
				          <xsl:value-of select="//Production/DATASET_PRODUCER_URL/@href"/>
				        </xsl:attribute>
				        <xsl:value-of select="//Production/DATASET_PRODUCER_NAME"/>
				      </A><BR/>
				      Date : <xsl:value-of select="//Production/DATASET_PRODUCTION_DATE"/><BR/>
			</FONT>
		    </P>
		  </TD>
		</TR>
	</TABLE>
	<HR/>
	<TABLE WIDTH="100%" HEIGHT="80%">
	  <TR>
	    <TD WIDTH="20%" VALIGN="TOP">
	      <TABLE>
    <xsl:for-each select="//Component">
      <TR >
        <TD rowspan="3">
	        <xsl:eval>formatIndex(childNumber(this), "1")</xsl:eval>
        <xsl:if test="COMPONENT_TN_PATH">
		<xsl:if test='COMPONENT_TYPE[. = "DIMAP"]'>
			<A>
			  <xsl:attribute name="href">javascript:detail("<xsl:value-of select='COMPONENT_PATH/@href'/>")</xsl:attribute>
			  <IMG WIDTH="80" ALT="Click to display additional information">
			    <xsl:attribute name="src"><xsl:value-of select="COMPONENT_TN_PATH/@href"/></xsl:attribute>
			  </IMG>
			</A>
		</xsl:if>
		<xsl:if test='COMPONENT_TYPE[. !="DIMAP"]'>
			<A target="_blank">
			  <xsl:attribute name="href">
			    <xsl:value-of select='COMPONENT_PATH/@href'/>
			   </xsl:attribute>
			<IMG WIDTH="92">
			  <xsl:attribute name="src"><xsl:value-of select="COMPONENT_TN_PATH/@href"/></xsl:attribute>
			</IMG>
			</A>
		</xsl:if>
        </xsl:if>
        </TD>
        <TD><font size="2">
		<xsl:if test='COMPONENT_TYPE[. = "DIMAP"]'>
			<A>
			  <xsl:attribute name="href">javascript:detail("<xsl:value-of select='COMPONENT_PATH/@href'/>")</xsl:attribute>
			  <font face="Trebuchet MS" size="2"><xsl:value-of select="COMPONENT_TITLE"/></font>
			</A>
		</xsl:if>
		<xsl:if test='COMPONENT_TYPE[. !="DIMAP"]'>
			<A target="_blank">
			  <xsl:attribute name="href">
			    <xsl:value-of select='COMPONENT_PATH/@href'/>
			   </xsl:attribute>
			<font face="Trebuchet MS" size="2"><xsl:value-of select="COMPONENT_TITLE"/></font>
			</A>
		</xsl:if>
        </font></TD>
      </TR>
      <TR>
        <TD><font size="2"><xsl:value-of select="COMPONENT_CONTENT"/></font></TD>
      </TR>
      <TR>
        <TD><font face="Trebuchet MS" size="1"> (<xsl:value-of select="COMPONENT_TYPE"/>)</font></TD>
      </TR>
    <TD colspan="2"><HR/></TD>
    </xsl:for-each>
    </TABLE>
	    </TD>
	    <TD WIDTH="70%">
		<IFRAME WIDTH="100%" HEIGHT="100%" ID="details"/>
	    </TD>
	  </TR>
	</TABLE>
	</BODY>
	</HTML>
    </xsl:template>
</xsl:stylesheet>
