function isDisabled(date, year, month, day) {
	var y = SPECIAL_DAYS[year];
	if (!y) return true;
	var m = y[month];
	if (!m) return true;
	for (var i in m) if (m[i] == day) return false;
	return true;
}
				
function dateIsSpecial(year, month, day) {
	var y = SPECIAL_DAYS[year];
	if (!y) return false;
	var m = y[month];
	if (!m) return false;
	for (var i in m) if (m[i] == day) return true;
	return false;
}

function ourDateStatusFunc(date, y, m, d) {
	if (dateIsSpecial(y, m, d))
	  return "calendar-special";
	else
	  return false; // other dates are enabled
	  // return true if you want to disable other dates
}

function showFlatCalendar(container_id, date_format, parse_date, dateChangedHandler) {
  var parent = document.getElementById(container_id);
  
  // construct a calendar giving only the "selected" handler.
  var cal = new Calendar(1, null, dateChangedHandler);

  // hide week numbers
  cal.weekNumbers = false;

  // We want some dates to be disabled; see function isDisabled above
  cal.setDisabledHandler(isDisabled);
  cal.setDateFormat(date_format);
  
  //cal.setDateStatusHandler(ourDateStatusFunc);
  // this call must be the last as it might use data initialized above; if
  // we specify a parent, as opposite to the "showCalendar" function above,
  // then we create a flat calendar -- not popup.  Hidden, though, but...
  cal.create(parent);

  // ... we can show it here.
  cal.show();
  
  cal.parseDate(parse_date);
}
