// SPECIAL DAYS
  var SPECIAL_DAYS = {
    1 : [4, 7, 8, 10, 11, 13, 15, 18, 25, 26  ],
    2 : [6  ]
  };  // END SPECIAL DAYS
  
  function dateIsSpecial(year, month, day) {
    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 = "http://www.exchangeline.com/cgi-bin/ae_blast.cgi?LIVE&t=auction:::" + y + "-" + m + "-" + d + "";
      //document.write("http://www.exchangeline.com/cgi-bin/ae_blast.cgi?LIVE&t=auction:::" + y + "-" + m + "-" + d + "")
    }
  };


  Calendar.setup(
    {
      flat         	: "calendar-container", 	// ID of the parent element
      flatCallback 	: dateChanged,          	// our callback function
      range		: [2007, 2020],			// year range of calendar
      dateStatusFunc 	: function(date, y, m, d) {
                         if (dateIsSpecial(y, m, d)) return "special";
                         else return false; // other dates are enabled
                         // return true if you want to disable other dates
                       }
    }
  );


