  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()+1;     // integer, 0..11
      var d = calendar.date.getDate();      // integer, 1..31
      // redirect...
	  if (m < 10)
	     m="0"+m.toString();
	  if (d < 10)
	     d="0"+d.toString();
	
	   
	  var redirect_url="http://www.stanleyonbible.com/dd/" + m + "/" + m + d + ".htm";
	  //alert(redirect_url);
      //window.location = "e:blessing/wwwrs/webroot/dd/05/0525.htm";// + y + "/" + m + "/" + d + "/index.php";
	  window.location = redirect_url
          //window.open(redirect_url);
    }
  };

  Calendar.setup(
    {
      flat         : "calendar-container", // ID of the parent element
      flatCallback : dateChanged           // our callback function
    }
  );