var arrSpecialDays=new Array(); var arrMonths=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); function setKey(strDateIn) { var strDate=strDateIn if (isNaN(Date.parse(strDate))) { // see if we can fix any invalid chars strDate=strDate.replace(/[^0-9A-Za-z ]/g, " "); } else if (Zapatec.is_opera) { if (typeof strDate == "string") strDate=strDate.replace(/[^0-9A-Za-z ]/g, " "); } if (isNaN(Date.parse(strDate))) { return false; } var d=new Date(strDate) // Make sure TIME is zero. We just want the dates d.setHours(0,0,0,0) return d } function add_SpecialDay(strDate, strDesc) { arrSpecialDays[setKey(strDate)]=strDesc } function dump_SpecialDays() { var strDump="" var i for (i in arrSpecialDays) strDump+= (strDump ? "\n" : "") + i + " is " + arrSpecialDays[i] return strDump } function isSpecialDay(strDate) { return typeof(getSpecialDay(strDate)) != "undefined" } function getSpecialDay(strDate) { return arrSpecialDays[setKey(strDate)] } function dateChanged(calendar) { var strDate=calendar.date; var strSpecialDay=getSpecialDay(strDate); if (strSpecialDay) { window.location.href = "calendar.php?id="+strSpecialDay; } return; } function getDateText(date) { return date.getDate(); } function check_special(strDate) { if (isSpecialDay(strDate)) return "zpCalSpecialDay"; return false; // ALL other dates are enabled // NOTE:return true to disable a specific date } function load_SpecialDays() { add_SpecialDay("03-Jun-2008","8"); add_SpecialDay("27-May-2008","7"); add_SpecialDay("10-Jun-2008","9"); add_SpecialDay("21-Jun-2008","10;13;12"); add_SpecialDay("26-Jul-2008","17"); add_SpecialDay("12-Sep-2008","18;19"); add_SpecialDay("03-Oct-2008","20"); add_SpecialDay("22-Nov-2008","23"); add_SpecialDay("27-Dec-2008","24"); add_SpecialDay("10-Jan-2009","26"); add_SpecialDay("23-Jan-2009","27"); add_SpecialDay("06-Feb-2009","28"); add_SpecialDay("28-Feb-2009","29"); add_SpecialDay("27-Mar-2009","30"); add_SpecialDay("10-Apr-2009","31"); add_SpecialDay("12-Apr-2009","32"); add_SpecialDay("17-Apr-2009","33;34"); add_SpecialDay("29-Aug-2009","35"); }