Namespace.Register("WCL.Link"); WCL.Link.Calendar = { monthNames : new Array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"), SetTitle : function(format, year, month) { WCL.General.SetTitle(WCL.General.format(format, year, WCL.Link.Calendar.monthNames[parseInt(month, 10)])); }, CalendarClick : function(year, month) { if(year && month) { WCL.AJAX.UpdateContentDiv(WCL.General.format("calendar/events/walks/{0}/{1}.html.php", year, month), true); WCL.Link.Calendar.SetTitle("Walks & Charity Events - {1} {0}", year, month); } else { WCL.AJAX.UpdateContentDiv("calendar/events.html.php", true); } return false; }, CalendarMenuClick : function(year, month) { WCL.AJAX.UpdateRightContentDiv(WCL.General.format("calendar/events/walks/{0}/{1}_menu.html.php", year, month), true); WCL.Link.Calendar.SetTitle("Walks & Charity Events - {1} {0}", year, month); return false; }, SocialEventsClick : function(year, month) { if(year && month) { WCL.AJAX.UpdateContentDiv(WCL.General.format("calendar/events/social/{0}/{1}.html.php", year, month), true); WCL.Link.Calendar.SetTitle("Social Events - {1} {0}", year, month); } else { WCL.AJAX.UpdateContentDiv("calendar/socialEvents.html.php", true); } return false; }, SocialEventsMenuClick : function(year, month) { WCL.AJAX.UpdateRightContentDiv(WCL.General.format("calendar/events/social/{0}/{1}_menu.html.php", year, month), true); WCL.Link.Calendar.SetTitle("Social Events - {1} {0}", year, month); return false; }, SubmitNewEventClick : function() { WCL.AJAX.UpdateContentDiv("calendar/submitEvent.html.php", true); WCL.General.SetTitle("Submit New Event"); return false; } }