// BeginWebWidget YUI_Calendar: yuicalendar3 
(function() { var cn = document.body.className.toString(); if (cn.indexOf('yui-skin-sam') == -1) {document.body.className += " yui-skin-sam";}})();
var inityuicalendar3 = function() { var yuicalendar3 = new YAHOO.widget.Calendar("yuicalendar3");// The following event subscribers demonstrate how to handle  YUI Calendar events, specifically when a date cell is selected and when it is unselected. See: http://developer.yahoo.com/yui/calendar/ for more information on the YUI Calendar's configurations and events. The YUI Calendar API cheatsheet can be found at: http://yuiblog.com/assets/pdf/cheatsheets/calendar.pdf 
//--- begin event subscribers ---//
yuicalendar3.selectEvent.subscribe(selectHandler, yuicalendar3, true); yuicalendar3.deselectEvent.subscribe(deselectHandler, yuicalendar3, true);
//--- end event subscribers ---//
yuicalendar3.render();}
function selectHandler(event, data) {
  // The JavaScript function subscribed to yuicalendar3.  It is called when a date cell is selected. alert(event) will show an event type of "Select". alert(data); // will show the selected date as [year, month, date].
data = "" + data + ""; data1 = new String(data); data1 = data.split(","); var selected_year = data1[0]; var selected_month = data1[1]; var selected_day = data1[2]; data = selected_month + "/" + selected_day + "/" + selected_year; document.getElementById('MasterDetail').style.display = "block"; var sumrow = ds1.findRowsWithColumnValues({"Date" : data}, true); if(sumrow != null){ ds1.setCurrentRow(sumrow.ds_RowID); document.getElementById('MasterDetail').style.display = "block"; document.getElementById('no_data').style.display = "none";} else{document.getElementById('no_data').innerHTML = "There are no events on the selected date."; document.getElementById('no_data').style.display = "block"; document.getElementById('MasterDetail').style.display = "none";}};
function deselectHandler(event, data) {
// The JavaScript function subscribed to yuicalendar3.  It is called when
// a selected date cell is unselected.
};    
// Create the YUI Calendar when the HTML document is usable.
YAHOO.util.Event.onDOMReady(inityuicalendar3);