  var yDate = new Date();
  
  var DAYS_OF_WEEK = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
  
  var HOLIDAY_DAYS_2010 = {
    0 : [ 1, 2, 3, 4, 5 ],
    2 : [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 ],
    6 : [ 1, 2, 3, 4, 5 ],
    8 : [ 2, 3, 4, 5, 6, 7 ],
    10: [ 22, 23, 24, 25, 26, 27, 28, 29 ],
    11: [ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ]
  };

  var HOLIDAY_DAYS_2011 = {
  };

  var CLOSED_DAYS_2010 = {
    0 : [ 3, 10, 17, 24, 31 ],
    1 : [ 7, 14, 21, 28 ],
    2 : [ 7, 14, 21, 28 ],
    3 : [ 4, 11, 18, 25 ],
    4 : [ 2, 9, 16, 23, 30, 31 ],
    5 : [ 6, 13, 20, 27 ],
    6 : [ 4, 11, 18, 25 ],
    7 : [ 1, 8, 15, 22, 29 ],
    8 : [ 5, 6, 12, 19, 26 ],
    9 : [ 3, 10, 17, 24, 31 ],
    10 : [ 7, 14, 21, 25, 28 ],
    11 : [ 5, 12, 19, 25, 26 ]
  };

  var CLOSED_DAYS_2011 = {
    0 : [ 1 ]
  };

  function dateIsClosed(year, month, day)
  {
    switch (year)
    {
      case 2010:
        var monthDays = CLOSED_DAYS_2010[month];
        break;
      case 2011:
        var monthDays = CLOSED_DAYS_2011[month];
        break;
    }
    
    if (!monthDays) return false;
    for (var i in monthDays) if (monthDays[i] == day) return true;
    return false;
  }
  
  function dateIsHoliday(year, month, day)
  {
    switch (year)
    {
      case 2010:
        var monthDays = HOLIDAY_DAYS_2010[month];
        break;
      case 2011:
        var monthDays = HOLIDAY_DAYS_2011[month];
        break;
    }
    
    if (!monthDays) return false;
    for (var i in monthDays) if (monthDays[i] == day) return true;
    return false;
  }

  function dateIsPeak(monDate)
  {
    switch (DAYS_OF_WEEK[monDate.getDay()])
    {
      case "Friday":
      case "Saturday":
      case "Sunday":
        return true;
        break;
      default:
        return false;
        break;
    }
  }
  
  function ourDateStatusFunc(date, y, m, d)
  {
    yDate.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
    
    if (date < yDate)
    {
      return "disabled past";
    }
    else
    {
      if (dateIsClosed(y, m, d))
      {
        if (dateIsHoliday(y, m, d))
        {
          return "disabled holiday";
        }
        else
        {
          if (dateIsPeak(date))
          {
            return "disabled peak";
          }
          else
          {
            return "disabled";
          }
        }
      }
      else
      {
        if (dateIsHoliday(y, m, d))
        {
          return "holiday";
        }
        else
        {
          if (dateIsPeak(date))
          {
            return "peak";
          }
          else
          {
            return false; // return false to leave the date enabled
          }
        }
      }
    }
  }