//********************************EDIT TO CHANGE SELECTED DATES***********************************

//Change these dates to highlight a day in green. To start another year, uncomment the variable for the next year.

					var selectDates = new String();
					var selectYear = 2009;
					var selectYear2 = 2010;
					
					
					
//If the month only has one event, please add a zero to the array.
//arr = new Array(3) means that there will be three objects in the array.
//arr = new Array(0,3) means that the objects are 0 and 3.
//if there are no events, leave the array empty.

					var january = new Array();
					var february = new Array(7,21);
					var march = new Array(6,7);
					var april = new Array(2,4,6,17,18,19,25,30);
					var may = new Array(2,9,16,17);
					var june = new Array(2,6,9,14,21,22,23,24,25);
					var july = new Array(0,4);
					var august = new Array(1,7,29);
					var september = new Array(0,5);
					var october = new Array(3,30,31);
					var november = new Array(14,18,7);
					var december = new Array(3,5,12);
	
					//begins the function with the month and its corresponding number
					addDates(january, 1);
					addDates(february, 2);
					addDates(march, 3);
					addDates(april, 4);
					addDates(may, 5);
					addDates(june, 6);
					addDates(july, 7);
					addDates(august, 8);
					addDates(september, 9);
					addDates(october, 10);
					addDates(november, 11);
					addDates(december, 12);
					
					//takes the date from the month array and turns into a date object, adding it to the selectDates variable.
					function addDates (month, num){
						for(var i=0; i < month.length; i++){
							tempDate = new Date(selectYear,(num-1),month[i]);
							var myMonth = (tempDate.getMonth()+1);
							var myDay = tempDate.getDate();
							var myYear = tempDate.getFullYear()
							var newDate = ',' + myMonth + '/' + myDay + '/' + myYear;
							selectDates = selectDates.concat(newDate.toString());
						}
					}
					
					
//********************************EDIT TO CHANGE SELECTED DATES FOR ANOTHER YEAR***********************************

//This section is set up for January of the following year, uncomment to use and/or expand for more months.
					var january2 = new Array(0,2);
					var february2 = new Array();
					var march2 = new Array();
					var april2 = new Array();
					var may2 = new Array();
					var june2 = new Array();
					var july2 = new Array();
					var august2 = new Array();
					var september2 = new Array();
					var october2 = new Array();
					var november2 = new Array();
					var december2 = new Array();
					
					addDates(january2, 1);
					addDates(february2, 2);
					addDates(march2, 3);
					addDates(april2, 4);
					addDates(may2, 5);
					addDates(june2, 6);
					addDates(july2, 7);
					addDates(august2, 8);
					addDates(september2, 9);
					addDates(october2, 10);
					addDates(november2, 11);
					addDates(december2, 12);
					
					
					function addDates2 (month, num){
						for(var i=0; i < month.length; i++){
							tempDate = new Date(selectYear2,(num-1),month[i]);
							var myMonth = (tempDate.getMonth()+1);
							var myDay = tempDate.getDate();
							var myYear = tempDate.getFullYear()
							var newDate = ',' + myMonth + '/' + myDay + '/' + myYear;
							selectDates = selectDates.concat(newDate.toString());
						}
					}
					

//********************************CALENDAR FUNCTIONS | DO NOT EDIT BELOW THIS LINE***********************************
YAHOO.namespace("hca.calendar");
 
	YAHOO.hca.calendar.init = function() {	
		YAHOO.hca.calendar.cal = new YAHOO.widget.Calendar("cal","calContainer");
		YAHOO.hca.calendar.cal.addRenderer(selectDates, YAHOO.hca.calendar.cal.renderCellStyleHighlight1);
		YAHOO.hca.calendar.cal.selectEvent.subscribe(handleSelect, YAHOO.hca.calendar.cal, true);
		YAHOO.hca.calendar.cal.render();
		YAHOO.hca.calendar.cal.show();
		
		//gets the current day and displays the events
		var today = YAHOO.hca.calendar.cal.today;
		var todayIndex = YAHOO.hca.calendar.cal.getCellIndex(today);
		YAHOO.hca.calendar.cal.selectCell(todayIndex);

		//used to show and hide the calendar with a button
//		YAHOO.hca.calendar.cal1.hide();
//		YAHOO.util.Event.addListener("show", "click", YAHOO.hca.calendar.cal.show, YAHOO.hca.calendar.cal, true);

		function handleSelect(type,args,obj) {
			var dates = args[0]; 
			var date = dates[0];
				year = date[0];
				month = date[1];
				day = date[2];
			var txtDate1 = document.getElementById('calInfo');
			var hca = new Array();
			updateCal("<h3>There is no event information available for this date.</h3>" +
					  "Please choose another date or visit our <a href='http://history.delaware.gov/museums/default.shtml'>Museums</a> for more information.");
			
			
//********************************EDIT FOR CONTENT ON THE CALENDAR***********************************

/*  NOTES:
- To add more dates:
	case yourDate:
		hca[0] = "<h3>The Event</h3>";
		hca[1] ="The Time<br /> Other Info";
		hca[2] = museum code;
	break;
- To have more than one event on that date, continue counting up the array.
		hca[3], hca[4], hca[5] ...
- <h3> tag is set as the title element.
- To link an event: '<a target="_blank" href="http://delaware.gov">Testing</a>';
- Note that the quotes must be either ' "" ' or " '' ".
- If there is no event, set case 0: or delete.
*/



//*******************************************************************

//This section is set up for January of the following year, uncomment to use and/or expand for more months.

if(year == selectYear2){
	
if (month == 1){

//Match the case number equals date.
	switch (day)
	{
	case 2:
  			hca[0] = "<h3>No Bones About It...</h3>";
			hca[1] = "First Saturday in the First State event<br />9am-4:30pm<br />Free admission";
			hca[2] = jvm;
			
			hca[3] = "<h3>A Day with Bedford and McLane</h3>";
			hca[4] = "Programs begin at 10am, 11:30am, and 1pm<br />Free admission<br />Historical re-enactors take on the personas of noted Delawareans Gunning Bedford, Jr., a delegate to the U.S. Constitutional Convention of 1787, and Revolutionary War hero Colonel Allen McLane.";
			hca[5] = sh;
	break;
	case 0:
  			hca[0] = "<h3>State House Opening</h3>"; 
			hca[1] = "All Day on the Green in Dover";
			hca[2] = sh;
  	break;
	default:
  			hca[0] = "<h3>There are no events scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}


};

//*******************************************************************



if(year == selectYear){
if (month == 1){

//Match the case number equals date.
	switch (day)
	{
	case 0:
  			hca[0] = "<h3>FSP Event</h3>";
			hca[1] = "11:00am - 3:00pm";
			hca[2] = jvm;
  	break;
	case 0:
  			hca[0] = "<h3>State House Opening</h3>"; 
			hca[1] = "All Day on the Green in Dover";
			hca[2] = sh;
  	break;
	case 0:
  			hca[0] =  "<h3>Delaware Day</h3>";
			hca[1] = "10:00am - 6:30pm";
			hca[2] = fshp;
	break;
	case 0:
  			hca[0] = "<h3>Exhibit Opens</h3>";
			hca[1] = "Evening Reception is at 6:30pm";
			hca[2] = fshp;
  	break;
	case 0:
  			hca[0] = "<h3>Guest Lecture: Sam Smith</h3>";
			hca[1] = "Program begins at 7:00pm";
			hca[2] = zwaan;
  	break;
	default:
  			hca[0] = "<h3>There are no events scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

if (month == 2){
	
	switch (day)
	{
	case 7:
  			hca[0] = "<h3>Superstitions &amp; Celebrations</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = zwaan;					
  	break;
	case 21:
  			hca[0] = "<h3><a href='/news/feb09.shtml?panel=9#Accordion1' target='_blank'>Archaeological Documentation Class</a></h3>";
			hca[1] = "10:00 a.m.<br />Free admission";
			hca[2] = zwaan;
  	break;
	default:
  			hca[0] = "<h3>There are no events scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

if (month == 3){
	
	switch (day)
	{
	case 6:
  			hca[0] = "<h3><a target='_blank' href='/museums/vc/current_exhibit.shtml'>Shipbuilding in the First State</a></h3>";
			hca[1] = "Exhibit Opening";
			hca[2] = fshp;
  	break;
	case 7:
			hca[0] = "<h3>March Into March</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = jvm;
  	break;
	default:
  			hca[0] = "<h3>There are no events scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}
	
if (month == 4){
	
	switch (day)
	{
	case 2:
  			hca[0] = "<h3>Symposium on Delaware's Historic Preservation Tax Credit Program</h3>";
			hca[1] = "22 S. Main St.<br />Smyrna, DE<br />6:30pm-8:30pm<br />Dinner included<br />$15 admission, $10 for SDR Association members<br />(302) 653-6449 to register";
  	break;
	case 4:
  			hca[0] = "<h3>April Showers &amp; Garden Flowers</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = jvm;
  	break;
	case 6:
  			hca[0] = "<h3>Two Delaware Coastal Shipwrecks</h3>";
			hca[1] = "Exhibit Opens<br />Legislative Hall<br />Free admission";
			hca[2] = legHall;
  	break;
	case 17:
  			hca[0] = "<h3>Delaware Humanities Forum Symposium</h3>";
			hca[1] = "Wesley College, Dover, DE<br />9am-3pm<br /><a target='blank' href='http://dhf.org/news/35th_anniversary_2008.cfm'>More Information...</a>";
  	break;
	case 18:
			hca[0] = "<h3><a target='blank' href='/news/april09.shtml?panel=3#Accordion1'>Dutch-American Friendship Days</a></h3>";
			hca[1] = "10am-4:30pm<br />Free admission";
			hca[2] = zwaan;
	break;
	case 19:
  			hca[0] = "<h3><a target='blank' href='/news/april09.shtml?panel=3#Accordion1'>Dutch-American Friendship Days</a></h3>";
			hca[1] = "1:30pm-4:30pm<br />Free admission";
			hca[2] = zwaan;
  	break;
	case 25:
  			hca[0] = "<h3>Annual Meeting of the Archaeological Society of Delaware</h3>";
			hca[1] = "Visitors welcome for all programs<br />10am-4pm<br />Free admission<br /><a target='blank' href='http://www.delawarearchaeology.org/index.html'>View website</a>";
			hca[2] = barrets;
  	break;
	case 30:
			hca[0] = "<h3><a target='blank' href='/news/april09.shtml?panel=4#Accordion1'>Queen's Day</a></h3>";
			hca[1] = "10am-4:30pm<br />Free admission";
			hca[2] = zwaan;
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

if (month == 5){
	
	switch (day)
	{
	case 2:
  			hca[0] = "<h3>Shake, Rattle, and Dig!</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = jvm;
  	break;
	case 9:
  			hca[0] = "<h3><a href='/archaeology/09symposium.pdf' target='_blank'>Archaeological Symposium</a></h3>";
			hca[1] = "9am-4:30pm";
			hca[2] = ncch;
  	break;
	case 17:
			hca[0] = "<h3>Cooch-Dayett Mill Open House</h3>";
			hca[1] = "1pm-4pm";
			hca[2] = dayett;
	break;
	case 16:
  			hca[0] = "<h3>A Day in Old New Castle</h3>";
			hca[1] = "10am-5pm<br /><a href='http://www.dayinoldnewcastle.org/dionc/'>More Information...</a><br />";
			hca[2] = ncch;
						
			hca[0] = "<h3>Buena Vista Open House</h3>";
			hca[1] = "Offering house tours and living history presentations<br />10am-4pm<br />Free admission";
			hca[2] = buena;
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}
	
if (month == 6){
	
	switch (day)
	{
	case 2:
  			hca[0] = "<h3>Book Signing by Jane E. Calvert</h3>";
			hca[1] = "4pm-5:30pm<br />Free house tours also available";
			hca[2] = jdp; 
  	break;
	case 6:
  			hca[0] = "<h3>Celebrate Black Music Month</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = jvm;
  	break;
	case 9:
  			hca[0] = "<h3>Simple Machines</h3>";
			hca[1] = "Exhibit Opens<br />Free admission";
			hca[2] = jdp;
  	break;
	case 14:
  			hca[0] = "<h3>Flag Day Concert</h3>";
			hca[1] = "Air Force 'Vector' brass ensemble<br />Free admission, reservations required";
			hca[2] = sh;
  	break;
	case 21:
			hca[0] = "<h3>11th Annual Chautauqua Tent Show<br /><i>America on Stage</i></h3>";
			hca[1] = "12pm-7pm<br />For more information, please call (302) 645-7670 or (302) 645-1148";
			hca[2] = zwaan;
	break;
	case 22:
  			hca[0] = "<h3>11th Annual Chautauqua Tent Show<br /><i>America on Stage</i></h3>";
			hca[1] = "2pm-7pm<br />For more information, please call (302) 645-7670 or (302) 645-1148";
			hca[2] = zwaan;
  	break;
	case 23:
			hca[0] = "<h3>11th Annual Chautauqua Tent Show<br /><i>America on Stage</i></h3>";
			hca[1] = "Zwaanendael Museum &amp; Stango Park<br />2pm-7pm<br />For more information, please call (302) 645-7670 or (302) 645-1148";
			hca[2] = zwaan;
  	break;
	case 24:
			hca[0] = "<h3>11th Annual Chautauqua Tent Show<br /><i>America on Stage</i></h3>";
			hca[1] = "2pm-7pm<br />For more information, please call (302) 645-7670 or (302) 645-1148";
			hca[2] = leweshs;
  	break;
	case 25:
			hca[0] = "<h3>11th Annual Chautauqua Tent Show<br /><i>America on Stage</i></h3>";
			hca[1] = "2pm-7pm<br />For more information, please call (302) 645-7670 or (302) 645-1148";
			hca[2] = leweshs;
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

if (month == 7){
	
	switch (day)
	{
	case 4:
  			hca[0] = "<h3>Come Scream for Your Team!</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = jvm;
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}
	
if (month == 8){
	switch (day)
	{
	case 1:
  			hca[0] = "<h3>Cracking the Numbers Code</h3>";
			hca[1] = "11am-3pm<br />Free admission<br />(302) 739-4266 <br />";
			hca[2] = jvm;
						
			hca[3] = "<h3>150th Anniversary Celebration</h3>";
			hca[4] = "Fenwick Island Lighthouse<br />10:00am - 5:00pm";
			hca[5] = fenwick;
  	break;
	case 7:
			hca[0] = "<h3>National Lighthouse Day Celebration</h3>";
			hca[1] = "Fenwick Island Lighthouse<br />10:00am -  5:00pm"
			hca[5] = fenwick;
	break;
	case 29:
  			hca[0] = "<h3>Final Quilt Documentation Day</h3>";
			hca[1] = "Milford Senior Center<br />111 Park Ave., Milford<br />8:30am - 2:30pm";
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}
	
if (month == 9){
	
	switch (day)
	{
	case 5:
  			hca[0] = "<h3>Looking Back at Labor Day</h3>";
			hca[1] = "11am-3pm<br />Free admission";
			hca[2] = jvm;					
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

if (month == 10){
	
	switch (day)
	{
	case 3:
			hca[0] = "<h3>Knots and Nets</h3>";
			hca[1] = "Games, demonstrations, and sea shanties<br />10am-4:30pm<br />Free admission";
			hca[2] = zwaan;
  	break;
	case 31:
  			hca[0] = "<h3>Sailor Legends and Lore</h3>";
			hca[1] = "10am-4:30pm<br />Free admission<br />(302) 645-1148<br /><a href='/news/oct09.shtml?panel=3#Accordion1/' target='_blank'>More Information...</a>";
			hca[2] = zwaan;
  	break;
	case 30:
			hca[0] = "<h3>Ghosts at Hale Byrnes? Maybe...</h3>";
			hca[1] = "An evening of ghost hunting, storytelling, and discussion.<br /><strong>Admission: $15</strong><br /><a href='http://www.halebyrnes.org/ghosts.pdf' target='_blank'>More Information...</a>"
			hca[2] = hale;
	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

if (month == 11){
	
	switch (day)
	{
	case 18:
  			hca[0] = "<h3>Spicy Winter Thyme: Holiday Decorative Dessert Table Opens</h3>";
			hca[1] = "Wed.-Sat. 10am - 3:30pm<br />Free admission<br /><a href='/news/nov09.shtml?panel=4#Accordion1' target='_blank'>More Information...</a>";
			hca[2] = jdp;
  	break;
	case 14:
			hca[0] = "<h3>The War Man</h3>";
			hca[1] = "Program begins at 7:30pm<br />Reservations required, entrance fee is charged.";
			hca[2] = hale;
			
			hca[3] = "<h3>Dutch-American Heritage Day</h3>";
			hca[4] = "10am-4:30pm<br />Free admission<br /><a href='/news/nov09.shtml?panel=3#Accordion1' target='_blank'>More Information...</a>";
			hca[5] = zwaan;
			
  	break;
	case 7:
			hca[0] = "<h3>International Musical Celebration</h3>";
			hca[1] = "9am-4:30pm<br />Free admission<br /><a href='/news/nov09.shtml?panel=2#Accordion1' target='_blank'>More Information...</a>";
			hca[2] = jvm;
	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
			
	updateCal(hca.join(''));
}

if (month == 12 ){
	
	switch (day)
	{
	case 5:
  			hca[0] = "<h3>Buena Vista Holiday Open House</h3>";
			hca[1] = "10am - 4pm<br />Free admission<br />(302) 323-4430<br /><a href='/news/press/bv_openhouse.shtml'>More Information...</a>";
			hca[2] = buena;
			
			hca[3] = "<h3>A Musical Holiday</h3>";
			hca[4] = "First Saturday in the First State event<br />9am-4:30pm<br />Free admission";
			hca[5] = jvm;
			
			hca[6] = "<h3>Tour the Zwaanendael Museum</h3>";
			hca[7] = "10am-4:30pm<br />Free admission<br />Demonstrations and craft activities, held in conjunction with Lewes Holiday House Tour.";
			hca[8] = zwaan;
  	
			hca[9] = "<h3>Hale-Byrnes Annual Winter Open House</h3>";
			hca[10] = "11am-3pm<br />Free admission<br />(302)737-5792";
			hca[11] = hale;
	break;
	case 3:
  			hca[0] = "<h3>Jolly Holly</h3>";
			hca[1] = "6pm-9pm<br />Presented in conjunction with the Lewes Chamber of Commerce's Hospitality Night. The Jolly Holly program will provide visitors with an opportunity to learn about the holly-wreath business in the state that was once the nation's leading holly producer. Additional offerings will include holly decorations created by the Sussex Gardeners, and a wreath-making demonstration by HCA horticulturalist Diane Crom.";
			hca[2] = zwaan;
  	break;
	case 12:
  			hca[0] = "<h3>Spirit of Christmas in New Castle</h3>";
			hca[1] = "10am-4:30pm<br />Free admission<br />Town-wide event featuring tours of historic homes, activities at museums including the New Castle Court House, musical entertainment, and shopping at boutiques along Delaware Street. Festivities conclude at 5:00 p.m. with the annual Christmas tree lighting on the Green.";
			hca[2] = ncch;
  	break;
	default:  	
			hca[0] = "<h3>There are no events are scheduled for this day.</h3>";
	}
	updateCal(hca.join(''));
}

}/*  End of if(year) statement  */ 

//adds the info to the div
function updateCal(displayInfo){
		txtDate1.innerHTML = displayInfo;
}/*  End of updateCal  */

}/*  End of handleSelect  */
}/*  End of calendar init  */


	YAHOO.util.Event.onDOMReady(YAHOO.hca.calendar.init);



