var caldata =	//	container any name, can use element name
{
	init: function()	// Simply Javascript p59
		{
													// begin ex-inline  code to be 'cored' - NB special_days is maintained inline bract_now.html
						
						  function dateIsSpecial(year, month, day) {	// for special dates
						    var m = SPECIAL_DAYS[month];
						    if (!m) return false;
						    for (var i in m) if (m[i] == day) return true;
						    return false;
						  };
						  
						  function dateChanged(calendar) {
						    // Beware that this function is called even if the end-user only
						    // changed the month/year.  In order to determine if a date was
						    // clicked you can use the dateClicked property of the calendar:
						    if (calendar.dateClicked) {
						      // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
						      var y = calendar.date.getFullYear();
						      var m = calendar.date.getMonth();     // integer, 0..11
						      var d = calendar.date.getDate();      // integer, 1..31
						      // redirect...
						      // window.location = "/" + y + "/" + m + "/" + d + "/index.php";
						      window.location = "bract_now.html#m" + y + m;	// trials = "bract_nowCal.html#" + y + m;
								//  validator: id must begin with alpha; month code updated calendar4core.js 2009 July 26 *** LLG ***
						    }
						  };
						
						  function ourDateStatusFunc(date, y, m, d) {	// for special dates
						    if (dateIsSpecial(y, m, d))
						      return "special";
						    else
						      return false; // other dates are enabled
						      // return true if you want to disable other dates
						  };

						  Calendar.setup(
						    {
						      flat         : "calendar-container", // ID of the parent element
						      flatCallback : dateChanged,           // our callback function
							    dateStatusFunc : ourDateStatusFunc	// for special days (end line above with comma...)
						    }
						  );							// end of ex-inline code, now 'cored' code
					}
			}
Core.start (caldata);			//	Simply Javascript p59
