function chef_setuppopupcalendarwidget(yearselect_id, monthselect_id, dayselect_id)
{	
	// Bug fix for Mac Internet Explorer - 
	// pop-up calendar doesn't work on this browser, so don't display it at all, not even the image button.
	if ( /msie 5/i.test(navigator.userAgent) && /mac_/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) )
	{
		return;
	}

	// The image button that the user clicks on to pop up the calendar 
	document.write('<img src="/library/jscalendar/CalendarIcon.gif" alt="" id="chef_calendarbutton'+document.jscalendarcounter+'" style="cursor: pointer;" title="Popup date selector" />');
	  
	// A hidden input field where the selected date value will be stored. 
	document.write('<input type="hidden" name="chef_calendarhiddenfield'+document.jscalendarcounter+'" id="chef_calendarhiddenfield'+document.jscalendarcounter+'" />');
	
	// connect the drop-downs to the calendar, by using an event handler.
	// when the drop-down selection changes, dropdownCallback will update the pop-up calendar.
	var yearselect = document.getElementById(yearselect_id);
	var monthselect = document.getElementById(monthselect_id);
	var dayselect = document.getElementById(dayselect_id);
	yearselect.onchange = dropdownCallback;
	monthselect.onchange = dropdownCallback;
	dayselect.onchange = dropdownCallback;
	dropdownCallback();
		
	var calendarCloseCallback = function(cal) { cal.hide(); };
	
	var inputfield_id = "chef_calendarhiddenfield"+document.jscalendarcounter;
	
	// Call into the jscalendar script library that does setup and 
	// configuration for a new popup calendar instance
	var calendarObj;
	calendarObj = Calendar.setup
	({
	        inputField     :    inputfield_id,     // id of the input field
	        ifFormat       :    "%d-%m-%Y",     // format of the input field (even if hidden, this format will be honored)
	        button         :    "chef_calendarbutton"+document.jscalendarcounter,  // trigger for the calendar (button ID)
	        singleClick    :    true,
	        onUpdate       :    calendarCallback, // Callback function for when date is selected
	        onClose        :    calendarCloseCallback,
	        align          :    "Bl" // specifies the calendar should appear below the button
	});
		 
	// stuff away variables specific to this particular calendar instance so that calendarCallback can get them   
	document.jscalendars[document.jscalendarcounter] = new Array(calendarCloseCallback, yearselect_id, monthselect_id, dayselect_id, inputfield_id );

	// just in case, synchronize the pop-up calendar to the drop-down calendar in a bit
	setTimeout("dropdownCallback();", 500);
	
	// Bug fix for Safari browser
	 var is_safari = /Safari/i.test(navigator.userAgent);
	 if (is_safari) 
	 {
	 	// disable the function that hides form elements underneath the calendar; the function is buggy when run in Safari
	 	Calendar.prototype.hideShowCovered = function() {};
	 }
	
	document.jscalendarcounter++;
}
/**
 * This function does setup for a single popup calendar widget.
 * $yearselect_id  The id attribute of the year selection dropdown list (html SELECT tag)
 * $monthselect_id The id attribute of the month selection dropdown list (html SELECT tag)
 * $dayselect_id   The id attribute of the day selection dropdown list (html SELECT tag)
 */
This function does setup for a single popup calendar widget.
$yearselect_id  The id attribute of the year selection dropdown list (html SELECT tag)
$monthselect_id The id attribute of the month selection dropdown list (html SELECT tag)
$dayselect_id   The id attribute of the day selection dropdown list (html SELECT tag)
This function does setup for a single popup calendar widget . $yearselect_id The id attribute of the year selection dropdown list ( html SELECT tag ) $monthselect_id The id attribute of the month selection dropdown list ( html SELECT tag ) $dayselect_id The id attribute of the day selection dropdown list ( html SELECT tag )
function chef_setuppopupcalendarwidget(yearselect_id, monthselect_id, dayselect_id)
{	
	if ( /msie 5/i.test(navigator.userAgent) && /mac_/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) )
	{
		return;
	}
	document.write('<img src="/library/jscalendar/CalendarIcon.gif" alt="" id="chef_calendarbutton'+document.jscalendarcounter+'" style="cursor: pointer;" title="Popup date selector" />');
	document.write('<input type="hidden" name="chef_calendarhiddenfield'+document.jscalendarcounter+'" id="chef_calendarhiddenfield'+document.jscalendarcounter+'" />');
	var yearselect = document.getElementById(yearselect_id);
	var monthselect = document.getElementById(monthselect_id);
	var dayselect = document.getElementById(dayselect_id);
	yearselect.onchange = dropdownCallback;
	monthselect.onchange = dropdownCallback;
	dayselect.onchange = dropdownCallback;
	dropdownCallback();
	var calendarCloseCallback = function(cal) { cal.hide(); };
	var inputfield_id = "chef_calendarhiddenfield"+document.jscalendarcounter;
	var calendarObj;
	calendarObj = Calendar.setup
	({
	        inputField     :    inputfield_id,     
	        ifFormat       :    "%d-%m-%Y",     
	        button         :    "chef_calendarbutton"+document.jscalendarcounter,  
	        singleClick    :    true,
	        onUpdate       :    calendarCallback, 
	        onClose        :    calendarCloseCallback,
	        align          :    "Bl" 
	});
	document.jscalendars[document.jscalendarcounter] = new Array(calendarCloseCallback, yearselect_id, monthselect_id, dayselect_id, inputfield_id );
	setTimeout("dropdownCallback();", 500);
	 var is_safari = /Safari/i.test(navigator.userAgent);
	 if (is_safari) 
	 {
	 	Calendar.prototype.hideShowCovered = function() {};
	 }
	document.jscalendarcounter++;
}
function chef_setuppopupcalendarwidget ( yearselect_id , monthselect_id , dayselect_id ) { if ( / msie 5 / i . test ( navigator . userAgent ) && / mac_ / i . test ( navigator . userAgent ) && ! / opera / i . test ( navigator . userAgent ) ) { return ; } document . write ( '<img src="/library/jscalendar/CalendarIcon.gif" alt="" id="chef_calendarbutton' + document . jscalendarcounter + '" style="cursor: pointer;" title="Popup date selector" />' ) ; document . write ( '<input type="hidden" name="chef_calendarhiddenfield' + document . jscalendarcounter + '" id="chef_calendarhiddenfield' + document . jscalendarcounter + '" />' ) ; var yearselect = document . getElementById ( yearselect_id ) ; var monthselect = document . getElementById ( monthselect_id ) ; var dayselect = document . getElementById ( dayselect_id ) ; yearselect . onchange = dropdownCallback ; monthselect . onchange = dropdownCallback ; dayselect . onchange = dropdownCallback ; dropdownCallback ( ) ; var calendarCloseCallback = function ( cal ) { cal . hide ( ) ; } ; var inputfield_id = "chef_calendarhiddenfield" + document . jscalendarcounter ; var calendarObj ; calendarObj = Calendar . setup ( { inputField : inputfield_id , ifFormat : "%d-%m-%Y" , button : "chef_calendarbutton" + document . jscalendarcounter , singleClick : true , onUpdate : calendarCallback , onClose : calendarCloseCallback , align : "Bl" } ) ; document . jscalendars [ document . jscalendarcounter ] = new Array ( calendarCloseCallback , yearselect_id , monthselect_id , dayselect_id , inputfield_id ) ; setTimeout ( "dropdownCallback();" , 500 ) ; var is_safari = / Safari / i . test ( navigator . userAgent ) ; if ( is_safari ) { Calendar . prototype . hideShowCovered = function ( ) { } ; } document . jscalendarcounter ++ ; }
This function does setup for a single popup calendar widget.
This function does setup for a single popup calendar widget .
// Bug fix for Mac Internet Explorer -  // pop-up calendar doesn't work on this browser, so don't display it at all, not even the image button. // The image button that the user clicks on to pop up the calendar  // A hidden input field where the selected date value will be stored.  // connect the drop-downs to the calendar, by using an event handler. // when the drop-down selection changes, dropdownCallback will update the pop-up calendar. // Call into the jscalendar script library that does setup and  // configuration for a new popup calendar instance // id of the input field // format of the input field (even if hidden, this format will be honored) // trigger for the calendar (button ID) // Callback function for when date is selected // specifies the calendar should appear below the button // stuff away variables specific to this particular calendar instance so that calendarCallback can get them    // just in case, synchronize the pop-up calendar to the drop-down calendar in a bit // Bug fix for Safari browser // disable the function that hides form elements underneath the calendar; the function is buggy when run in Safari