public function OnPageLoad()
    {
        $title = 'Add ' . $this->s_matches . ' to your calendar';
        if ($this->s_cal_title) {
            $title .= ': ' . $this->s_cal_title;
        }
        echo '<h1>' . htmlentities($title, ENT_QUOTES, "UTF-8", false) . '</h1>';
        $subscribe_link = new XhtmlAnchor(null, "webcal://" . $_SERVER['HTTP_HOST'] . $this->s_cal_url . '.ics');
        $subscribe_link->SetCssClass('calendar');
        $subscribe_link->AddAttribute('type', 'text/calendar');
        $subscribe_link->AddAttribute('rel', 'nofollow');
        $download_link = new XhtmlAnchor('download the calendar', "https://" . $_SERVER['HTTP_HOST'] . $this->s_cal_url . '.ics');
        $download_link->AddAttribute('type', 'text/calendar');
        $download_link->AddAttribute('rel', 'nofollow');
        $subscribe_link->AddControl(new XhtmlElement('p', 'Subscribe to calendar', 'subscribe'));
        $subscribe_link->AddControl(new XhtmlElement('p', Html::Encode($this->s_cal_title ? $this->s_cal_title : ucfirst($this->s_matches)), "subscribe-to medium large"));
        echo $subscribe_link;
        ?>
        <p>If you run your life on your computer or mobile, you can save time by adding
		all of your stoolball matches to your calendar, kept up-to-date automatically.</p>

        <h2>How to subscribe</h2>
        <p>You just need a calendar which supports the iCalendar standard. Most do, including popular 
                    ones like Microsoft Outlook, Apple iCal and Google Calendar.</p>
        
        <ul>
        <li><a href="http://www.apple.com/findouthow/mac/#subscribeical">Apple iCal: Subscribe to an iCal Calendar</a></li>
        <li><a href="http://office.microsoft.com/en-us/outlook-help/view-and-subscribe-to-internet-calendars-HA010167325.aspx#BM2">Microsoft Outlook: Add an Internet calendar subscription</a></li>
        <li><a href="http://support.google.com/calendar/bin/answer.py?hl=en&amp;answer=37100">Google Calendar: Subscribe to calendars</a></li>
        <li><a href="http://windows.microsoft.com/en-GB/hotmail/calendar-subscribe-calendar-ui">Hotmail Calendar: Import or subscribe to a calendar</a></li>
        </ul>
        
        <h2>How to download</h2>
        <p>If you don't want to subscribe to updates, <?php 
        echo $download_link;
        ?>
 instead.</p>
        <?php 
    }
 private function CreateLinkToMatch(Match $match)
 {
     $text = $match->GetTitle();
     # Add player type for tournaments
     if ($match->GetPlayerType() and $match->GetMatchType() === MatchType::TOURNAMENT and strpos(strtolower($match->GetTitle()), strtolower(PlayerType::Text($match->GetPlayerType()))) === false) {
         $text .= ' (' . htmlentities(PlayerType::Text($match->GetPlayerType()), ENT_QUOTES, "UTF-8", false) . ')';
     }
     $link = new XhtmlAnchor();
     $link->AddControl(htmlentities($text, ENT_QUOTES, "UTF-8", false));
     $link->SetNavigateUrl($match->GetNavigateUrl());
     if ($this->b_microformats) {
         $link->SetCssClass('summary url');
         # hCalendar
         $link->AddAttribute("rel", "schema:url");
         $link->AddAttribute("property", "schema:name");
         $title_meta = new XhtmlElement('span', ' (stoolball)');
         $title_meta->SetCssClass('metadata');
         $link->AddControl($title_meta);
     }
     return $link;
 }