// This is common code that all calendars would share.

// Retuns the path to the calendar resources for the current year and month.
function CLV2_GetCalendarUrl(yearParam, monthParam, calendarName)
{
	return "/calendar/v2/month.axd?yearid=" + yearParam + "&monthid=" + (monthParam + 1) + "&calendar=" + calendarName;
}

// We can use the Date object to move the year and month for us.
function CLV2_AdjustYearAndMonthIntoDate(startingYear, startingMonth, offsetYear, offsetMonth)
{
	var tempDateTime = new Date(startingYear + offsetYear, startingMonth + offsetMonth, 1);
	return tempDateTime;
}

// Performs the task of updating the container with the result of using the year and month
function CLV2_RefreshCalendarContainer(container, yearParam, monthParam, calendarName)
{
	new Ajax.Updater(container, CLV2_GetCalendarUrl(yearParam, monthParam, calendarName), { method: 'get' });
}
