using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using Telerik.Web.UI;
using System.Data;
using System.Data.OleDb;

public partial class Default2 : System.Web.UI.Page
{
    Image _headerImage = null;
    Image _footerImage = null;

    private void Page_Load(object sender, System.EventArgs e)
    {
        _headerImage = (Image)RadCalendar1.FindControl("HeaderImage");
        _footerImage = (Image)RadCalendar1.FindControl("FooterImage");
        AddImages(RadCalendar1.CalendarView);
    }

    protected void RadCalendar1_DefaultViewChanged(object sender, Telerik.Web.UI.Calendar.DefaultViewChangedEventArgs e)
    {
        AddImages(e.NewView);
    }

    private void AddImages(Telerik.Web.UI.Calendar.View.CalendarView inputView)
    {
        switch (inputView.ViewStartDate.Month)
        {
            case 1:
            case 11:
            case 12:
                _headerImage.ImageUrl = "Common/header_winter.jpg";
                _footerImage.ImageUrl = "Common/footer_winter.jpg";
                _headerImage.AlternateText = _footerImage.AlternateText = "Winter";
                break;
            case 2:
            case 3:
            case 4:
                _headerImage.ImageUrl = "Common/header_spring.jpg";
                _footerImage.ImageUrl = "Common/footer_spring.jpg";
                _headerImage.AlternateText = _footerImage.AlternateText = "Spring";
                break;
            case 5:
            case 6:
            case 7:
                _headerImage.ImageUrl = "Common/header_summer.jpg";
                _footerImage.ImageUrl = "Common/footer_summer.jpg";
                _headerImage.AlternateText = _footerImage.AlternateText = "Summer";
                break;
            case 8:
            case 9:
            case 10:
                _headerImage.ImageUrl = "Common/header_autumn.jpg";
                _footerImage.ImageUrl = "Common/footer_autumn.jpg";
                _headerImage.AlternateText = _footerImage.AlternateText = "Autumn";
                break;
        }
    }
}