﻿(function($) { $.extend($.ui, { datepicker: { version: "1.7.2"} }); var bd = 'datepicker'; function Datepicker() { this.debug = false; this._curInst = null; this._keyEvent = false; this._disabledInputs = []; this._datepickerShowing = false; this._inDialog = false; this._mainDivId = 'ui-datepicker-div'; this._inlineClass = 'ui-datepicker-inline'; this._appendClass = 'ui-datepicker-append'; this._triggerClass = 'ui-datepicker-trigger'; this._dialogClass = 'ui-datepicker-dialog'; this._disableClass = 'ui-datepicker-disabled'; this._unselectableClass = 'ui-datepicker-unselectable'; this._currentClass = 'ui-datepicker-current-day'; this._dayOverClass = 'ui-datepicker-days-cell-over'; this.regional = []; this.regional[''] = { closeText: 'Done', prevText: 'Prev', nextText: 'Next', currentText: 'Today', monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], dateFormat: 'mm/dd/yy', firstDay: 0, isRTL: false }; this._defaults = { showOn: 'focus', showAnim: 'show', showOptions: {}, defaultDate: null, appendText: '', buttonText: '...', buttonImage: '', buttonImageOnly: false, hideIfNoPrevNext: false, navigationAsDateFormat: false, gotoCurrent: false, changeMonth: false, changeYear: false, showMonthAfterYear: false, yearRange: '-10:+10', showOtherMonths: false, calculateWeek: this.iso8601Week, shortYearCutoff: '+10', minDate: null, maxDate: null, duration: 'normal', beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: '', altFormat: '', constrainInput: true, showButtonPanel: false }; $.extend(this._defaults, this.regional['']); this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>') } $.extend(Datepicker.prototype, { markerClassName: 'hasDatepicker', log: function() { if (this.debug) console.log.apply('', arguments) }, setDefaults: function(a) { extendRemove(this._defaults, a || {}); return this }, _attachDatepicker: function(a, b) { var c = null; for (var d in this._defaults) { var e = a.getAttribute('date:' + d); if (e) { c = c || {}; try { c[d] = eval(e) } catch (err) { c[d] = e } } } var f = a.nodeName.toLowerCase(); var g = (f == 'div' || f == 'span'); if (!a.id) a.id = 'dp' + (++this.uuid); var h = this._newInst($(a), g); h.settings = $.extend({}, b || {}, c || {}); if (f == 'input') { this._connectDatepicker(a, h) } else if (g) { this._inlineDatepicker(a, h) } }, _newInst: function(a, b) { var c = a[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); return { id: c, input: a, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: b, dpDiv: (!b ? this.dpDiv : $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))} }, _connectDatepicker: function(d, e) { var f = $(d); e.append = $([]); e.trigger = $([]); if (f.hasClass(this.markerClassName)) return; var g = this._get(e, 'appendText'); var h = this._get(e, 'isRTL'); if (g) { e.append = $('<span class="' + this._appendClass + '">' + g + '</span>'); f[h ? 'before' : 'after'](e.append) } var i = this._get(e, 'showOn'); if (i == 'focus' || i == 'both') f.focus(this._showDatepicker); if (i == 'button' || i == 'both') { var j = this._get(e, 'buttonText'); var k = this._get(e, 'buttonImage'); e.trigger = $(this._get(e, 'buttonImageOnly') ? $('<img/>').addClass(this._triggerClass).attr({ src: k, alt: j, title: j }) : $('<button type="button"></button>').addClass(this._triggerClass).html(k == '' ? j : $('<img/>').attr({ src: k, alt: j, title: j }))); f[h ? 'before' : 'after'](e.trigger); e.trigger.click(function() { if ($.datepicker._datepickerShowing && $.datepicker._lastInput == d) $.datepicker._hideDatepicker(); else $.datepicker._showDatepicker(d); return false }) } f.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker", function(a, b, c) { e.settings[b] = c }).bind("getData.datepicker", function(a, b) { return this._get(e, b) }); $.data(d, bd, e) }, _inlineDatepicker: function(d, e) { var f = $(d); if (f.hasClass(this.markerClassName)) return; f.addClass(this.markerClassName).append(e.dpDiv).bind("setData.datepicker", function(a, b, c) { e.settings[b] = c }).bind("getData.datepicker", function(a, b) { return this._get(e, b) }); $.data(d, bd, e); this._setDate(e, this._getDefaultDate(e)); this._updateDatepicker(e); this._updateAlternate(e) }, _dialogDatepicker: function(a, b, c, d, e) { var f = this._dialogInst; if (!f) { var g = 'dp' + (++this.uuid); this._dialogInput = $('<input type="text" id="' + g + '" size="1" style="position: absolute; top: -100px;"/>'); this._dialogInput.keydown(this._doKeyDown); $('body').append(this._dialogInput); f = this._dialogInst = this._newInst(this._dialogInput, false); f.settings = {}; $.data(this._dialogInput[0], bd, f) } extendRemove(f.settings, d || {}); this._dialogInput.val(b); this._pos = (e ? (e.length ? e : [e.pageX, e.pageY]) : null); if (!this._pos) { var h = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var i = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; var j = document.documentElement.scrollLeft || document.body.scrollLeft; var k = document.documentElement.scrollTop || document.body.scrollTop; this._pos = [(h / 2) - 100 + j, (i / 2) - 150 + k] } this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px'); f.settings.onSelect = c; this._inDialog = true; this.dpDiv.addClass(this._dialogClass); this._showDatepicker(this._dialogInput[0]); if ($.blockUI) $.blockUI(this.dpDiv); $.data(this._dialogInput[0], bd, f); return this }, _destroyDatepicker: function(a) { var b = $(a); var c = $.data(a, bd); if (!b.hasClass(this.markerClassName)) { return } var d = a.nodeName.toLowerCase(); $.removeData(a, bd); if (d == 'input') { c.append.remove(); c.trigger.remove(); b.removeClass(this.markerClassName).unbind('focus', this._showDatepicker).unbind('keydown', this._doKeyDown).unbind('keypress', this._doKeyPress) } else if (d == 'div' || d == 'span') b.removeClass(this.markerClassName).empty() }, _enableDatepicker: function(b) { var c = $(b); var d = $.data(b, bd); if (!c.hasClass(this.markerClassName)) { return } var e = b.nodeName.toLowerCase(); if (e == 'input') { b.disabled = false; d.trigger.filter('button').each(function() { this.disabled = false }).end().filter('img').css({ opacity: '1.0', cursor: '' }) } else if (e == 'div' || e == 'span') { var f = c.children('.' + this._inlineClass); f.children().removeClass('ui-state-disabled') } this._disabledInputs = $.map(this._disabledInputs, function(a) { return (a == b ? null : a) }) }, _disableDatepicker: function(b) { var c = $(b); var d = $.data(b, bd); if (!c.hasClass(this.markerClassName)) { return } var e = b.nodeName.toLowerCase(); if (e == 'input') { b.disabled = true; d.trigger.filter('button').each(function() { this.disabled = true }).end().filter('img').css({ opacity: '0.5', cursor: 'default' }) } else if (e == 'div' || e == 'span') { var f = c.children('.' + this._inlineClass); f.children().addClass('ui-state-disabled') } this._disabledInputs = $.map(this._disabledInputs, function(a) { return (a == b ? null : a) }); this._disabledInputs[this._disabledInputs.length] = b }, _isDisabledDatepicker: function(a) { if (!a) { return false } for (var i = 0; i < this._disabledInputs.length; i++) { if (this._disabledInputs[i] == a) return true } return false }, _getInst: function(a) { try { return $.data(a, bd) } catch (err) { throw 'Missing instance data for this datepicker'; } }, _optionDatepicker: function(a, b, c) { var d = this._getInst(a); if (arguments.length == 2 && typeof b == 'string') { return (b == 'defaults' ? $.extend({}, $.datepicker._defaults) : (d ? (b == 'all' ? $.extend({}, d.settings) : this._get(d, b)) : null)) } var e = b || {}; if (typeof b == 'string') { e = {}; e[b] = c } if (d) { if (this._curInst == d) { this._hideDatepicker(null) } var f = this._getDateDatepicker(a); extendRemove(d.settings, e); this._setDateDatepicker(a, f); this._updateDatepicker(d) } }, _changeDatepicker: function(a, b, c) { this._optionDatepicker(a, b, c) }, _refreshDatepicker: function(a) { var b = this._getInst(a); if (b) { this._updateDatepicker(b) } }, _setDateDatepicker: function(a, b, c) { var d = this._getInst(a); if (d) { this._setDate(d, b, c); this._updateDatepicker(d); this._updateAlternate(d) } }, _getDateDatepicker: function(a) { var b = this._getInst(a); if (b && !b.inline) this._setDateFromField(b); return (b ? this._getDate(b) : null) }, _doKeyDown: function(a) { var b = $.datepicker._getInst(a.target); var c = true; var d = b.dpDiv.is('.ui-datepicker-rtl'); b._keyEvent = true; if ($.datepicker._datepickerShowing) switch (a.keyCode) { case 9: $.datepicker._hideDatepicker(null, ''); break; case 13: var e = $('td.' + $.datepicker._dayOverClass + ', td.' + $.datepicker._currentClass, b.dpDiv); if (e[0]) $.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, e[0]); else $.datepicker._hideDatepicker(null, $.datepicker._get(b, 'duration')); return false; break; case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(b, 'duration')); break; case 33: $.datepicker._adjustDate(a.target, (a.ctrlKey ? -$.datepicker._get(b, 'stepBigMonths') : -$.datepicker._get(b, 'stepMonths')), 'M'); break; case 34: $.datepicker._adjustDate(a.target, (a.ctrlKey ? +$.datepicker._get(b, 'stepBigMonths') : +$.datepicker._get(b, 'stepMonths')), 'M'); break; case 35: if (a.ctrlKey || a.metaKey) $.datepicker._clearDate(a.target); c = a.ctrlKey || a.metaKey; break; case 36: if (a.ctrlKey || a.metaKey) $.datepicker._gotoToday(a.target); c = a.ctrlKey || a.metaKey; break; case 37: if (a.ctrlKey || a.metaKey) $.datepicker._adjustDate(a.target, (d ? +1 : -1), 'D'); c = a.ctrlKey || a.metaKey; if (a.originalEvent.altKey) $.datepicker._adjustDate(a.target, (a.ctrlKey ? -$.datepicker._get(b, 'stepBigMonths') : -$.datepicker._get(b, 'stepMonths')), 'M'); break; case 38: if (a.ctrlKey || a.metaKey) $.datepicker._adjustDate(a.target, -7, 'D'); c = a.ctrlKey || a.metaKey; break; case 39: if (a.ctrlKey || a.metaKey) $.datepicker._adjustDate(a.target, (d ? -1 : +1), 'D'); c = a.ctrlKey || a.metaKey; if (a.originalEvent.altKey) $.datepicker._adjustDate(a.target, (a.ctrlKey ? +$.datepicker._get(b, 'stepBigMonths') : +$.datepicker._get(b, 'stepMonths')), 'M'); break; case 40: if (a.ctrlKey || a.metaKey) $.datepicker._adjustDate(a.target, +7, 'D'); c = a.ctrlKey || a.metaKey; break; default: c = false } else if (a.keyCode == 36 && a.ctrlKey) $.datepicker._showDatepicker(this); else { c = false } if (c) { a.preventDefault(); a.stopPropagation() } }, _doKeyPress: function(a) { var b = $.datepicker._getInst(a.target); if ($.datepicker._get(b, 'constrainInput')) { var c = $.datepicker._possibleChars($.datepicker._get(b, 'dateFormat')); var d = String.fromCharCode(a.charCode == undefined ? a.keyCode : a.charCode); return a.ctrlKey || (d < ' ' || !c || c.indexOf(d) > -1) } }, _showDatepicker: function(a) { a = a.target || a; if (a.nodeName.toLowerCase() != 'input') a = $('input', a.parentNode)[0]; if ($.datepicker._isDisabledDatepicker(a) || $.datepicker._lastInput == a) return; var b = $.datepicker._getInst(a); var c = $.datepicker._get(b, 'beforeShow'); extendRemove(b.settings, (c ? c.apply(a, [a, b]) : {})); $.datepicker._hideDatepicker(null, ''); $.datepicker._lastInput = a; $.datepicker._setDateFromField(b); if ($.datepicker._inDialog) a.value = ''; if (!$.datepicker._pos) { $.datepicker._pos = $.datepicker._findPos(a); $.datepicker._pos[1] += a.offsetHeight } var d = false; $(a).parents().each(function() { d |= $(this).css('position') == 'fixed'; return !d }); if (d && $.browser.opera) { $.datepicker._pos[0] -= document.documentElement.scrollLeft; $.datepicker._pos[1] -= document.documentElement.scrollTop } var e = { left: $.datepicker._pos[0], top: $.datepicker._pos[1] }; $.datepicker._pos = null; b.rangeStart = null; b.dpDiv.css({ position: 'absolute', display: 'block', top: '-1000px' }); $.datepicker._updateDatepicker(b); e = $.datepicker._checkOffset(b, e, d); b.dpDiv.css({ position: ($.datepicker._inDialog && $.blockUI ? 'static' : (d ? 'fixed' : 'absolute')), display: 'none', left: e.left + 'px', top: e.top + 'px' }); if (!b.inline) { var f = $.datepicker._get(b, 'showAnim') || 'show'; var g = $.datepicker._get(b, 'duration'); var h = function() { $.datepicker._datepickerShowing = true; if ($.browser.msie && parseInt($.browser.version, 10) < 7) $('iframe.ui-datepicker-cover').css({ width: b.dpDiv.width() + 4, height: b.dpDiv.height() + 4 }) }; if ($.effects && $.effects[f]) b.dpDiv.show(f, $.datepicker._get(b, 'showOptions'), g, h); else b.dpDiv[f](g, h); if (g == '') h(); if (b.input[0].type != 'hidden') b.input[0].focus(); $.datepicker._curInst = b } }, _updateDatepicker: function(a) { var b = { width: a.dpDiv.width() + 4, height: a.dpDiv.height() + 4 }; var c = this; a.dpDiv.empty().append(this._generateHTML(a)).find('iframe.ui-datepicker-cover').css({ width: b.width, height: b.height }).end().find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a').bind('mouseout', function() { $(this).removeClass('ui-state-hover'); if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover'); if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover') }).bind('mouseover', function() { if (!c._isDisabledDatepicker(a.inline ? a.dpDiv.parent()[0] : a.input[0])) { $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); $(this).addClass('ui-state-hover'); if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover'); if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover') } }).end().find('.' + this._dayOverClass + ' a').trigger('mouseover').end(); var d = this._getNumberOfMonths(a); var e = d[1]; var f = 17; if (e > 1) { a.dpDiv.addClass('ui-datepicker-multi-' + e).css('width', (f * e) + 'em') } else { a.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('') } a.dpDiv[(d[0] != 1 || d[1] != 1 ? 'add' : 'remove') + 'Class']('ui-datepicker-multi'); a.dpDiv[(this._get(a, 'isRTL') ? 'add' : 'remove') + 'Class']('ui-datepicker-rtl'); if (a.input && a.input[0].type != 'hidden' && a == $.datepicker._curInst) $(a.input[0]).focus() }, _checkOffset: function(a, b, c) { var d = a.dpDiv.outerWidth(); var e = a.dpDiv.outerHeight(); var f = a.input ? a.input.outerWidth() : 0; var g = a.input ? a.input.outerHeight() : 0; var h = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft(); var i = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop(); b.left -= (this._get(a, 'isRTL') ? (d - f) : 0); b.left -= (c && b.left == a.input.offset().left) ? $(document).scrollLeft() : 0; b.top -= (c && b.top == (a.input.offset().top + g)) ? $(document).scrollTop() : 0; b.left -= (b.left + d > h && h > d) ? Math.abs(b.left + d - h) : 0; b.top -= (b.top + e > i && i > e) ? Math.abs(b.top + e + g * 2 - i) : 0; return b }, _findPos: function(a) { while (a && (a.type == 'hidden' || a.nodeType != 1)) { a = a.nextSibling } var b = $(a).offset(); return [b.left, b.top] }, _hideDatepicker: function(a, b) { var c = this._curInst; if (!c || (a && c != $.data(a, bd))) return; if (c.stayOpen) this._selectDate('#' + c.id, this._formatDate(c, c.currentDay, c.currentMonth, c.currentYear)); c.stayOpen = false; if (this._datepickerShowing) { b = (b != null ? b : this._get(c, 'duration')); var d = this._get(c, 'showAnim'); var e = function() { $.datepicker._tidyDialog(c) }; if (b != '' && $.effects && $.effects[d]) c.dpDiv.hide(d, $.datepicker._get(c, 'showOptions'), b, e); else c.dpDiv[(b == '' ? 'hide' : (d == 'slideDown' ? 'slideUp' : (d == 'fadeIn' ? 'fadeOut' : 'hide')))](b, e); if (b == '') this._tidyDialog(c); var f = this._get(c, 'onClose'); if (f) f.apply((c.input ? c.input[0] : null), [(c.input ? c.input.val() : ''), c]); this._datepickerShowing = false; this._lastInput = null; if (this._inDialog) { this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' }); if ($.blockUI) { $.unblockUI(); $('body').append(this.dpDiv) } } this._inDialog = false } this._curInst = null }, _tidyDialog: function(a) { a.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar') }, _checkExternalClick: function(a) { if (!$.datepicker._curInst) return; var b = $(a.target); if ((b.parents('#' + $.datepicker._mainDivId).length == 0) && !b.hasClass($.datepicker.markerClassName) && !b.hasClass($.datepicker._triggerClass) && $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI)) $.datepicker._hideDatepicker(null, '') }, _adjustDate: function(a, b, c) { var d = $(a); var e = this._getInst(d[0]); if (this._isDisabledDatepicker(d[0])) { return } this._adjustInstDate(e, b + (c == 'M' ? this._get(e, 'showCurrentAtPos') : 0), c); this._updateDatepicker(e) }, _gotoToday: function(a) { var b = $(a); var c = this._getInst(b[0]); if (this._get(c, 'gotoCurrent') && c.currentDay) { c.selectedDay = c.currentDay; c.drawMonth = c.selectedMonth = c.currentMonth; c.drawYear = c.selectedYear = c.currentYear } else { var d = new Date(); c.selectedDay = d.getDate(); c.drawMonth = c.selectedMonth = d.getMonth(); c.drawYear = c.selectedYear = d.getFullYear() } this._notifyChange(c); this._adjustDate(b) }, _selectMonthYear: function(a, b, c) { var d = $(a); var e = this._getInst(d[0]); e._selectingMonthYear = false; e['selected' + (c == 'M' ? 'Month' : 'Year')] = e['draw' + (c == 'M' ? 'Month' : 'Year')] = parseInt(b.options[b.selectedIndex].value, 10); this._notifyChange(e); this._adjustDate(d) }, _clickMonthYear: function(a) { var b = $(a); var c = this._getInst(b[0]); if (c.input && c._selectingMonthYear && !$.browser.msie) c.input[0].focus(); c._selectingMonthYear = !c._selectingMonthYear }, _selectDay: function(a, b, c, d) { var e = $(a); if ($(d).hasClass(this._unselectableClass) || this._isDisabledDatepicker(e[0])) { return } var f = this._getInst(e[0]); f.selectedDay = f.currentDay = $('a', d).html(); f.selectedMonth = f.currentMonth = b; f.selectedYear = f.currentYear = c; if (f.stayOpen) { f.endDay = f.endMonth = f.endYear = null } this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear)); if (f.stayOpen) { f.rangeStart = this._daylightSavingAdjust(new Date(f.currentYear, f.currentMonth, f.currentDay)); this._updateDatepicker(f) } }, _clearDate: function(a) { var b = $(a); var c = this._getInst(b[0]); c.stayOpen = false; c.endDay = c.endMonth = c.endYear = c.rangeStart = null; this._selectDate(b, '') }, _selectDate: function(a, b) { var c = $(a); var d = this._getInst(c[0]); b = (b != null ? b : this._formatDate(d)); if (d.input) d.input.val(b); this._updateAlternate(d); var e = this._get(d, 'onSelect'); if (e) e.apply((d.input ? d.input[0] : null), [b, d]); else if (d.input) d.input.trigger('change'); if (d.inline) this._updateDatepicker(d); else if (!d.stayOpen) { this._hideDatepicker(null, this._get(d, 'duration')); this._lastInput = d.input[0]; if (typeof (d.input[0]) != 'object') d.input[0].focus(); this._lastInput = null } }, _updateAlternate: function(a) { var b = this._get(a, 'altField'); if (b) { var c = this._get(a, 'altFormat') || this._get(a, 'dateFormat'); var d = this._getDate(a); dateStr = this.formatDate(c, d, this._getFormatConfig(a)); $(b).each(function() { $(this).val(dateStr) }) } }, noWeekends: function(a) { var b = a.getDay(); return [(b > 0 && b < 6), ''] }, iso8601Week: function(a) { var b = new Date(a.getFullYear(), a.getMonth(), a.getDate()); var c = new Date(b.getFullYear(), 1 - 1, 4); var d = c.getDay() || 7; c.setDate(c.getDate() + 1 - d); if (d < 4 && b < c) { b.setDate(b.getDate() - 3); return $.datepicker.iso8601Week(b) } else if (b > new Date(b.getFullYear(), 12 - 1, 28)) { d = new Date(b.getFullYear() + 1, 1 - 1, 4).getDay() || 7; if (d > 4 && (b.getDay() || 7) < d - 3) { return 1 } } return Math.floor(((b - c) / 86400000) / 7) + 1 }, parseDate: function(h, k, l) { if (h == null || k == null) throw 'Invalid arguments'; k = (typeof k == 'object' ? k.toString() : k + ''); if (k == '') return null; var m = (l ? l.shortYearCutoff : null) || this._defaults.shortYearCutoff; var n = (l ? l.dayNamesShort : null) || this._defaults.dayNamesShort; var o = (l ? l.dayNames : null) || this._defaults.dayNames; var p = (l ? l.monthNamesShort : null) || this._defaults.monthNamesShort; var q = (l ? l.monthNames : null) || this._defaults.monthNames; var r = -1; var s = -1; var t = -1; var u = -1; var v = false; var w = function(a) { var b = (B + 1 < h.length && h.charAt(B + 1) == a); if (b) B++; return b }; var x = function(a) { w(a); var b = (a == '@' ? 14 : (a == 'y' ? 4 : (a == 'o' ? 3 : 2))); var c = b; var d = 0; while (c > 0 && A < k.length && k.charAt(A) >= '0' && k.charAt(A) <= '9') { d = d * 10 + parseInt(k.charAt(A++), 10); c-- } if (c == b) throw 'Missing number at position ' + A; return d }; var y = function(a, b, c) { var d = (w(a) ? c : b); var e = 0; for (var j = 0; j < d.length; j++) e = Math.max(e, d[j].length); var f = ''; var g = A; while (e > 0 && A < k.length) { f += k.charAt(A++); for (var i = 0; i < d.length; i++) if (f == d[i]) return i + 1; e-- } throw 'Unknown name at position ' + g; }; var z = function() { if (k.charAt(A) != h.charAt(B)) throw 'Unexpected literal at position ' + A; A++ }; var A = 0; for (var B = 0; B < h.length; B++) { if (v) if (h.charAt(B) == "'" && !w("'")) v = false; else z(); else switch (h.charAt(B)) { case 'd': t = x('d'); break; case 'D': y('D', n, o); break; case 'o': u = x('o'); break; case 'm': s = x('m'); break; case 'M': s = y('M', p, q); break; case 'y': r = x('y'); break; case '@': var C = new Date(x('@')); r = C.getFullYear(); s = C.getMonth() + 1; t = C.getDate(); break; case "'": if (w("'")) z(); else v = true; break; default: z() } } if (r == -1) r = new Date().getFullYear(); else if (r < 100) r += new Date().getFullYear() - new Date().getFullYear() % 100 + (r <= m ? 0 : -100); if (u > -1) { s = 1; t = u; do { var D = this._getDaysInMonth(r, s - 1); if (t <= D) break; s++; t -= D } while (true) } var C = this._daylightSavingAdjust(new Date(r, s - 1, t)); if (C.getFullYear() != r || C.getMonth() + 1 != s || C.getDate() != t) throw 'Invalid date'; return C }, ATOM: 'yy-mm-dd', COOKIE: 'D, dd M yy', ISO_8601: 'yy-mm-dd', RFC_822: 'D, d M y', RFC_850: 'DD, dd-M-y', RFC_1036: 'D, d M y', RFC_1123: 'D, d M yy', RFC_2822: 'D, d M yy', RSS: 'D, d M y', TIMESTAMP: '@', W3C: 'yy-mm-dd', formatDate: function(e, f, g) { if (!f) return ''; var h = (g ? g.dayNamesShort : null) || this._defaults.dayNamesShort; var i = (g ? g.dayNames : null) || this._defaults.dayNames; var j = (g ? g.monthNamesShort : null) || this._defaults.monthNamesShort; var k = (g ? g.monthNames : null) || this._defaults.monthNames; var l = function(a) { var b = (r + 1 < e.length && e.charAt(r + 1) == a); if (b) r++; return b }; var n = function(a, b, c) { var d = '' + b; if (l(a)) while (d.length < c) d = '0' + d; return d }; var o = function(a, b, c, d) { return (l(a) ? d[b] : c[b]) }; var p = ''; var q = false; if (f) for (var r = 0; r < e.length; r++) { if (q) if (e.charAt(r) == "'" && !l("'")) q = false; else p += e.charAt(r); else switch (e.charAt(r)) { case 'd': p += n('d', f.getDate(), 2); break; case 'D': p += o('D', f.getDay(), h, i); break; case 'o': var s = f.getDate(); for (var m = f.getMonth() - 1; m >= 0; m--) s += this._getDaysInMonth(f.getFullYear(), m); p += n('o', s, 3); break; case 'm': p += n('m', f.getMonth() + 1, 2); break; case 'M': p += o('M', f.getMonth(), j, k); break; case 'y': p += (l('y') ? f.getFullYear() : (f.getYear() % 100 < 10 ? '0' : '') + f.getYear() % 100); break; case '@': p += f.getTime(); break; case "'": if (l("'")) p += "'"; else q = true; break; default: p += e.charAt(r) } } return p }, _possibleChars: function(a) { var b = ''; var c = false; for (var d = 0; d < a.length; d++) if (c) if (a.charAt(d) == "'" && !lookAhead("'")) c = false; else b += a.charAt(d); else switch (a.charAt(d)) { case 'd': case 'm': case 'y': case '@': b += '0123456789'; break; case 'D': case 'M': return null; case "'": if (lookAhead("'")) b += "'"; else c = true; break; default: b += a.charAt(d) } return b }, _get: function(a, b) { return a.settings[b] !== undefined ? a.settings[b] : this._defaults[b] }, _setDateFromField: function(a) { var b = this._get(a, 'dateFormat'); var c = a.input ? a.input.val() : null; a.endDay = a.endMonth = a.endYear = null; var d = defaultDate = this._getDefaultDate(a); var e = this._getFormatConfig(a); try { d = this.parseDate(b, c, e) || defaultDate } catch (event) { this.log(event); d = defaultDate } a.selectedDay = d.getDate(); a.drawMonth = a.selectedMonth = d.getMonth(); a.drawYear = a.selectedYear = d.getFullYear(); a.currentDay = (c ? d.getDate() : 0); a.currentMonth = (c ? d.getMonth() : 0); a.currentYear = (c ? d.getFullYear() : 0); this._adjustInstDate(a) }, _getDefaultDate: function(a) { var b = this._determineDate(this._get(a, 'defaultDate'), new Date()); var c = this._getMinMaxDate(a, 'min', true); var d = this._getMinMaxDate(a, 'max'); b = (c && b < c ? c : b); b = (d && b > d ? d : b); return b }, _determineDate: function(i, j) { var k = function(a) { var b = new Date(); b.setDate(b.getDate() + a); return b }; var l = function(a, b) { var c = new Date(); var d = c.getFullYear(); var e = c.getMonth(); var f = c.getDate(); var g = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g; var h = g.exec(a); while (h) { switch (h[2] || 'd') { case 'd': case 'D': f += parseInt(h[1], 10); break; case 'w': case 'W': f += parseInt(h[1], 10) * 7; break; case 'm': case 'M': e += parseInt(h[1], 10); f = Math.min(f, b(d, e)); break; case 'y': case 'Y': d += parseInt(h[1], 10); f = Math.min(f, b(d, e)); break } h = g.exec(a) } return new Date(d, e, f) }; i = (i == null ? j : (typeof i == 'string' ? l(i, this._getDaysInMonth) : (typeof i == 'number' ? (isNaN(i) ? j : k(i)) : i))); i = (i && i.toString() == 'Invalid Date' ? j : i); if (i) { i.setHours(0); i.setMinutes(0); i.setSeconds(0); i.setMilliseconds(0) } return this._daylightSavingAdjust(i) }, _daylightSavingAdjust: function(a) { if (!a) return null; a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0); return a }, _setDate: function(a, b, c) { var d = !(b); var e = a.selectedMonth; var f = a.selectedYear; b = this._determineDate(b, new Date()); a.selectedDay = a.currentDay = b.getDate(); a.drawMonth = a.selectedMonth = a.currentMonth = b.getMonth(); a.drawYear = a.selectedYear = a.currentYear = b.getFullYear(); if (e != a.selectedMonth || f != a.selectedYear) this._notifyChange(a); this._adjustInstDate(a); if (a.input) { a.input.val(d ? '' : this._formatDate(a)) } }, _getDate: function(a) { var b = (!a.currentYear || (a.input && a.input.val() == '') ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay))); return b }, _generateHTML: function(a) { var b = new Date(); b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate())); var c = this._get(a, 'isRTL'); var d = this._get(a, 'showButtonPanel'); var e = this._get(a, 'hideIfNoPrevNext'); var f = this._get(a, 'navigationAsDateFormat'); var g = this._getNumberOfMonths(a); var h = this._get(a, 'showCurrentAtPos'); var i = this._get(a, 'stepMonths'); var j = this._get(a, 'stepBigMonths'); var k = (g[0] != 1 || g[1] != 1); var l = this._daylightSavingAdjust((!a.currentDay ? new Date(9999, 9, 9) : new Date(a.currentYear, a.currentMonth, a.currentDay))); var m = this._getMinMaxDate(a, 'min', true); var n = this._getMinMaxDate(a, 'max'); var o = a.drawMonth - h; var p = a.drawYear; if (o < 0) { o += 12; p-- } if (n) { var q = this._daylightSavingAdjust(new Date(n.getFullYear(), n.getMonth() - g[1] + 1, n.getDate())); q = (m && q < m ? m : q); while (this._daylightSavingAdjust(new Date(p, o, 1)) > q) { o--; if (o < 0) { o = 11; p-- } } } a.drawMonth = o; a.drawYear = p; var r = this._get(a, 'prevText'); r = (!f ? r : this.formatDate(r, this._daylightSavingAdjust(new Date(p, o - i, 1)), this._getFormatConfig(a))); var s = (this._canAdjustMonth(a, -1, p, o) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + a.id + '\', -' + i + ', \'M\');"' + ' title="' + r + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? 'e' : 'w') + '">' + r + '</span></a>' : (e ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + r + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? 'e' : 'w') + '">' + r + '</span></a>')); var t = this._get(a, 'nextText'); t = (!f ? t : this.formatDate(t, this._daylightSavingAdjust(new Date(p, o + i, 1)), this._getFormatConfig(a))); var u = (this._canAdjustMonth(a, +1, p, o) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + a.id + '\', +' + i + ', \'M\');"' + ' title="' + t + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? 'w' : 'e') + '">' + t + '</span></a>' : (e ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + t + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? 'w' : 'e') + '">' + t + '</span></a>')); var v = this._get(a, 'currentText'); var w = (this._get(a, 'gotoCurrent') && a.currentDay ? l : b); v = (!f ? v : this.formatDate(v, w, this._getFormatConfig(a))); var x = (!a.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(a, 'closeText') + '</button>' : ''); var y = (d) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (c ? x : '') + (this._isInRange(a, w) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + a.id + '\');"' + '>' + v + '</button>' : '') + (c ? '' : x) + '</div>' : ''; var z = parseInt(this._get(a, 'firstDay'), 10); z = (isNaN(z) ? 0 : z); var A = this._get(a, 'dayNames'); var B = this._get(a, 'dayNamesShort'); var C = this._get(a, 'dayNamesMin'); var D = this._get(a, 'monthNames'); var E = this._get(a, 'monthNamesShort'); var F = this._get(a, 'beforeShowDay'); var G = this._get(a, 'showOtherMonths'); var H = this._get(a, 'calculateWeek') || this.iso8601Week; var I = a.endDay ? this._daylightSavingAdjust(new Date(a.endYear, a.endMonth, a.endDay)) : l; var J = this._getDefaultDate(a); var K = ''; for (var L = 0; L < g[0]; L++) { var M = ''; for (var N = 0; N < g[1]; N++) { var O = this._daylightSavingAdjust(new Date(p, o, a.selectedDay)); var P = ' ui-corner-all'; var Q = ''; if (k) { Q += '<div class="ui-datepicker-group ui-datepicker-group-'; switch (N) { case 0: Q += 'first'; P = ' ui-corner-' + (c ? 'right' : 'left'); break; case g[1] - 1: Q += 'last'; P = ' ui-corner-' + (c ? 'left' : 'right'); break; default: Q += 'middle'; P = ''; break } Q += '">' } Q += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + P + '">' + (/all|left/.test(P) && L == 0 ? (c ? u : s) : '') + (/all|right/.test(P) && L == 0 ? (c ? s : u) : '') + this._generateMonthYearHeader(a, o, p, m, n, O, L > 0 || N > 0, D, E) + '</div><table class="ui-datepicker-calendar"><thead>' + '<tr>'; var R = ''; for (var S = 0; S < 7; S++) { var T = (S + z) % 7; R += '<th' + ((S + z + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + '<span title="' + A[T] + '">' + C[T] + '</span></th>' } Q += R + '</tr></thead><tbody>'; var U = this._getDaysInMonth(p, o); if (p == a.selectedYear && o == a.selectedMonth) a.selectedDay = Math.min(a.selectedDay, U); var V = (this._getFirstDayOfMonth(p, o) - z + 7) % 7; var W = (k ? 6 : Math.ceil((V + U) / 7)); var X = this._daylightSavingAdjust(new Date(p, o, 1 - V)); for (var Y = 0; Y < W; Y++) { Q += '<tr>'; var Z = ''; for (var S = 0; S < 7; S++) { var be = (F ? F.apply((a.input ? a.input[0] : null), [X]) : [true, '']); var bf = (X.getMonth() != o); var bg = bf || !be[0] || (m && X < m) || (n && X > n); Z += '<td class="' + ((S + z + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + (bf ? ' ui-datepicker-other-month' : '') + ((X.getTime() == O.getTime() && o == a.selectedMonth && a._keyEvent) || (J.getTime() == X.getTime() && J.getTime() == O.getTime()) ? ' ' + this._dayOverClass : '') + (bg ? ' ' + this._unselectableClass + ' ui-state-disabled' : '') + (bf && !G ? '' : ' ' + be[1] + (X.getTime() >= l.getTime() && X.getTime() <= I.getTime() ? ' ' + this._currentClass : '') + (X.getTime() == b.getTime() ? ' ui-datepicker-today' : '')) + '"' + ((!bf || G) && be[2] ? ' title="' + be[2] + '"' : '') + (bg ? '' : ' onclick="DP_jQuery.datepicker._selectDay(\'#' + a.id + '\',' + o + ',' + p + ', this);return false;"') + '>' + (bf ? (G ? X.getDate() : '&#xa0;') : (bg ? '<span class="ui-state-default">' + X.getDate() + '</span>' : '<a class="ui-state-default' + (X.getTime() == b.getTime() ? ' ui-state-highlight' : '') + (X.getTime() >= l.getTime() && X.getTime() <= I.getTime() ? ' ui-state-active' : '') + '" href="#">' + X.getDate() + '</a>')) + '</td>'; X.setDate(X.getDate() + 1); X = this._daylightSavingAdjust(X) } Q += Z + '</tr>' } o++; if (o > 11) { o = 0; p++ } Q += '</tbody></table>' + (k ? '</div>' + ((g[0] > 0 && N == g[1] - 1) ? '<div class="ui-datepicker-row-break"></div>' : '') : ''); M += Q } K += M } K += y + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : ''); a._keyEvent = false; return K }, _generateMonthYearHeader: function(a, b, c, d, e, f, g, h, i) { d = (a.rangeStart && d && f < d ? f : d); var j = this._get(a, 'changeMonth'); var k = this._get(a, 'changeYear'); var l = this._get(a, 'showMonthAfterYear'); var m = '<div class="ui-datepicker-title">'; var n = ''; if (g || !j) n += '<span class="ui-datepicker-month">' + h[b] + '</span> '; else { var o = (d && d.getFullYear() == c); var p = (e && e.getFullYear() == c); n += '<select class="ui-datepicker-month" ' + 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + a.id + '\', this, \'M\');" ' + 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + a.id + '\');"' + '>'; for (var q = 0; q < 12; q++) { if ((!o || q >= d.getMonth()) && (!p || q <= e.getMonth())) n += '<option value="' + q + '"' + (q == b ? ' selected="selected"' : '') + '>' + i[q] + '</option>' } n += '</select>' } if (!l) m += n + ((g || j || k) && (!(j && k)) ? '&#xa0;' : ''); if (g || !k) m += '<span class="ui-datepicker-year">' + c + '</span>'; else { var r = this._get(a, 'yearRange').split(':'); var s = 0; var t = 0; if (r.length != 2) { s = c - 10; t = c + 10 } else if (r[0].charAt(0) == '+' || r[0].charAt(0) == '-') { s = c + parseInt(r[0], 10); t = c + parseInt(r[1], 10) } else { s = parseInt(r[0], 10); t = parseInt(r[1], 10) } s = (d ? Math.max(s, d.getFullYear()) : s); t = (e ? Math.min(t, e.getFullYear()) : t); m += '<select class="ui-datepicker-year" ' + 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + a.id + '\', this, \'Y\');" ' + 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + a.id + '\');"' + '>'; for (; s <= t; s++) { m += '<option value="' + s + '"' + (s == c ? ' selected="selected"' : '') + '>' + s + '</option>' } m += '</select>' } if (l) m += (g || j || k ? '&#xa0;' : '') + n; m += '</div>'; return m }, _adjustInstDate: function(a, b, c) { var d = a.drawYear + (c == 'Y' ? b : 0); var e = a.drawMonth + (c == 'M' ? b : 0); var f = Math.min(a.selectedDay, this._getDaysInMonth(d, e)) + (c == 'D' ? b : 0); var g = this._daylightSavingAdjust(new Date(d, e, f)); var h = this._getMinMaxDate(a, 'min', true); var i = this._getMinMaxDate(a, 'max'); g = (h && g < h ? h : g); g = (i && g > i ? i : g); a.selectedDay = g.getDate(); a.drawMonth = a.selectedMonth = g.getMonth(); a.drawYear = a.selectedYear = g.getFullYear(); if (c == 'M' || c == 'Y') this._notifyChange(a) }, _notifyChange: function(a) { var b = this._get(a, 'onChangeMonthYear'); if (b) b.apply((a.input ? a.input[0] : null), [a.selectedYear, a.selectedMonth + 1, a]) }, _getNumberOfMonths: function(a) { var b = this._get(a, 'numberOfMonths'); return (b == null ? [1, 1] : (typeof b == 'number' ? [1, b] : b)) }, _getMinMaxDate: function(a, b, c) { var d = this._determineDate(this._get(a, b + 'Date'), null); return (!c || !a.rangeStart ? d : (!d || a.rangeStart > d ? a.rangeStart : d)) }, _getDaysInMonth: function(a, b) { return 32 - new Date(a, b, 32).getDate() }, _getFirstDayOfMonth: function(a, b) { return new Date(a, b, 1).getDay() }, _canAdjustMonth: function(a, b, c, d) { var e = this._getNumberOfMonths(a); var f = this._daylightSavingAdjust(new Date(c, d + (b < 0 ? b : e[1]), 1)); if (b < 0) f.setDate(this._getDaysInMonth(f.getFullYear(), f.getMonth())); return this._isInRange(a, f) }, _isInRange: function(a, b) { var c = (!a.rangeStart ? null : this._daylightSavingAdjust(new Date(a.selectedYear, a.selectedMonth, a.selectedDay))); c = (c && a.rangeStart < c ? a.rangeStart : c); var d = c || this._getMinMaxDate(a, 'min'); var e = this._getMinMaxDate(a, 'max'); return ((!d || b >= d) && (!e || b <= e)) }, _getFormatConfig: function(a) { var b = this._get(a, 'shortYearCutoff'); b = (typeof b != 'string' ? b : new Date().getFullYear() % 100 + parseInt(b, 10)); return { shortYearCutoff: b, dayNamesShort: this._get(a, 'dayNamesShort'), dayNames: this._get(a, 'dayNames'), monthNamesShort: this._get(a, 'monthNamesShort'), monthNames: this._get(a, 'monthNames')} }, _formatDate: function(a, b, c, d) { if (!b) { a.currentDay = a.selectedDay; a.currentMonth = a.selectedMonth; a.currentYear = a.selectedYear } var e = (b ? (typeof b == 'object' ? b : this._daylightSavingAdjust(new Date(d, c, b))) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay))); return this.formatDate(this._get(a, 'dateFormat'), e, this._getFormatConfig(a)) } }); function extendRemove(a, b) { $.extend(a, b); for (var c in b) if (b[c] == null || b[c] == undefined) a[c] = b[c]; return a }; function isArray(a) { return (a && (($.browser.safari && typeof a == 'object' && a.length) || (a.constructor && a.constructor.toString().match(/\Array\(\)/)))) }; $.fn.datepicker = function(a) { if (!$.datepicker.initialized) { $(document).mousedown($.datepicker._checkExternalClick).find('body').append($.datepicker.dpDiv); $.datepicker.initialized = true } var b = Array.prototype.slice.call(arguments, 1); if (typeof a == 'string' && (a == 'isDisabled' || a == 'getDate')) return $.datepicker['_' + a + 'Datepicker'].apply($.datepicker, [this[0]].concat(b)); if (a == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') return $.datepicker['_' + a + 'Datepicker'].apply($.datepicker, [this[0]].concat(b)); return this.each(function() { typeof a == 'string' ? $.datepicker['_' + a + 'Datepicker'].apply($.datepicker, [this].concat(b)) : $.datepicker._attachDatepicker(this, a) }) }; $.datepicker = new Datepicker(); $.datepicker.initialized = false; $.datepicker.uuid = new Date().getTime(); $.datepicker.version = "1.7.2"; window.DP_jQuery = $ })(jQuery); $().ready(function() { $('[id$=SubmitButton]').show(); $("#DropOffArea").hide(); $("input:checkbox:checked").attr("checked", ""); $("#toggleDropOffArea").click(function() { $("#DropOffArea").toggle('slow') }); $("#CDPCodeArea").hide(); $("#toggleCDPbox").click(function() { $("#CDPCodeArea").toggle('slow') }); var a = $("#ctl00_ContentPlaceHolder1_CDPCode").val().length; if (a > 0) { $("#CDPCodeArea").show(); $("#toggleCDPbox").attr("checked", "on") } $('[id$=SubmitButton]').click(function() { $('#PostBackMsg').show() }); $('.pUpDate, .dOffDate').datepicker({ numberOfMonths: 2, showButtonPanel: true, beforeShow: customRange, dateFormat: 'dd-mm-yy', showOn: 'both', buttonImage: 'images/calendar-icon.gif', buttonImageOnly: true, buttonText: 'Show Date Picker' }); $("a.greybox").click(function() { var t = this.title || $(this).text() || this.href; $.GB_show(this.href, { height: 680, width: 600, animation: true, overlay_clickable: true, caption: t }); return false }) }); function customRange(a) { var b = new Date(); var c = new Date(b.getFullYear(), b.getMonth(), b.getDate()); if (a.id == 'ctl00_ContentPlaceHolder1_DropoffDate') { if ($('.pUpDate').datepicker('getDate') != null) {c = $('.pUpDate').datepicker('getDate'); } } return { minDate: c} }