<{assign var=cal value=$block.calendar}>
<{assign var=month value=$block.calendar.days}>
<{assign var=remark value=$block.calendar.remarks}>
<{assign var=entry value=$block.calendar.entries}>
<{assign var=archive value=$block.calendar.archives}>
<table id="<{$block.mydirname}>BlockCalendar" cellspacing="1" cellpadding="0" border="0" summary="<{$cal.lang_calendar_summary}>">
	<caption>
	<a id="to-prevY" name="to-prevY" href="<{$block.mod_url}>/index.php?date=<{$cal.yearPrev}>" title="show previous year calendar"><{$cal.lang_yearPrev}></a>
	<a id="to-prevM" name="to-prevM" href="<{$block.mod_url}>/index.php?date=<{$cal.monthPrev}>" title="show previous month calendar"><{$cal.lang_monthPrev}></a>
	<a id="to-this" name="to-this" href="<{$block.mod_url}>/index.php?date=<{$cal.monthThis}>" title="display this month archive"><{$cal.year}>&nbsp;<{$cal.lang_month}></a>
	<a id="to-nextM" name="to-nextM" href="<{$block.mod_url}>/index.php?date=<{$cal.monthNext}>" title="show next month calendar"><{$cal.lang_monthNext}></a>
	<a id="to-nextY" name="to-nextY" href="<{$block.mod_url}>/index.php?date=<{$cal.yearNext}>" title="show next year calendar"><{$cal.lang_yearNext}></a>
	</caption>
	<thead>
	<tr align="center" valign="middle">
<{foreach item=weekname name=dayofweekloop from=$cal.dayofweek}>
		<th<{if $smarty.foreach.dayofweekloop.first}> class="sunday"<{elseif $smarty.foreach.dayofweekloop.last}> class="saturday"<{/if}> title="<{$weekname}>" scope="col"><{$weekname}></th>
<{/foreach}>
	</tr>
	</thead>
	<tbody>
<{section name=week loop=$month}>
	<tr align="center" valign="middle">
	<{section name=day loop=$month[week]}><{strip}>
	<td<{if $remark[week][day] != ""}> class="<{$remark[week][day]}>"<{/if}>>
	<{if $entry[week][day]}>
		<a href="<{$block.mod_url}>/index.php?date=<{$entry[week][day].yyyymmdd}>" title="<{$entry[week][day].title}>"><{$month[week][day]}></a>
	<{else}>
		<{$month[week][day]}><{/if}></td><{/strip}>
	<{/section}>
	</tr>
<{/section}>
	</tbody>
</table>