<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 
  
  
  <xsl:template match="DATASET">
	<xsl:apply-templates />
  </xsl:template>
  
  
  <xsl:template match="RECORD[FIELD]">
	
		<xsl:for-each select="FIELD">
		<TR>
			<TD BGCOLOR="#617FB3" width="10%"><font color="white" face="verdana" size="2"/><xsl:value-of select="./@NAME"/></TD>	
		
			<xsl:choose>
				<xsl:when test="HYPERLINK">
					<TD bgcolor="#c7d4eb">
					<font color="black" size="1"/>
					<a>
					<xsl:attribute name="HREF"><xsl:value-of select="HYPERLINK/URL" /></xsl:attribute>
					<xsl:value-of select="HYPERLINK/VALUE" />
					</a>
					</TD>
				</xsl:when>
				<xsl:when test=".[@NAME='SalesPrice']">
					<TD bgcolor="#c7d4eb">
					<font color="black" size="1"/>
					<xsl:value-of select="./@I18NVALUE"/>
					</TD>
				</xsl:when>
				<xsl:when test=".[@NAME='Price']">
					<TD bgcolor="#c7d4eb">
					<font color="black" size="1"/>
					<xsl:value-of select="./@I18NVALUE"/>
					</TD>
				</xsl:when>
				<xsl:when test=".[@NAME='SuggestedRetailPrice']">
					<TD bgcolor="#c7d4eb">
					<font color="black" size="1"/>
					<xsl:value-of select="./@I18NVALUE"/>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='QuotationDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='OrderDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='CurrentPlannedDeliveryDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
					
				
				<xsl:when test=".[@NAME='Del.Date']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='DeliveryDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='PeriodDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='PlanDelDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='PlannedDeliveryDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				
				<xsl:when test=".[@NAME='EffectiveDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='InquiryDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='ExpiryDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='DocumentDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				<xsl:when test=".[@NAME='ContractDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				  
				
				<xsl:when test=".[@NAME='DueDate']">
					<TD bgcolor="#c7d4eb">
						<font color="black" size="1"/>
						 <xsl:eval>
						 	formatDateEx(this.text);
						 </xsl:eval>
					</TD>
				</xsl:when>
				
				
				
				<xsl:when test="./@DISPLAYVALUE">
					<TD bgcolor="#c7d4eb"><font color="black" size="1"/><xsl:value-of select="./@DISPLAYVALUE"/></TD>
				</xsl:when>
				<xsl:otherwise>
					<TD bgcolor="#c7d4eb"><font color="black" size="1"/><xsl:value-of select="."/></TD>
				</xsl:otherwise>
			</xsl:choose>
			<TD bgcolor="#c7d4eb"></TD>
		</TR>
		<TR><TD colspan="100%" BGCOLOR="#D9E2F2"></TD></TR>
		</xsl:for-each>
		
	<xsl:apply-templates />
  </xsl:template>

  
  <xsl:template match="BACKENDDATA">
	<xsl:apply-templates />
  </xsl:template>

  
  <xsl:template match="/">
	<P/>
	<TABLE BORDER="0" width="80%" ALIGN="CENTER"  bgcolor="#20406E" cellspacing="0" >
	<TR><TD height="25" colspan="2">
		<font color="white" face="Arail,Verdana" point-size="11"/><b/><![CDATA[   ]]><xsl:value-of select="BACKENDDATA/DATASET/@NAME"/>
	</TD></TR>
	
	<xsl:apply-templates />
	
	<TR></TR>
	<TR></TR>
	<TR></TR>
	<TR><TD bgcolor="#617FB3" colspan="100%"/></TR>
	<TR><TD bgcolor="#617FB3" colspan="100%"/></TR>
	<TR><TD bgcolor="#c7d4eb" colspan="100%"/></TR>
	</TABLE>
  </xsl:template>

  <xsl:script><![CDATA[
    
    function formatDateEx(strDate)
    {
    	    	
    	var objStr = new String(strDate)
    	var objDate = new Date ( objStr.substring(4,6) + "/" + objStr.substring(6,8) + "/" + objStr.substring(0,4) )
    	return formatDate(new Date(Date.parse(objDate)).getVarDate(), "MMMM dd',' yyyy")
      
    }
       
    
  ]]></xsl:script>
  
</xsl:stylesheet>
