
<div class="yearview full">

	<?php if ($this->use_navigation): ?>
		<div class="yearview_navi">
			<?php if ($this->linkCurrent): ?>
	    		<div class="head current"><a href="<?php echo $this->currHref; ?>" title="<?php echo $this->currTitle; ?>"><?php echo $this->currLink; ?></a></div>
	    	<?php endif; ?>
	    	<div class="head previous"><a href="<?php echo $this->prevHref; ?>" title="<?php echo $this->prevTitle; ?>"><?php echo $this->prevLink; ?></a></div>
	    	<div class="head current"><?php echo $this->current; ?></div>
	    	<div class="head next"><a href="<?php echo $this->nextHref; ?>" title="<?php echo $this->nextTitle; ?>"><?php echo $this->nextLink; ?></a></div>
		</div>
	<?php endif; ?>


	<table cellspacing="0" cellpadding="0" border="0" class="yearview_body full" summary="Yearview">

    <?php if ($this->use_horizontal): ?>

        <!-- vertical -->
        <tr class="yearview_days">
        <?php foreach ($this->months as $i => $day): ?>
            <td colspan="2" class="<?php echo $day['class']; ?>">
            <div class="head"><?php echo $day['label']; ?></div>
            </td>
        <?php endforeach; ?>
        </tr>

        <?php foreach ($this->yeardays as $d => $days): ?>
            <tr class="yearview_events">
            <?php foreach ($days as $dd => $day): ?>
                <td nowrap valign="top" class="<?php echo $day['class']; ?>"><?php echo $day['label']; ?></td>
                <?php if ($day['events']): ?>
                    <td class="<?php echo $day['class']; ?>">
                    <?php foreach ($day['events'] as $e => $event): ?>
                        <div class="event cal_<?php echo $event['pid']; ?><?php if ($event['class']): echo $event['class']; endif; ?>" style="<?php echo $event['bgstyle']; ?>" title="<?php echo $event['title']; ?>">
                            <div class="event_title <?php echo $event['fgstyle']; ?>" title="<?php echo $event['time']; ?>">
                                <?php echo $event['title']; ?>
                            </div>
                        </div>
                    <?php endforeach; ?>
                    </td>
                <?php endif; ?>
            <?php endforeach; ?>
            </tr>
        <?php endforeach; ?>

    <?php else : ?>

        <!-- horizontal -->
        <?php foreach ($this->yeardays as $d => $days): ?>
            <tr class="yearview_events">
            <?php foreach ($days as $dd => $day): ?>
                <td nowrap valign="top" class="<?php echo $day['class']; ?>"><?php echo $day['label']; ?></td>
                <?php if ($dd > 0): ?>
                    <td class="<?php echo $day['class']; ?>">
                    <?php if ($day['events']): ?>
                        <?php foreach ($day['events'] as $e => $event): ?>
                            <div class="event cal_<?php echo $event['pid']; ?><?php if ($event['class']): echo $event['class']; endif; ?>" style="<?php echo $event['bgstyle']; ?>" title="<?php echo $event['title']; ?>">
                                <div class="event_title <?php echo $event['fgstyle']; ?>" title="<?php echo $event['time']; ?>">
                                    <?php echo $event['title']; ?>
                                </div>
                            </div>
                        <?php endforeach; ?>
                    <?php endif; ?>
                    </td>
                <?php endif; ?>
            <?php endforeach; ?>
            </tr>
    	<?php endforeach; ?>

    <?php endif; ?>

	</table>

</div>
