/* Script to default the calendar to current month*/

function calendarOfEvents(contextPath)
{
	var currentMonth = (new Date()).getMonth() + 1;
	var calendarMonth;
	switch(currentMonth){
		case 1:
			calendarMonth = 'jan';
			break;
		case 2:
			calendarMonth = 'feb';
			break;
		case 3:
			calendarMonth = 'mar';
			break;
		case 4:
			calendarMonth = 'apr';
			break;
		case 5:
			calendarMonth = 'may';
			break;
		case 6:
			calendarMonth = 'jun';
			break;
		case 7:
			calendarMonth = 'jul';
			break;
		case 8:
			calendarMonth = 'aug';
			break;
		case 9:
			calendarMonth = 'sep';
			break;
		case 10:
			calendarMonth = 'oct';
			break;
		case 11:
			calendarMonth = 'nov';
			break;
		case 12:
			calendarMonth = 'dec';
			break;
	}
	window.open(contextPath+'/calendar-of-events/calendar-of-events-'+calendarMonth+'.html','_self');
}
