// JavaScript Document
// Set the year to the client's local clock
// Last modification 14 Feb 2010
// Steven Grindle

var date_start = new Date();
var current_local_year = date_start.getFullYear();
date_start = new Date(current_local_year,1-1,1,12,0,0,0);
//Initialize date_start as Jan 1 of the current year
var dow_jan1_current_year = date_start.getDay();
//What day of the week was Jan 1 of the current year
	if(dow_jan1_current_year == 0){
		//must find the first possible Sunday of the calendar
		date_start = new Date(current_local_year-1,12-1,25,12,0,0,0);
		//The first possible Sunday of the calendar is Dec 25 of the previous year
	}else{
		date_start = new Date(current_local_year-1,12-1,32-dow_jan1_current_year,12,0,0,0);
		//The first possible Sunday of the calendar is Dec 32-date_start_dow of the previous year
	}
//alert(" : date_start="+date_start+" : dow_jan1_current_year="+dow_jan1_current_year);
//diagnostic code

var date_stop = new Date(current_local_year+1,1-1,1,12,0,0,0);
//Find the last possible Sunday of the calendar (1 years from the 1st possible Sunday)
var dow_jan1_next_year = date_stop.getDay();;
	if(dow_jan1_next_year == 0){
		//must find the first Sunday that will NOT be shown on the calendar
		date_stop = new Date(current_local_year+1,1-1,1,12,0,0,0);
		//The first possible Sunday of the calendar is Dec 25 of the previous year
	}else{
		date_stop = new Date(current_local_year+1,1-1,8-dow_jan1_next_year,12,0,0,0);
		//The first Sunday that will NOT be shown. Jan 8-dow_jan1_next_year of the next year
	}
//alert(" : date_stop="+date_stop+" : dow_jan1_next_year="+dow_jan1_next_year);
//dianostic code

//As of Jun 4, 2009 MUST make date_start and date_stop = SUNDAY. 
//Code to do this automatically was added 14-Feb-2010

var event_list = 
[
"2010 Jan 1	New Year's Day",
"2010 Jan 18 Martin Luther King Day",
"2010 Feb 14 Valentine's Day",
"2010 Feb 15 Presidents' Day",
"2010 Apr 4 Easter Sunday",
"2010 May 9 Mother's Day",
"2010 May 31 Memorial Day",
"2010 Jun 20 Father's Day",
"2010 Jul 4 Independence Day",
"2010 Jul 5 'Independence Day' observed",
"2010 Sep 6 Labor Day",
"2010 Oct 11 Columbus Day (Most regions)",
"2010 Oct 31 Halloween",
"2010 Nov 2 Election Day",    
"2010 Nov 11 Veterans Day",
"2010 Nov 25 Thanksgiving Day",
"2010 Dec 24 Christmas Eve",
"2010 Dec 24 'Christmas Day' observed",
"2010 Dec 25 Christmas Day",
"2010 Dec 31 'New Year's Day' observed",
"2010 Jan 1 New Years Day"
];