<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/">
	<xsl:apply-templates select="CALANDER"/>
</xsl:template>

<xsl:template match="CALANDER">

<TABLE class="caltab" border="0" cellspacing="0" cellpadding="0">
	<xsl:attribute name="id">caltab</xsl:attribute>
	<TR style="padding-bottom:2px;padding-top:2px">
		<TD style="padding-left:2px">
			<BUTTON>
			<xsl:attribute name="onclick">javascript:rtnEmptyDate();</xsl:attribute>
			Clear
			</BUTTON>
		</TD>
		<TD>
				<SELECT style="width:100px" id="dmonth" onchange="javascript:MonthYearChange();">
						<option value="0">January</option>
						<option value="1">Febuary</option>
						<option value="2">March</option>
						<option value="3">April</option>
						<option value="4">May</option>
						<option value="5">June</option>
						<option value="6">July</option>
						<option value="7">August</option>
						<option value="8">September</option>
						<option value="9">Oct</option>
						<option value="10">November</option>
						<option value="11">December</option>
				</SELECT>
		</TD>
		<TD>
				<SELECT style="width:50px" id="dyear" onchange="javascript:MonthYearChange();">
					
					<xsl:call-template name="year-options">
						<xsl:with-param name="startyear" select="@sty"/>
						<xsl:with-param name="lastyear" select="@eny"/>
					</xsl:call-template>
				</SELECT>
		</TD>
	</TR>
	<TR>
		<TD>
			<xsl:attribute name="colspan">3</xsl:attribute>
			<xsl:attribute name="id">calbody</xsl:attribute>
			asda
		</TD>
	</TR>
</TABLE>
</xsl:template>

<xsl:template name="year-options">
	<xsl:param name="startyear"/>
	<xsl:param name="lastyear"/>
	<xsl:if test="$startyear &lt; $lastyear">
		<option>
			<xsl:attribute name="value"><xsl:value-of select="$startyear"/></xsl:attribute>
			<xsl:value-of select="$startyear"/>
		</option>
		<xsl:call-template name="year-options">
			<xsl:with-param name="startyear" select="$startyear + 1"/>
			<xsl:with-param name="lastyear" select="$lastyear"/>
		</xsl:call-template>
	</xsl:if>
</xsl:template>




</xsl:stylesheet>