    function setupCalendarField(field) {
        Calendar.setup({
            // inputField     :    "customer.employment.payDate1",     // id of the input field
            inputField     :    field,     // id of the input field
            ifFormat       :    "%d/%m/%Y",      // format of the input field
            button         :    field,  // trigger for the calendar (button ID)
            align          :    "Tl",           // alignment (defaults to "Bl")
            daFormat       :    "%A, %B %d, %Y",// format of the displayed date
            singleClick    :    true,
            dateStatusFunc :    function (date) {
	                                var today = new Date();
	                                var ret = false;
	                                if (((date.getTime() - today.getTime()) / 86400000) > 90) {ret=true;}
	                                if (((today.getTime()- date.getTime()) / 86400000) > 1) {ret=true;}
	                                return ret;
                                }
        
        });
    }

    // todayOrLater - boolean false to allow dates in the past
    // dayLimit should be 0 if you don't want a date limit
    // dateFormat should be something like: "%d/%m/%Y"
    function setupCalendarField_formatted(field, dayLimit, todayOrLater, dateFormat) {
    	
        Calendar.setup({
            // inputField     :    "customer.employment.payDate1",     // id of the input field
            inputField     :    field,     // id of the input field
            ifFormat       :    dateFormat,      // format of the input field
            button         :    field,  // trigger for the calendar (button ID)
            align          :    "Tl",           // alignment (defaults to "Bl")
            daFormat       :    "%A, %B %d, %Y",// format of the displayed date
            singleClick    :    true,
            dateStatusFunc :    function (date) {
	                                var today = new Date();
	                                var ret = false;
	                                if (dayLimit > 0) {
	                                	if (((date.getTime() - today.getTime()) / 86400000) > 90) {ret=true;}
	                                }
	                                if (todayOrLater) {
	                                	if (((today.getTime()- date.getTime()) / 86400000) > 1) {ret=true;}
	                                }
	                                return ret;
                                }
        
        });
    }
