function initCalendars() {
	if (document.getElementById('jscal_year_start')) {
		var num_dates = document.getElementById('num_closure_dates').value;

		for (var c=1; c <= num_dates; c ++) {
			Calendar.setup(
				{
					inputType : "selects", 
					year_selectField: "start_year-" + c, //id of year select
					month_selectField: "start_month-" + c, //id of month select
					day_selectField: "start_day-" + c,//id of day select
					range : [document.getElementById('jscal_year_start').value,document.getElementById('jscal_year_end').value],
					ifFormat : "%m %d %Y", // the date format
					button : "calendar_buttonStart-" + c, // ID of the button
					onUpdate : updEnd
				}
			)
			//setup jscalendar for end
			Calendar.setup(
				{
					inputType : "selects", 
					year_selectField: "end_year-" + c, //id of year select
					month_selectField: "end_month-" + c, //id of month select
					day_selectField: "end_day-" + c,//id of day select
					range : [document.getElementById('jscal_year_start').value,document.getElementById('jscal_year_end').value],
					ifFormat : "%m %d %Y", // the date format
					button : "calendar_buttonEnd-" + c // ID of the button
				}
			)
		}
	}
}