if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r,u,f){var h=document.DiscoFunctions.PropertyValue(n),o=null,e=n.nextAll(".ajaxSave").first(),s=n.nextAll(".ajaxLoading").first(),c=function(){e.hide();var t=document.DiscoFunctions.PropertyValue(n);if(h!=t){if(f&&!f(t))return;h=t;o&&window.clearTimeout(o);o=window.setTimeout(function(){s.show();u||(u={});u[r]=h;$.getJSON(i,u,function(n,t){t!="success"||n!="OK"?(alert('Unable to change property "'+r+'":\n'+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}).fail(function(n,t,i){alert('Unable to change property "'+r+'":\n'+i);s.hide()});o=null},500)}};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(c):n.change(c);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&(n.keydown(function(n){e.show();n.which==13&&$(this).blur()}).blur(function(){e.hide()}).focus(function(){$(this).select()}),t&&n.watermark(t));n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){e.show()}).blur(function(){e.hide()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var s=n.val(),o=null,h=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();s.toLowerCase()!=i.toLowerCase()&&(s=i,o&&window.clearTimeout(o),o=window.setTimeout(function(){h.show();var n={};n[u]=s;$.getJSON(r,n,function(n,i){i!="success"||n.Result!="OK"?(alert("Unable to change Date:\n"+n),h.hide()):(t.text("by "+n.UserDescription),h.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"))});o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var o=n.val(),e=null,s=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();o.toLowerCase()!=t.toLowerCase()&&(o=t,e&&window.clearTimeout(e),e=window.setTimeout(function(){s.show();var n={};n[r]=o;$.getJSON(i,n,function(n,t){t!="success"||n!="OK"?(alert("Unable to change Date:\n"+n),s.hide()):s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")});e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function dateDialogGet(){if(!dialog){dialog=$("