Handyman Services in Phoenix AZ

“)));var d=new Element(“input”,{type:”hidden”,name:”charset”}).putValue(this.getCharset(t.document)),c=new Element(“input”,{type:”hidden”,name:”height”}).putValue(parseFloat(t.$jot(t).height())),m=new Element(“input”,{type:”hidden”,name:”scrollTop”}).putValue(t.$jot(t).scrollTop()),p=new Element(“input”,{type:”hidden”,name:”url”}).putValue(t.location.href),f=new Element(“input”,{type:”hidden”,name:”uniqID”}).putValue(this.scuniq),h=new Element(“input”,{type:”hidden”,name:”formID”}).putValue(this.sformID),v=new Element(“input”,{type:”hidden”,name:”action”}).putValue(“getScreenshot”),g=new Element(“iframe”,{name:”screen_frame”,id:”screen_frame_id”}).hide();g.observe(“load”,function(){n.checkScreenShot()}),t.wishboxInstantLoad&&(void 0===l||l>8)&&this.injectEditor(!1,!1),a.insert(u).insert(c).insert(m).insert(v).insert(f).insert(p).insert(h).insert(d),$(document.body).insert(a).insert(g),a.submit()}},checkJSON:function(){if(“object”!=typeof JSON){var e=document.createElement(“script”);e.type=”text/javascript”,e.src=”/js/vendor/json2.js”,$(document.body).appendChild(e)}},checkScreenShot:function(){var e=this,t=window.parent,o=10;t.$jot.getJSON(“https://screenshots.jotform.com/queue/”+this.scuniq+”?callback=?”,function(r){!0===r.success?t.$jot.getJSON(r.dataURL+”?callback=?”,function(o){!1===e.passive&&(t.jotformScreenshotURL=o.data,e.injectEditor(o.data,o.shotURL)),e.screenshot=o,e.onprogress=!1,$(“screen_form”)&&$(“screen_form”).remove(),$(“screen_frame_id”)&&$(“screen_frame_id”).remove()}):”waiting”!=r.status&&”working”!=r.status||!–o?(alert(“We are under heavy load right now. Please try again later.”),t.$jot(“.jt-dimmer, .jotform-feedback-link”).show(),t.$jot(“.jt-feedback”).show(“slow”)):setTimeout(function(){e.checkScreenShot()},1e3)})},injectEditor:function(e,t){if(!this.injected){this.injected=!0;var o=this,r=window.parent;r.$jot(“#js_loading”).remove(),r.$jot.getJSON(this.server+”?callback=?”,{action:”getScreenEditorTemplate”,compact:this.compact},function(n){var a,i=’‘,r.iframeWidth=r.$jot(r).width()-100-r.$jot(“#js-form-content”).width(),r.iframeHeight=r.$jot(r).height()-120,a=o.compact?r.$jot(i).insertBefore(“#js-form-content”):r.$jot(i).appendTo(“body”),o.compact&&r.$jot(“#js-form-content”).css({float:”right”});var s=o.ie();if(void 0!==s&&sClose Editor’).appendTo(“body”);l.click(function(){r.$jot.getJSON(“https://screenshots.jotform.com/wishbox-server.php?callback=?”,{action:”getImage”,uniqID:o.scuniq},function(e){e.success?(c(),l.remove(),m(e.data,e.shotURL)):confirm(“You haven’t save your edits. Are you sure you want to close the editor?”)&&(c(),l.remove())})})}else{var u=a[0],d=u.contentWindow?u.contentWindow:u.contentDocument.document?u.contentDocument.document:u.contentDocument;d.document.open(),d.document.write(n.template),setTimeout(function(){d.document.close()},200),r.jotformScreenshotURL=e}var c=function(){o.compact?(a.remove(),r.$jot(“#js-form-content”).css(“width”,”100%”)):a.hide(“slow”,function(){a.remove()}),o.injected=!1,r.$jot(“.jt-dimmer, .jotform-feedback-link”).show(),r.$jot(“.jt-feedback”).show(“slow”)},m=function(e,t){$(“screen_”+o.scID).update(‘‘),$(“data_”+o.scID).value=e,$(“screen_”+o.scID).up().show()};r.JotformCancelEditor=function(){c()},r.JotformFinishEditing=function(e){c(),m(e),o.imageSaved=!0,o.compact&&setTimeout(function(){$(document).fire(“image:loaded”)},100)}})}},populateGet:function(){try{if(“FrameBuilder”in window.parent&&”get”in window.parent.FrameBuilder&&window.parent.FrameBuilder.get!=[]){var e={},t=window.parent.FrameBuilder.get;$H(t).each(function(t){if(“object”==typeof t[1])for(prop in t[1])e[t[0]+”[“+prop+”]”]=t[1][prop];else e[t[0]]=t[1]}),document.get=Object.extend(document.get,e)}}catch(e){}},uniqid:function(e,t){var o;void 0===e&&(e=””);var r=function(e,t){return te.length?Array(t-e.length+1).join(“0”)+e:e};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,o=e,o+=r(parseInt((new Date).getTime()/1e3,10),8),o+=r(this.php_js.uniqidSeed,5),t&&(o+=(10*Math.random()).toFixed(8).toString()),o},initMultipleUploads:function(){var e=this,t=JotForm.isJotFormNext||/jotformNext=1/.test(window.location.href);if(JotForm.browserIs.mobile()&&!t){var o=!0;JotForm.loadScript(window.location.protocol+”//”+window.location.host+”/js/vendor/NoSleep.min.js?v_”+(new Date).getTime(),function(){o=!1});var r=function(){o||”undefined”==typeof NoSleep||((new NoSleep).enable(),document.removeEventListener(“click”,r,!0))};document.addEventListener(“click”,r,!0)}t&&JotForm.switchedToOffline&&JotForm.rawMultipleFileInputs&&JotForm.resetMultipleUploadsBasicMarkup(),$$(“.form-upload-multiple”).each(function(o){var r=o.up(“div”),n=JotForm.getForm(o),a=n.formID.value;t&&JotForm.captureMultipleUploadsBasicMarkup(o);var i=a+”_”+JotForm.uniqueID;if(r.addClassName(“validate[multipleUpload]”),o.className.include(“validate[required]”)&&-1===r.className.indexOf(“validate[required]”)&&r.addClassName(“validate[required]”),r.validateInput=function(){if(!JotForm.isVisible(r))return JotForm.corrected(r),!0;if(JotForm.isFillingOffline())return JotForm.corrected(r);var e=r.select(“.qq-upload-list li:not(.file-deleted)”);if(e.length=0&&(t=!1)}),t?(JotForm.corrected(r),!0):(JotForm.errored(r,JotForm.texts.multipleFileUploads_uploadFailed),!1)},!this.tempUploadFolderInjected){var s=new Element(“input”,{type:”hidden”,name:”temp_upload_folder”}).setValue(i);n.insert({top:s}),this.tempUploadFolderInjected=!0}var l=(o.readAttribute(“data-file-accept”)||o.readAttribute(“file-accept”)||””).strip();l=”*”!==l?l.split(“, “):[];var u,d,c,m,p,f=””;(u=o.next())&&u.hasClassName(“form-sub-label”)&&(f=u.innerHTML),(d=o.previous(“.qq-uploader-buttonText-value”))&&(c=d.innerHTML),c||(c=”Upload a File”),f?((d=r.querySelector(“.cancelText”))&&(m=d.innerText),(d=r.querySelector(“.ofText”))&&(p=d.innerText)):((d=r.siblings().find(function(e){return”cancelText”===e.className}))&&(m=d.innerText),(d=r.siblings().find(function(e){return”ofText”===e.className}))&&(p=d.innerText));var h=o.className.split(” “),v=””;$A(h).each(function(e){0===e.indexOf(“form-submit-button-“)&&(v=e)});try{!JotForm.isFillingOffline()&&new qq.FileUploader({debug:JotForm.debug,element:r,action:JotForm.server,subLabel:f,buttonText:c,buttonStyle:v,fileLimit:o.readAttribute(“data-file-limit”)||o.readAttribute(“file-limit”),sizeLimit:1024*parseInt(o.readAttribute(“data-file-maxsize”)||o.readAttribute(“file-maxsize”),10),minSizeLimit:1024*parseInt(o.readAttribute(“data-file-minsize”)||o.readAttribute(“file-minsize”),10),allowedExtensions:l,cancelText:m,ofText:p,messages:{typeError:e.texts.multipleFileUploads_typeError,sizeError:e.texts.multipleFileUploads_sizeError,minSizeError:e.texts.multipleFileUploads_minSizeError,emptyError:e.texts.multipleFileUploads_emptyError,onLeave:e.texts.multipleFileUploads_onLeave,fileLimitError:e.texts.multipleFileUploads_fileLimitError},onComplete:function(e,t,a){if(console.log(“onComplete”,arguments),a.success){var s=o.name.replace(“[]”,””);”message”in a&&(t=a.message);var l=[i,s,t].join(“_”),u=$(l);u||(u=new Element(“input”,{id:l,type:”hidden”,name:”temp_upload[“+s+”][]”}),n.insert({top:u})),u.setValue(t);var d=$(“file_server”);d||(d=new Element(“input”,{id:”file_server”,type:”hidden”,name:”file_server”}),n.insert({top:d})),d.setValue(a.fileServer),r.value=”uploaded”,JotForm.corrected(r)}},onDelete:function(e,t,o){var r=[e,t,o].join(“_”);$(r)&&$(r).remove()},showMessage:function(e){console.log(“showMessage”,arguments),JotForm.corrected(r),JotForm.errored(r,e)},params:{action:”multipleUpload”,field:o.name.replace(“[]”,””),origin:window.location.origin||window.location.protocol+”//”+window.location.hostname,folder:i}})}catch(e){console.log(e)}})},captureMultipleUploadsBasicMarkup:function(e){JotForm.rawMultipleFileInputs||(JotForm.rawMultipleFileInputs={});var t=e.getAttribute(“id”).match(/input_(.*)/)[1];t&&(JotForm.rawMultipleFileInputs[t]=e.outerHTML)},resetMultipleUploadsBasicMarkup:function(){Object.keys(JotForm.rawMultipleFileInputs).forEach(function(e){var t=document.querySelector(“li#id_”+e+’ input[type=”file”]’).up(“div.validate\[multipleUpload\]”),o=JotForm.rawMultipleFileInputs[e];if(t&&o){var r=t.querySelector(“ul.qq-upload-list”),n=””;for(r&&(r.querySelectorAll(“.qq-upload-delete”).forEach(function(e){e.remove()}),n=r.outerHTML);t.firstChild;)t.removeChild(t.firstChild);t.insertAdjacentHTML(“afterbegin”,o),t.insertAdjacentHTML(“beforeend”,n)}})},initNewMultipleUploads:function(){$$(“.form-upload-multiple-new”).each(function(e){var t=e.up(“div”),o=JotForm.getForm(e),r=o.formID.value+”_”+JotForm.uniqueID;if(e.className.include(“validate[required]”)&&(-1===t.className.indexOf(“validate[required]”)&&t.addClassName(“validate[required]”),t.validateInput=function(){return JotForm.isVisible(t)&&t.select(“.new-file-list li”).length Saving…’)),setTimeout(function(){JotForm.saving=!0,JotForm.disableButtons()},10);var o=”cardform”==window.FORM_MODE;if(!$(“hidden_submit_form”)){var r=new Element(“iframe”,{name:”hidden_submit”,id:”hidden_submit_form”}).hide();r.observe(“load”,function(){o||JotForm.makeUploadChecks(),$$(“.form-saving-indicator”).invoke(“remove”),JotForm.saving=!1,JotForm.enableButtons()}),$(document.body).insert(r)}$$(“.form-radio-other,.form-checkbox-other”).each(function(e){!e.checked&&JotForm.getOptionOtherInput(e)&&JotForm.getOptionOtherInput(e).disable()}),$$(“.custom-hint-group”).each(function(e){e.hideCustomPlaceHolder()}),$(“current_page”)&&($(“current_page”).value=JotForm.currentSection.pagesIndex),e.writeAttribute(“target”,”hidden_submit”),e.insert({top:new Element(“input”,{type:”hidden”,name:”hidden_submission”,id:”hidden_submission”}).putValue(“1”)}),o&&e.insert({top:new Element(“input”,{type:”hidden”,name:”continueLater”,id:”continueLater”}).putValue(“1”)}),t&&t.async?$(e).request({onCreate:function(e){var t=e.transport;t.setRequestHeader=t.setRequestHeader.wrap(function(e,t,o){return/^(accept|accept-language|content-language)$/i.test(t)?e(t,o):/^content-type$/i.test(t)&&/^(application/x-www-form-urlencoded|multipart/form-data|text/plain)(;.+)?$/i.test(o)?e(t,o):void 0})},onComplete:function(r){o&&(JotForm.saving=!1,JotForm.enableButtons()),200===r.status?t.onSuccessCb&&t.onSuccessCb(r):t.onFailureCb&&t.onFailureCb(),t.onCompleteCb&&t.onCompleteCb(),e.writeAttribute(“target”,””),o&&$(“continueLater”)&&$(“continueLater”).remove(),$(“hidden_submission”)&&$(“hidden_submission”).remove(),$$(“.custom-hint-group”).each(function(e){e.showCustomPlaceHolder()}),$$(“.form-radio-other,.form-checkbox-other”).each(function(e){!e.checked&&JotForm.getOptionOtherInput(e)&&JotForm.getOptionOtherInput(e).enable()})}}):(e.submit(),e.writeAttribute(“target”,””),o&&$(“continueLater”).remove(),$(“hidden_submission”).remove(),$$(“.custom-hint-group”).each(function(e){e.showCustomPlaceHolder()}),$$(“.form-radio-other,.form-checkbox-other”).each(function(e){!e.checked&&JotForm.getOptionOtherInput(e)&&JotForm.getOptionOtherInput(e).enable()}))},makeUploadChecks:function(){var e=$$(‘input[name=”formID”]’)[0],t={action:”getSavedUploadResults”,formID:e.value,sessionID:this.sessionID};this.submissionID&&(t.submissionID=this.submissionID),this.submissionToken&&(t.submissionToken=this.submissionToken);new Ajax.Jsonp(JotForm.server,{parameters:t,evalJSON:”force”,onComplete:function(t){var o=t.responseJSON;o&&o.success&&(o.submissionID&&!$(“submission_id”)&&(JotForm.submissionID||JotForm.setSubmissionID(o.submissionID),e.insert({after:new Element(“input”,{type:”hidden”,name:”submission_id”,id:”submission_id”}).putValue(o.submissionID)})),”cardform”===window.FORM_MODE?JotForm.editMode(o,!0,null,!0):JotForm.editMode(o,!0))}})},handleSavedForm:function(){if(JotForm.sessionID){JotForm.saveForm=!0;var e=”cardform”==window.FORM_MODE,t=$$(‘input[name=”formID”]’)[0];document.getElementById(“session”)||t.insert({after:new Element(“input”,{type:”hidden”,name:”session_id”,id:”session”}).putValue(JotForm.sessionID)}),e||t.insert({after:new Element(“input”,{type:”hidden”,id:”current_page”,name:”current_page”}).putValue(0)}),JotForm.loadingPendingSubmission=!0;var o={action:”getSavedSubmissionResults”,formID:t.value,sessionID:this.sessionID,URLparams:window.location.href};this.submissionID&&(o.submissionID=this.submissionID),this.submissionToken&&(o.submissionToken=this.submissionToken);new Ajax.Jsonp(JotForm.url+”/server.php”,{parameters:o,evalJSON:”force”,onComplete:function(e){var o=e.responseJSON;if(o.success&&o.submissionID){$(“submission_id”)||(t.insert({after:new Element(“input”,{type:”hidden”,name:”submission_id”,id:”submission_id”}).putValue(o.submissionID)}),JotForm.submissionID||JotForm.setSubmissionID(o.submissionID));try{JotForm.editMode(o)}catch(e){JotForm.loadingPendingSubmission=!1,console.error(e)}JotForm.openInitially=o.currentPage-1}JotForm.loadingPendingSubmission=!1}})}},setSubmissionID:function(e){this.submissionID=e},setHTMLClass:function(){var e=this.ie();e&&$$(“html”)[0].addClassName(“ie-“+e)},setFocusEvents:function(){$$(“.form-radio, .form-checkbox”).each(function(e){e.observe(“mousedown”,function(){JotForm.lastFocus=e})}),$$(“.form-textbox, .form-password, .form-textarea, .form-upload, .form-dropdown”).each(function(e){e.observe(“focus”,function(){JotForm.lastFocus=e})})},disableAcceptonChrome:function(){Prototype.Browser.WebKit&&$$(“.form-upload”).each(function(e){if(e.hasAttribute(“accept”)){var t=e.readAttribute(“accept”);e.writeAttribute(“accept”,””),e.writeAttribute(“data-file-accept”,t),e.writeAttribute(“file-accept”,t)}})},browserInformations:function(){var e=JotForm.browserIs;var t=(new Date).getTimezoneOffset(),o=”GMT “+(t0&&(t=[$(e).getValue(),t].join(“n”)),$(e).setValue(t)},20)},displayTimeRangeDuration:function(e){var t=function(){if($(“input_”+e+”_hourSelectRange”)){var t=$(“input_”+e+”_hourSelect”).value,o=$(“input_”+e+”_minuteSelect”).value,r=$(“input_”+e+”_ampm”)?$(“input_”+e+”_ampm”).value:”no”,n=$(“input_”+e+”_hourSelectRange”).value,a=$(“input_”+e+”_minuteSelectRange”).value,i=$(“input_”+e+”_ampmRange”)?$(“input_”+e+”_ampmRange”).value:”no”,s=$(“input_”+e+”_ampmRange”)?”_ampmRange”:”_dummy”,l=$$(“label[for=input_”+e+s+”]”).first();if(“cardform”===window.FORM_MODE&&(l=”_ampmRange”==s?$$(“label[for=input_”+e+s+”]”).first():$$(“#input_”+e+s).first()),t.length>0&&o.length>0&&n.length>0&&a.length>0){“PM”==r&&12!=t&&(t=parseInt(t)+12),”AM”==r&&12==t&&(t=0),”PM”==i&&12!=n&&(n=parseInt(n)+12),”AM”==i&&12==n&&(n=0);var u=new Date(0,0,0,t,o,0),d=new Date(0,0,0,n,a,0),c=d.getTime()-u.getTime();cTotal “+m+”:”+p+””),l.setStyle({color:”black”}),$$(“input[id=duration_”+e+’_ampmRange][type=”hidden”]’).first().setValue(m+”:”+p)}else l.update(“&nbsp”)}};$(“input_”+e+”_hourSelect”).observe(“change”,t),$(“input_”+e+”_minuteSelect”).observe(“change”,t),$(“input_”+e+”_hourSelectRange”).observe(“change”,t),$(“input_”+e+”_minuteSelectRange”).observe(“change”,t),$(“input_”+e+”_ampm”)&&$(“input_”+e+”_ampmRange”)&&($(“input_”+e+”_ampm”).observe(“change”,t),$(“input_”+e+”_ampmRange”).observe(“change”,t)),t()},displayLocalTime:function(e,t,o){if($(e)&&!$(e).hasClassName(“noDefault”)){var r=new Date,n=r.getHours(),a=””,i=!0;$(o)&&(i=!1,a=n>11?”PM”:”AM”,n=0==(n=n>12?n-12:n)?12:n);var s=r.getMinutes(),l=Number($(t).options[2].value)-Number($(t).options[1].value);s=Math.round(s/l)*l,(s=this.addZeros(s,2))>=60&&(s=”00″,n++,i?24==n&&(n=0):”AM”==a&&12==n?a=”PM”:”PM”==a&&12==n?a=”AM”:13==n&&(n=1)),n1&&(n=”0″+n),$(e).value=n,$(t).value=s,$(e+”Range”)&&($(e+”Range”).value=n,$(t+”Range”).value=s),$(o)&&(“PM”==a?($(o).select(‘option[value=”PM”]’).length>0&&($(o).value=”PM”),$(o+”Range”)&&$(o+”Range”).select(‘option[value=”PM”]’).length>0&&($(o+”Range”).value=”PM”)):($(o).select(‘option[value=”AM”]’).length>0&&($(o).value=”AM”),$(o+”Range”)&&$(o+”Range”).select(‘option[value=”AM”]’).length>0&&($(o+”Range”).value=”AM”)))}},displayDynamicDate:function(e,t){var o=parseInt(t.split(“today”)[1])||0,r=new Date;r.setDate(r.getDate()+o),JotForm.formatDate({date:r,dateField:$(“id_”+e)})},dateLimits:{},setCalendar:function(e,t,o,r){try{JotForm.dateLimits[e]=o;var n=$(“id_”+e),a=Calendar.setup({triggerElement:”input_”+e+”_pick”,dateField:”year_”+e,parentElement:r,closeHandler:function(){JotForm.calendarClose.apply(this,arguments)},selectHandler:function(){JotForm.formatDate.apply(this,arguments)},startOnMonday:t,limits:o});n.observe(“keyup”,function(){n.fire(“date:changed”)});var i=function(){$(“month_”+e).value=$(“day_”+e).value=$(“year_”+e).value=””},s=function(e,t){e.addClassName(“invalidDate”),i()};if($(“lite_mode_”+e)&&($(“lite_mode_”+e).dateChanged=function(e,t){var o=e.currentTarget,r=o.readAttribute(“seperator”)||o.readAttribute(“data-seperator”),a=(o.readAttribute(“format”)||o.readAttribute(“data-format”)).toLowerCase();if(o.removeClassName(“invalidDate”),””===o.value)return n.fire(“date:changed”),i();if(o.value.length==2*r.length+a.length){var l=a.indexOf(“yy”),u=a.indexOf(“mm”),d=a.indexOf(“dd”),c=new Array(l,u,d),m={year:(c=c.sort()).indexOf(l),month:c.indexOf(u),day:c.indexOf(d)},p=parseInt(o.value.split(r)[m.year]),f=parseInt(o.value.split(r)[m.month])-1,h=parseInt(o.value.split(r)[m.day]),v=new Date(p,f,h);v&&v.getDate()?(t.date=v,t.selectHandler(t)):s(o)}else s(o);o.hasClassName(“invalidDate”)&&(JotForm.errored(o,”Enter a valid date”),n.addClassName(“form-line-error”),n.addClassName(“form-datetime-validation-error”))},$(“lite_mode_”+e).observe(“keyup”,function(e){return e.stopPropagation(),e.currentTarget.dateChanged(e,a),!1}),$(“lite_mode_”+e).observe(“blur”,function(e){return e.stopPropagation(),e.currentTarget.dateChanged(e,a),e.currentTarget.setAttribute(“date-val”,a.date.getTime()),!1})),!r){var l=function(){var e=this;setTimeout(function(){a.showAtElement(e)},50)};if($(“input_”+e+”_pick”).hasClassName(“showAutoCalendar”))$$([“#day_”+e,”#month_”+e,”#year_”+e,”#lite_mode_”+e].join(“,”)).each(function(e){e.observe(“focus”,l),e.observe(“click”,l)});$(“year_”+e).observe(“blur”,function(){a.hide()})}}catch(e){JotForm.error(e)}},currentDateReadonly:function(){},calendarClose:function(e){var t=$$(‘input[id*=”‘+e.dateField.id.match(/_[0-9]+/)[0]+'”]’),o=e.dateField.className.replace(/.*validate[(.*)].*/,”$1″).split(/s*,s*/),r=t.any(function(e){return e.value.empty()});(o.include(“required”)||o.include(“disallowPast”))&&r&&e.dateField.validateInput(),o.include(“required”)&&!r&&JotForm.corrected($(“id_”+e.id)),e.hide()},getDefaults:function(){$$(“.form-textbox, .form-dropdown, .form-textarea”).each(function(e){e.hinted||””===e.value||(JotForm.defaultValues[e.id]=e.value)}),$$(“.form-radio, .form-checkbox”).each(function(e){e.checked&&(JotForm.defaultValues[e.id]=e.value)})},handleOtherOptions:function(){$$(“.form-radio-other-input, .form-checkbox-other-input”).each(function(e){e.hint(e.getAttribute(“data-otherhint”)||”Other”)}),$$(“.form-radio, .form-checkbox”).each(function(e){var t=e.id.replace(/input_(d+)_d+/gim,”$1″);t.match(“other_”)&&(t=e.id.replace(/other_(d+)/,”$1″));var o=$(“other_”+t);if(o){var r=$(“input_”+t);r.observe(“keyup”,function(){o.value=r.value;var e=””!==r.value;!o.checked&&e&&r.click(),setTimeout(function(){o.checked=e})}),r.observe(“click”,function(e){r.value=r.value===r.getAttribute(“data-otherhint”)?””:r.value,o.checked||(o.checked=!0)}),o.observe(“click”,function(e){o.getAttribute(“class”).indexOf(“[required]”)>-1?r.value=r.value===r.getAttribute(“data-otherhint”)?””:r.value:r.value=””!==r.value?r.value:r.getAttribute(“data-otherhint”),o.checked?r.select():r.hintClear&&r.hintClear()}),e.observe(“click”,function(t){e!==o&&e.checked&&!o.checked&&(r.value=””)})}})},shuffleOptions:function(e){var t=JotForm.calculationType(e);if(“radio”===t||”checkbox”===t)try{for(var o=$(“id_”+e).select(“.form-“+t+”-item”),r=$(“id_”+e).down(“.form-“+t+”-other-input”)?o.length-1:o.length,n=0;n12)d=e;else if(isNaN(m)||m29:m>28)&&(d=n);break;case 4:case 6:case 9:case 11:m>30&&(d=n);break;default:m>31&&(d=n)}}var f=u&&u.target&&u.target===document.activeElement;if(“cardform”===window.FORM_MODE&&void 0!==document.activeElement&&document.activeElement&&”function”==typeof document.activeElement.up&&e&&(f=e.up(“.jfCard-question”)===document.activeElement.up(“.jfCard-question”)),!d&&i&&s&&(“”!=i.value||””!=s.value)&&!f){var h=””==i.value.strip()?-1:+i.value,v=””==s.value.strip()?-1:+s.value;isNaN(h)||(l?h12:h23)?d=i:(isNaN(v)||v59)&&(d=s)}var g=document.activeElement;if(d&&g!=a&&g!=e&&g!=n){if(d===i||d===s)d.errored=!1,JotForm.errored(d,”Enter a valid time”);else{d.errored=!1;var y=JotForm.texts.dateInvalidSeparate.replace(“{element}”,d.id.replace(“_”+o,””));JotForm.errored(d,y)}return r.addClassName(“form-line-error”),r.addClassName(“form-datetime-validation-error”),!1}return JotForm.corrected(e),JotForm.corrected(n),JotForm.corrected(a),i&&s&&(JotForm.corrected(i),JotForm.corrected(s)),r.removeClassName(“form-line-error”),r.removeClassName(“form-datetime-validation-error”),!0},i&&s&&(i.observe(“change”,function(t){e.dateTimeCheck(t)}),s.observe(“change”,function(t){e.dateTimeCheck(t)}))}})}catch(e){console.error(e)}},handleTextareaLimits:function(){$$(“.form-textarea-limit-indicator span”).each(function(e){var t=e.id.split(“-“)[0];if($(t)){var o,r=e.readAttribute(“data-minimum”),n=e.readAttribute(“data-limit”),a=$(t),i=function(t){if(“”===a.value||a.hasClassName(“form-custom-hint”))return $(e.parentNode).removeClassName(“form-textarea-limit-indicator-error”),e.update(“0/”+(r>-1?r:n)),JotForm.corrected(e);var i=(a.hasClassName(“form-textarea”)&&a.up(“div”).down(“.nicEdit-main”)?a.value.stripTags(” “).replace(/ /g,” “):a.value).replace(/]*?>/g,” “).replace(/ | /gi,” “);$(e.parentNode).removeClassName(“form-textarea-limit-indicator-error”),JotForm.corrected(e.up(“.form-line”).down(“textarea”));var s=function(a){var s=”min”==a?e.readAttribute(“data-typeminimum”):e.readAttribute(“type”);”Words”==s?o=$A(i.split(/s+/)).without(“”).length:”Letters”==s&&(o=i.length);var l=!1;if((“min”==a&&on)&&!0!==t){$(e.parentNode).addClassName(“form-textarea-limit-indicator-error”);var u=”min”==a?”Min”:””,d=”min”==a?r:n,c=”Words”===s?”word”:”character”,m=JotForm.texts[c+u+”LimitError”]+” “+d;JotForm.errored(e.up(“.form-line”).down(“textarea”),m+”.”),l=!0}return e.update(o+”/”+(r&&o0&&(l=!s(“min”)),n&&n>0&&l&&s(“max”)};if(i(!0),a.observe(“change”,i),a.observe(“focus”,i),a.observe(“keyup”,i),a.hasClassName(“form-textarea”)&&a.up(“div”).down(“.nicEdit-main”)){var s=a.up(“div”).down(“.nicEdit-main”),l=function(){a.value=s.innerHTML,i()};s.observe(“keyup”,l),s.observe(“blur”,function(){setTimeout(l,0)})}}})},handleAutoCompletes:function(){var e=[];$H(JotForm.autoCompletes).each(function(t){var o=$(t.key);o.writeAttribute(“autocomplete”,”off”);$(o.parentNode);var r,n=t.value.split(/rn|r|n||/g),a=$A(n),i=0,s=0,l=new Element(“div”,{className:”form-autocomplete-list”}).setStyle({listStyle:”none”,listStylePosition:”outside”,position:”absolute”,zIndex:”10000″}).hide();$(document.body).insert(l),l.close=function(){l.update(),l.hide(),i=0},o.observe(“blur”,function(){l.close()}),o.observe(“keyup”,function(t){var n=o.value;if(r!=n)if(r=n,l.update(),n){var i,u=”Yes”==o.readAttribute(“data-fuzzySearch”),d=n.toLowerCase();i=a.collect(function(e){if(u&&e.toLowerCase().include(d)||0==e.toLowerCase().indexOf(d))return e}).compact();var c=o.readAttribute(“data-maxMatches”);c>0&&(i=i.slice(0,c)),i.length>0?(i.each(function(e){var t=new Element(“li”,{className:”form-autocomplete-list-item”}),r=e;t.val=r;try{r=e.replace(new RegExp(“(“+n+”)”,”gim”),”$1“)}catch(e){JotForm.error(e)}t.insert(r),t.onmousedown=function(){o.value=JotForm.decodeHtmlEntities(e),l.close()},l.insert(t)}),function(){if(“cardform”===window.FORM_MODE){var e=o.getBoundingClientRect(),t=e.top+e.height-5+”px”,r=e.left+”px”,n=(e.width9?10:i.length)+4+”px”,overflow:”auto”}),JotForm.isEditMode()&&-1===e.indexOf(o.id)&&(l.hide(),e.push(o.id))):l.close()}else l.close()}),o.observe(“keydown”,function(e){var t;if(l.visible()&&l.firstChild)switch((t=l.select(“.form-autocomplete-list-item-selected”)[0])&&t.removeClassName(“form-autocomplete-list-item-selected”),e.keyCode){case Event.KEY_UP:t&&t.previousSibling?$(t.previousSibling).addClassName(“form-autocomplete-list-item-selected”):$(l.lastChild).addClassName(“form-autocomplete-list-item-selected”),i=9?t&&t.nextSibling?($(t.nextSibling).scrollIntoView(!1),i=10):($(l.firstChild).scrollIntoView(!0),i=0):i++;break;case Event.KEY_ESC:l.close();break;case Event.KEY_TAB:case Event.KEY_RETURN:t&&(o.value=JotForm.decodeHtmlEntities(t.val),r=o.value),l.close(),e.keyCode==Event.KEY_RETURN&&e.stop();break;default:return}}),l.close()})},decodeHtmlEntities:function(e){var t=document.createElement(“textarea”);return t.innerHTML=e,t.value},getFileExtension:function(e){return/[.]/.exec(e)?/[^.]+$/.exec(e)[0]:void 0},prePopulations:function(){$H(document.get).each(function(e){e.key.match(/[sS]+;/)&&(e.key=e.key.replace(/[sS]+;/,””));var t,o=e.key.length0){var n=e.key.substr(0,e.key.lastIndexOf(“[“));if(n.length>0&&$$(“select[name*=”+n+”], input[name*=”+n+”]”).length>0){var a=e.key.substr(e.key.lastIndexOf(“[“)+1).replace(“]”,””);if($$(“select[name*=”+n+”], input[name*=”+n+”]”).length>a)switch($$(“select[name*=”+n+”]”).length>0?”select”:$$(“input[name*=”+n+”]”)[a].type){case”select”:$$(“select[name*=”+n+”]”)[a].value=e.value.replace(/+/g,” “);break;case”text”:case”tel”:case”number”:$$(“input[name*=”+n+”]”)[a].value=e.value.replace(/+/g,” “);break;case”radio”:case”checkbox”:try{“true”!=e.value&&1!=e.value||!$$(“input[name*=”+n+”]”)[a]||”control_matrix”===$$(“input[name*=”+n+”]”).first().up(“.form-line”).readAttribute(“data-type”)&&n.indexOf(“[“)-1)t.value=e.value.replace(/+/g,” “),JotForm.defaultValues[t.id]=t.value;else try{var u=”control_checkbox”===t.up(“.form-line”).readAttribute(“data-type”)?e.value.split(“,”):[e.value];for(l=0;l“)).include(t.value)?t.checked||(t.disabled?(t.enable(),t.click(),t.disable()):t.click(),JotForm.defaultValues[t.id]=t.value):$A(e.value.split(“,”)).include(“other”)&&(t.name.indexOf(“[other]”)>-1||t.id&&t.id.indexOf(“other_”)>-1)&&t.click(),o&&setTimeout(function(){t.disable()})}),t&&t.hasClassName(“form-textarea”)&&t.hasClassName(“form-custom-hint”)&&t.hasContent&&t.removeClassName(“form-custom-hint”)}}),setTimeout(function(){JotForm.runAllConditions()},200)},resetForm:function(e){var t=$(e).select(‘input[type=”hidden”], #input_language’);return t.each(function(e){e.__defaultValue=e.value}),$(e).reset(),t.each(function(e){e.value=e.__defaultValue}),e},editMode:function(e,t,o,r){var n=””;JotForm.debug||(n=-1==this.url.search(“https”)?”http://cdn.jotfor.ms/”:”https://cdn.jotfor.ms/”),”true”==document.get.offline_forms&&1==document.get.jotformNext&&(n=window.location.pathname.replace(“/index.html”,””));var a=this;window.editModeFunction?a.editMode(e,t,o,r):this.loadScript(n+”/js/form.edit.mode.js?v_”+(new Date).getTime(),function(){a.editMode=editModeFunction,JotForm.sessionID&&e&&(e.fromSession=!0),a.editMode(e,t,o,r)})},isEditMode:function(){return”cardform”===window.FORM_MODE?void 0!==window.editModeFunction&&CardForm.layoutParams.isEditMode:void 0!==window.editModeFunction||window.location.pathname.match(/^/edit//)||window.location.pathname.match(/^//edit/)||window.location.href.match(/mode=inlineEdit/)||window.location.href.match(/mode=submissionToPDF/)},setConditions:function(e){e.reverse(),JotForm.conditions=e,e.each(function(e){e.action=[].concat(e.action)})},setCalculations:function(e){JotForm.calculations&&0!==Object.keys(JotForm.calculations).length?Object.values(e).forEach(function(e){JotForm.calculations.push(e)}):JotForm.calculations=e},prepareCalculationsOnTheFly:function(e){var t=[];function o(e){return e[0].map(function(t,o){return e.map(function(e){return e[o]})})}e.length>0&&(Object.keys(JotForm.calculations).length0&&(i=o(i))[1].forEach(function(o){var r;r=o.indexOf(“:”)>-1?t[o.split(“:”)[0]]:t[o.split(“[“)[0]];var n=/[(.*?)]/gi.exec(o),a=n?r+”|”+n[1]:””;JotForm.calculations.push({decimalPlaces:”2″,defaultValue:””,equation:”{“+(a||r)+”}”,ignoreHiddenFields:””,insertAsText:”1″,isLabel:”control_text”===e.type?””:”1″,newCalculationType:”1″,operands:r,readOnly:””,replaceText:o,resultField:e.qid,showBeforeInput:””,tagReplacement:”1″,useCommasForDecimals:””})})}}}))},runConditionForId:function(e){$H(JotForm.fieldConditions).each(function(t){var o=t.value.conditions;$A(o).each(function(t){$A(t.terms).each(function(o){o.field===e&&JotForm.checkCondition(t)})})})},otherConditionTrue:function(e,t){t=t.replace(/multiple/,””);var o=!1;return $H(JotForm.fieldConditions).each(function(r){var n=r.value.conditions;$A(n).each(function(r){$A(r.action).each(function(r){r.fields&&r.fields.each(function(n){n===e&&r.visibility&&r.visibility.toLowerCase().replace(/multiple/,””)===t&&r.hasOwnProperty(“currentlyTrue”)&&r.currentlyTrue&&(o=!0)}),r.field===e&&r.visibility&&r.visibility.toLowerCase()===t&&r.hasOwnProperty(“currentlyTrue”)&&r.currentlyTrue&&(o=!0)})})}),o},showField:function(e,t){if(!JotForm.otherConditionTrue(e,”hide”)){var o=null,r=$(“id_”+e),n=$(“cid_”+e),a=$(“section_”+e);if(!(o=a&&n?a:n&&!r?n:r)){var i=$$(‘input[name*=”q’+e+'”][type=”hidden”]’);return i.length>0&&i[0].setAttribute(“selected”,!0),o}var s=o.hasClassName(“form-field-hidden”)||o.hasClassName(“always-hidden”);o.removeClassName(“form-field-hidden”),o.removeClassName(“always-hidden”),o.hasClassName(“form-section”)||o.hasClassName(“form-section-closed”)||!o.down(“.always-hidden”)||o.down(“.always-hidden”).removeClassName(“always-hidden”),JotForm.paymentFields.indexOf(o.getAttribute(“data-type”))>-1&&$(“hiddenPaymentField”)&&$(“hiddenPaymentField”).remove(),a&&(o.hasClassName(“form-section-closed”)?o.select(“.form-collapse-table”)[0].hasClassName(“form-collapse-hidden”)?(o.removeClassName(“form-section-closed”),o.addClassName(“form-section”),o.setStyle({height:”auto”,overflow:”visible”})):o.setStyle({overflow:”hidden”}):o.setStyle({height:”auto”,overflow:”visible”})),”html”===JotForm.getInputType(e)&&$(“text_”+e).innerHTML.match(/google.*maps/gi)&&($(“text_”+e).innerHTML=$(“text_”+e).innerHTML);var l=o.show();if(“widget”===JotForm.getInputType(e)&&JotForm.showWidget(e),”signature”===JotForm.getInputType(e)&&s&&JotForm.showAndResizeESignature(e),”collapse”===JotForm.getInputType(e)&&a&&!o.hasClassName(“form-section-closed”)&&o.select(“li.form-line”).each(function(e,t){var o=e.id.split(“_”)[1];”widget”===JotForm.getInputType(o)?JotForm.showWidget(o):”signature”===JotForm.getInputType(o)&&JotForm.showAndResizeESignature(o)}),”cardform”==window.FORM_MODE&&s&&$(“id_”+e)&&”control_matrix”==$(“id_”+e).readAttribute(“data-type”)&&JotForm.setMatrixLayout(e,!1),JotForm.donationField&&o.down(‘[data-component=”paymentDonation”][data-custom-amount-field]’)&&JotForm.updateDonationAmount(),”control_paypalSPB”===o.getAttribute(“data-type”)&&$$(‘[data-paypal-button=”Yes”]’)[0]){var u=$$(“.paypal-buttons.paypal-buttons-context-iframe”)[0];if(u){var d=JotForm.getContainer(u);d&&d.setAttribute(“paypal-button-status”,”show”)}}return l}},showWidget:function(e){var t=!!document.getElementById(“customFieldFrame_”+e)&&document.getElementById(“customFieldFrame_”+e).src;if(t){var o=-1!=navigator.userAgent.indexOf(“Firefox”)&&”undefined”!=typeof getIframeWindow?getIframeWindow(window.frames[“customFieldFrame_”+e]):window.frames[“customFieldFrame_”+e],r=!(!$(“customFieldFrame_”+e).hasClassName(“frame-xd-ready”)&&!$(“customFieldFrame_”+e).retrieve(“frame-xd-ready”));o&&r&&(XD.postMessage(JSON.stringify({type:”show”,qid:e}),t,o),void 0!==window.JCFServerCommon&&JotForm.isVisible(JotForm.getSection($(“id_”+e)))&&JotForm.isVisible($(“id_”+e))&&window.JCFServerCommon.frames.hasOwnProperty(e)&&window.JCFServerCommon.frames[e].sendReadyMessage(e))}},reloadWidget:function(e){var t=!!document.getElementById(“customFieldFrame_”+e)&&document.getElementById(“customFieldFrame_”+e).src;if(t){var o=-1!=navigator.userAgent.indexOf(“Firefox”)&&”undefined”!=typeof getIframeWindow?getIframeWindow(window.frames[“customFieldFrame_”+e]):window.frames[“customFieldFrame_”+e],r=!(!$(“customFieldFrame_”+e).hasClassName(“frame-xd-ready”)&&!$(“customFieldFrame_”+e).retrieve(“frame-xd-ready”));o&&r&&XD.postMessage(JSON.stringify({type:”reload”,qid:e}),t,o)}},shouldWidgetSkipSubmit:function(){if(JotForm.isEncrypted||JotForm.disableSubmitButton)return!0;return!!(!JotForm.isEditMode()&&JotForm.isPaymentSelected()&&[“stripe”,”braintree”,”square”,”eway”,”bluepay”].indexOf(JotForm.payment)>-1)&&(JotForm.paymentTotal>0||”stripe”==JotForm.payment&&”subscription”==window.paymentType)},showAndResizeESignature:function(e){var t=$(“id_”+e);t&&JotForm.isVisible(t)&&t.select(“.pad”).length>0&&t.select(“.pad”).first().fire(“on:sigresize”)},hideField:function(e,t,o){if(!JotForm.otherConditionTrue(e,”show”)){var r=”id_”;$(“cid_”+e)&&!$(“id_”+e)&&(r=”cid_”),$(“cid_”+e)&&$(“section_”+e)&&(r=”section_”);var n=$(r+e);if(n){if(n.addClassName(“form-field-hidden”),JotForm.paymentFields.indexOf(n.getAttribute(“data-type”))>-1&&!$(“hiddenPaymentField”)&&$$(“form”)[0].insert(new Element(“input”,{type:”hidden”,name:”hiddenPaymentField”,id:”hiddenPaymentField”,value:1})),”control_paypalSPB”===n.getAttribute(“data-type”)&&$$(‘[data-paypal-button=”Yes”]’)[0]){var a=$$(“.paypal-buttons.paypal-buttons-context-iframe”)[0];if(a){var i=JotForm.getContainer(a);i&&i.setAttribute(“paypal-button-status”,”hide”)}}if(“enable”==JotForm.clearFieldOnHide&&!o&&!JotForm.ignoreInsertionCondition)try{JotForm.clearField(e)}catch(e){console.log(e)}return n.style.setProperty?n.style.setProperty(“display”,”none”,”important”):n.hide(),JotForm.donationField&&n.down(‘[data-component=”paymentDonation”][data-custom-amount-field]’)&&JotForm.updateDonationAmount(0),JotForm.corrected(n),n}var s=$$(‘input[name*=”q’+e+'”][type=”hidden”]’);s.length>0&&s[0].setAttribute(“selected”,!1)}},clearField:function(e,t,o){var r=JotForm.calculationType(e);if(r){var n=”input_”+e in JotForm.defaultValues?JotForm.defaultValues[“input_”+e]:””;if(“collapse”!=r){if(“matrix”===r&&t&&$(t))$(t).value=””,!o&&$(t).triggerEvent&&$(t).triggerEvent(“keyup”);else if(“matrix”===r){if($(“id_”+e).select(‘input[type=”text”], input[type=”tel”], input[type=”number”]’).each(function(e){e.value=e.id in JotForm.defaultValues?JotForm.defaultValues[e.id]:””}),$(“id_”+e).select(‘input[type=”radio”], input[type=”checkbox”]’).each(function(e){JotForm.defaultValues[e.id]||(e.checked=!1)}),$(“id_”+e).select(“select”).each(function(e){e.id in JotForm.defaultValues?e.value=JotForm.defaultValues[e.id]:e.selectedIndex=0}),0===$(“id_”+e).select(“input, select”).length)return;var a=$(“id_”+e).select(“input, select”).first();if(a&&a.triggerEvent)”input”===a.nodeName.toLowerCase()?”checkbox”===a.type||”radio”===a.type?a.up().triggerEvent(“click”):a.triggerEvent(“keyup”):a.triggerEvent(“change”)}else if([“address”,”combined”,”datetime”,”time”].include(r)){“control_mixed”===$(“id_”+e).readAttribute(“data-type”)?$(“id_”+e).select(“.jfField”).each(function(e){if(“mixed-dropdown”===e.readAttribute(“data-type”)){var t=e.querySelector(“select”).id;e.querySelector(“input”)&&(e.querySelector(“input”).value=t in JotForm.defaultValues?JotForm.defaultValues[t]:””)}}):$(“id_”+e).select(“input”).each(function(e){e.value=e.id in JotForm.defaultValues?JotForm.defaultValues[e.id]:””}),$(“id_”+e).select(“select”).each(function(e){e.id in JotForm.defaultValues?e.value=JotForm.defaultValues[e.id]:e.selectedIndex=0});var i=$(“input_”+e)?$(“input_”+e):$(“id_”+e).select(“input”).first();i&&i.triggerEvent&&i.triggerEvent(“keyup”),$(“input_”+e+”_full”)&&”true”==$(“input_”+e+”_full”).readAttribute(“data-masked”)&&JotForm.setQuestionMasking(“#input_”+e+”_full”,”textMasking”,$(“input_”+e+”_full”).readAttribute(“maskValue”))}else if([“braintree”,”stripe”,”paypalpro”,”authnet”].include(r))$(“id_”+e).select(‘input[type=”text”], .form-address-country’).each(function(e){e.value=e.id in JotForm.defaultValues?JotForm.defaultValues[e.id]:””});else if(“html”===r)try{$(“id_”+e).select(“.replaceTag”).each(function(e){var t=e.readAttribute(“default”);e.update(t)})}catch(e){console.log(e)}else if(“textarea”==r){$(“input_”+e).value=n,$(“input_”+e).triggerEvent&&!o&&$(“input_”+e).triggerEvent(“keyup”),$(“input_”+e).showCustomPlaceHolder&&$(“input_”+e).showCustomPlaceHolder();var s=$(“id_”+e).down(“.nicEdit-main”);s&&(s.innerHTML=n,$(“input_”+e).hasClassName(“custom-hint-group”)&&!$(“input_”+e).hasContent&&s.setStyle({color:”#babbc0”}))}else if(“checkbox”==r||”radio”==r)$(“id_”+e).select(‘input[type=”radio”], input[type=”checkbox”]’).each(function(e){e.id in JotForm.defaultValues?e.checked=!0:e.checked=!1}),$(“id_”+e).triggerEvent&&!o&&$(“id_”+e).triggerEvent(“click”);else if(“select”==r)$(“input_”+e)?($(“input_”+e).value=n,$(“input_”+e).triggerEvent&&!o&&$(“input_”+e).triggerEvent(“change”)):$(“id_”+e).select(“select”).each(function(e){“mixed-dropdown”!==e.readAttribute(“data-component”)&&(e.value=””,e.triggerEvent&&!o&&e.triggerEvent(“change”))});else if($(“input_”+e)){if($(“input_”+e).value=n,$(“input_”+e).triggerEvent&&!o)if(“widget”==r){var l=$(“input_”+e);l.fire(“widget:clear”,{qid:parseInt(l.id.split(“_”)[1])}),l.triggerEvent(“change”)}else $(“input_”+e).triggerEvent(“keyup”);””===n&&$(“input_”+e).hintClear&&$(“input_”+e).hintClear(),”true”==$(“input_”+e).readAttribute(“data-masked”)&&JotForm.setQuestionMasking(“#input_”+e,”textMasking”,$(“input_”+e).readAttribute(“maskValue”)),$(“input_”+e).hasClassName(“form-star-rating”)&&$(“input_”+e).setRating&&$(“input_”+e).setRating(0)}}else $(“section_”+e).select(“.form-line”).each(function(e){var t=e.id.replace(“id_”,””);JotForm.clearField(t)})}},checkValueByOperator:function(e,t,o){try{“string”==typeof t&&t.indexOf(“{“)>-1&&t.indexOf(“}”)>-1&&(t=t.replace(/{.*?}/gi,function(e,t,o,r){var n=e.replace(/[{}]/g,””),a=$$(‘input[name$=”_’+n+'”]’);if(a.length>0){var i=a.first();if(i&&i.value)return i.value}return e}))}catch(e){console.log(e)}var r=Object.isBoolean(o)?o:o.toString().strip().toLowerCase(),n=Object.isBoolean(t)?t:t.toString().strip().toLowerCase();switch(e){case”equals”:case”quantityEquals”:case”equalDate”:return r==n;case”equalDay”:return JotForm.getDayOfWeek(r)==n;case”notEquals”:case”notEqualDate”:case”quantityNotEquals”:return r!=n;case”notEqualDay”:return JotForm.getDayOfWeek(r)!=n;case”endsWith”:return r.endsWith(n);case”notEndsWith”:return!r.endsWith(n);case”startsWith”:return r.startsWith(n);case”notStartsWith”:return!r.startsWith(n);case”contains”:return condValues=n.split(“,”),$A(condValues).any(function(e){return r.include(e.replace(/^s+|s+$/g,””))});case”notContains”:return condValues=n.split(“,”),!$A(condValues).any(function(e){return r.include(e.replace(/^s+|s+$/g,””))});case”greaterThan”:case”quantityGreater”:return(parseFloat(r,10)||0)>(parseFloat(n,10)||0);case”lessThan”:case”quantityLess”:return!!r.length&&(parseFloat(r,10)||0)t;default:JotForm.error(“Could not find this operator”,e)}return!1},getDayOfWeek:function(e){return[“sunday”,”monday”,”tuesday”,”wednesday”,”thursday”,”friday”,”saturday”][(e=new Date(e)).getDay()]},typeCache:{},getInputType:function(e){if(JotForm.typeCache[e])return JotForm.typeCache[e];if(“string”==typeof e&&e.indexOf(“|”)>-1){var t=e.split(“|”);e=t[0]+”_field_”+t[1]}var o=”other”;if($(“id_”+e)&&”control_text”==$(“id_”+e).readAttribute(“data-type”))o=”html”;else if($(“input_”+e+”_pick”)||$(“id_”+e)&&”control_datetime”==$(“id_”+e).readAttribute(“data-type”))o=”datetime”;else if($(“input_”+e))o=”input”==$(“input_”+e).nodeName.toLowerCase()?$(“input_”+e).readAttribute(“type”).toLowerCase():$(“input_”+e).nodeName.toLowerCase(),$(“input_”+e).hasClassName(“form-radio-other-input”)&&(o=”radio”),$(“input_”+e).hasClassName(“js-forMixed”)&&(o=”mixed”),$(“input_”+e).hasClassName(“form-checkbox-other-input”)&&(o=”checkbox”),$(“input_”+e).hasClassName(“form-autocomplete”)&&(o=”autocomplete”),$$(“#id_”+e+” .pad”).length>0&&(o=”signature”),$(“input_”+e).hasClassName(“form-slider”)&&(o=”slider”),$(“input_”+e).hasClassName(“form-widget”)&&(o=”widget”),$(“input_”+e).hasClassName(“form-star-rating”)&&(o=”rating”);else if($(“input_”+e+”_month”))o=”birthdate”;else if($(“input_”+e+”_hourSelect”))o=”time”;else{if($(“cid_”+e)&&”control_collapse”==$(“cid_”+e).getAttribute(“data-type”))return”collapse”;$$(“#id_”+e+” .form-product-item”).length>0?o=$$(“#id_”+e+” .form-product-item”)[0].select(“input”)[0].readAttribute(“type”).toLowerCase():$$(“#id_”+e+” .form-address-table”).length>0?o=”address”:$$(“input[id^=input_”+e+”_]”)[0]&&$$(“input[id^=input_”+e+”_]”)[0].hasClassName(“form-grading-input”)?o=”grading”:$$(“#id_”+e+” input”)[0]?”text”!=(o=$$(“#id_”+e+” input”)[0].readAttribute(“type”).toLowerCase())&&”tel”!=o&&”number”!==o||(o=”combined”):$$(“#id_”+e+” select”)[0]&&(o=”select”)}return JotForm.typeCache[e]=o,o},strToDate:function(e){var t=new Date(void 0),o=/(d{4})-(d{2})-(d{2})T?(d{2})?:?(d{2})?/gim;if(e.empty())return t;if(!o.test(e))return t;var r=new Date;return e.replace(o,function(e,t,o,n,a,i){return r=a?new Date(parseInt(t,10),parseInt(o,10)-1,parseInt(n,10),parseInt(a,10),parseInt(i,10)):new Date(parseInt(t,10),parseInt(o,10)-1,parseInt(n,10)),e}),r},getBirthDate:function(e){var t=$(“input_”+e+”_day”).getValue()||”%empty%”,o=$(“input_”+e+”_month”).selectedIndex||”%empty%”;o=String(o);var r=($(“input_”+e+”_year”).getValue()||”%empty%”)+”-“+(1==o.length?”0″+o:o)+”-“+(1==t.length?”0″+t:t);return r.include(“%empty%”)?””:r},get24HourTime:function(e){var t=$(“input_”+e+”_hourSelect”).getValue();if(“”==t)return””;var o=$(“input_”+e+”_minuteSelect”).getValue();0==o.length&&(o=”00″);var r=$(“input_”+e+”_ampm”)?$(“input_”+e+”_ampm”).getValue():””;return t=Number(t),”PM”==r&&12!=t?t+=12:”AM”==r&&12==t&&(t=0),(t=t1?$(“month_”+e).value:”0″+$(“month_”+e).value:”%empty%”));$(“day_”+e)&&(t+=”-“+($(“day_”+e).value?$(“day_”+e).value.length>1?$(“day_”+e).value:”0″+$(“day_”+e).value:”%empty%”));if(t.include(“%empty%”))return JotForm.info(“Wrong date: “+t),””;var o=””;return $(“ampm_”+e)?$(“hour_”+e)&&(o=$(“hour_”+e).value,”pm”==$(“ampm_”+e).value&&(o=parseInt(o,10)+12),”24″==o&&(o=0),t+=”T”+((1==o.length?”0″+o:o)||”00”)):$(“hour_”+e)&&(t+=”T”+((1==(o=$(“hour_”+e).value).length?”0″+o:o)||”00”)),$(“min_”+e)&&(t+=”:”+($(“min_”+e).value||”00″)),””===o&&(t+=”T00:00″),t},hidePages:{},checkCondition:function(e){var t,o=!1,r=!0,n={notEquals:[],equals:[],equalsCount:0,notEqualsCount:0};$A(e.terms).each(function(a){var i,s=JotForm.getFieldIdFromFieldRef(a.value);a.field=String(a.field);try{var l=JotForm.getInputType(a.field);switch(l){case”combined”:if([“isEmpty”,”isFilled”].include(a.operator))return t=$$(“#id_”+a.field+” input”).collect(function(e){return e.value}).any(),void(JotForm.checkValueByOperator(a.operator,a.value,t)?o=!0:r=!1);i=$$(“#id_”+a.field+” input”).collect(function(e){return e.value}),JotForm.checkValueByOperator(a.operator,a.value,i)?o=!0:r=!1;break;case”address”:if([“isEmpty”,”isFilled”].include(a.operator))t=$$(“#id_”+a.field+” input”).collect(function(e){return e.value}).any(),JotForm.checkValueByOperator(a.operator,a.value,t)?o=!0:r=!1;else{var u=a.value;s&&(u=$(“input_”+s+”_country”).value),$(“input_”+a.field+”_country”).select(“option”).each(function(e){if(u===e.value)throw y=e,$break}),y&&(“equalCountry”==a.operator?y.selected?o=!0:r=!1:”notEqualCountry”==a.operator&&(y.selected?r=!1:o=!0))}break;case”birthdate”:case”datetime”:if(void 0===(i=”datetime”==l?JotForm.getDateValue(a.field):JotForm.getBirthDate(a.field)))return;if([“isEmpty”,”isFilled”].include(a.operator))JotForm.checkValueByOperator(a.operator,a.value,i)?o=!0:r=!1;else{u=a.value;if((u=a.value.toLowerCase().replace(/s/g,””)).indexOf(“today”)>-1){var d=parseInt(u.split(“today”)[1])||0,c=new Date;c.setDate(c.getDate()+d);var m=c.getFullYear();f=(f=c.getMonth()+1)”).replace(/0&&y[0].selected?o=!0:r=!1;else if(“notEquals”==a.operator){var y;(y=$(g).select(“option[value=”+a.value+”]”)).length>0&&!y[0].selected?o=!0:r=!1}else if([“isEmpty”,”isFilled”].include(a.operator)){for(var b=!1,F=$(g).options,_=0;_0?$(“id_”+a.field).select(“.qq-upload-file”).length>0:$(“input_”+a.field).uploadMarked?$(“input_”+a.field).uploadMarked:$(“input_”+a.field).value))return;JotForm.checkValueByOperator(a.operator,a.value,i,a.field)?o=!0:r=!1;break;case”textarea”:if(i=$(“input_”+a.field).value,($(“input_”+a.field).hinted||$(“input_”+a.field).hasClassName(“form-custom-hint”))&&(i=””),void 0===i)return;$(“id_”+a.field).down(“.nicEdit-main”)&&(i=i.stripTags().replace(/s/g,” “).replace(/ /g,” “)),JotForm.checkValueByOperator(a.operator,a.value,i,a.field)?o=!0:r=!1;break;case”widget”:if(void 0===(i=$(“input_”+a.field).value))return;if(i.indexOf(“widget_metadata”)>-1)try{i=JSON.parse(i).widget_metadata.value;var w=!1;for(_=0;_-1)g=”input_”+(E=a.field.split(“|”))[0]+”_field_”+E[1];else g=”input_”+a.field;if(!$(g))return;if(i=$(g).value,$(g).hinted&&(i=””),void 0===i)return;JotForm.checkValueByOperator(a.operator,a.value,i,a.field)?o=!0:r=!1}}catch(e){JotForm.error(e)}}),”any”==e.link.toLowerCase()&&o&&e.terms.length==n.notEqualsCount+n.equalsCount&&(anyLengthNotEquals=n.notEquals.reduce(function(e,t){return t||e++,e},0),anyLengthEquals=n.equals.reduce(function(e,t){return t&&e++,e},0),(n.equalsCount&&!anyLengthEquals||n.notEqualsCount&&anyLengthNotEquals&&anyLengthNotEquals===n.notEqualsCount)&&(o=!1));if(!function(){var t=(new Date).getTime(),o=t%1e3;o=o19)return!0}else window.__antiConditionLoopCache[n]=1;return!1}()){if(“field”==e.type){var a=”any”==e.link.toLowerCase()&&o||”all”==e.link.toLowerCase()&&r;if(1==e.disabled)return;e.action.each(function(t){var o=e.terms.any(function(e){return e.field==t.field});a?(t.currentlyTrue=!0,”show”==t.visibility.toLowerCase()?JotForm.showField(t.field):”hide”==t.visibility.toLowerCase()?JotForm.hideField(t.field,!1,o):”showmultiple”==t.visibility.toLowerCase()&&t.fields?t.fields.each(function(e){JotForm.showField(e,!0)}):”hidemultiple”==t.visibility.toLowerCase()&&t.fields&&t.fields.each(function(e){JotForm.hideField(e,!0,o)})):(t.currentlyTrue=!1,”show”==t.visibility.toLowerCase()?JotForm.hideField(t.field,!1,o):”hide”==t.visibility.toLowerCase()?JotForm.showField(t.field):”showmultiple”==t.visibility.toLowerCase()&&t.fields?t.fields.each(function(e){JotForm.hideField(e,!0,o)}):”hidemultiple”==t.visibility.toLowerCase()&&t.fields&&t.fields.each(function(e){JotForm.showField(e,!0)})),”cardform”!==window.FORM_MODE&&JotForm.iframeHeightCaller(),($(“section_”+t.field)||”fields”in t)&&JotForm.runAllCalculations(!0),$(“input_”+t.field)&&$(“input_”+t.field).triggerEvent&&!o&&$(“input_”+t.field).className.indexOf(“-other-“)-1){var l=i.split(“|”);i=”input_”+l[0]+”_field_”+l[1],s=$(i)}if(!s)return;for(var u=JotForm.calculations,d=0;d0&&”hidePage”===e.action.first().skipHide){var c=e.action.first();return void(“cardform”==window.FORM_MODE?”any”==e.link.toLowerCase()&&o||”all”==e.link.toLowerCase()&&r?JotForm.hideField(c.skipTo):JotForm.showField(c.skipTo):”any”==e.link.toLowerCase()&&o||”all”==e.link.toLowerCase()&&r?JotForm.hidePages[parseInt(c.skipTo.replace(“page-“,””),10)]=!0:JotForm.hidePages[parseInt(c.skipTo.replace(“page-“,””),10)]=!1)}if(JotForm.nextPage)return;if(“any”==e.link.toLowerCase()&&o||”all”==e.link.toLowerCase()&&r){var m;c=e.action[0];if(m=”cardform”==window.FORM_MODE?$$(“.form-all > .form-line”):$$(“.form-all > .page-section”),”cardform”==window.FORM_MODE)if(“end”==c.skipTo)JotForm.nextPage=m[m.length-1];else try{var p=window.CardLayout.layoutParams.allQuestions,f=p.findIndex(function(e){return e.id===c.skipTo||e.id===c.skipTo.replace(“page-“,””)});for(d=f;d

-1}))}catch(e){console.log(e)}else”end”==c.skipTo?JotForm.nextPage=m[m.length-1]:JotForm.nextPage=m[parseInt(c.skipTo.replace(“page-“,””),10)-1];if($$(‘[data-type=”control_paypalSPB”]’)[0]&&$$(‘[data-paypal-button=”Yes”]’)[0]){var h=JotForm.getSection($$(‘[data-type=”control_paypalSPB”]’)[0]).pagesIndex,v=JotForm.currentSection.pagesIndex,g=JotForm.nextPage.pagesIndex;if(h>v&&hg){var y=$$(“.paypal-buttons.paypal-buttons-context-iframe”)[0],b=JotForm.getContainer(y);y&&b&&b.setAttribute(“paypal-button-status”,”hide”)}}}else JotForm.info(“Fail: Skip To: page-“+JotForm.currentPage+1),JotForm.nextPage=!1}if(JotForm.nextPage&&JotForm.isEditMode()&&”cardform”!==window.FORM_MODE){var F=$$(“.page-section”).indexOf(JotForm.currentSection);JotForm.nextPage=(“any”==e.link.toLowerCase()?!e.terms.every(function(e){return $$(“.page-section”).indexOf($(“id_”+e.field).up(“.page-section”))>F}):!e.terms.some(function(e){return $$(“.page-section”).indexOf($(“id_”+e.field).up(“.page-section”))>F}))&&JotForm.nextPage}JotForm.enableDisableButtonsInMultiForms()}},currentPage:!1,nextPage:!1,previousPage:!1,fieldConditions:{},setFieldConditions:function(e,t,o){var r=””;if(e.indexOf(“|”)>-1){var n=e.split(“|”);r=n[0]+”_field_”+n[1]}else r=e;JotForm.fieldConditions[r]||(JotForm.fieldConditions[r]={event:t,conditions:[]}),JotForm.fieldConditions[r].conditions.push(o)},widgetsAsCalculationOperands:[],requireField:function(e,t){if($(“id_”+e)&&!JotForm.otherConditionTrue(e,t?”unrequire”:”require”)){$$(“#id_”+e+” input, #id_”+e+” textarea, #id_”+e+” select”).each(function(o){if(!(“coupon-input”===o.id||”hidden”===o.type&&!o.up(“.form-star-rating”)&&!o.hasClassName(“form-widget”)||o.hasClassName(“form-checkbox-other-input”)||o.hasClassName(“form-radio-other-input”)||o.hasClassName(“jfModal-input”)||$A([“prefix”,”middle”,”suffix”,”addr_line2″]).any(function(e){return o.name.indexOf(“[“+e+”]”)>-1})||o.hasClassName(“jfDropdown-search”))){var r=[];if(r=o.className.indexOf(“validate[“)>-1?(r=o.className.substr(o.className.indexOf(“validate[“)+9)).substr(0,r.indexOf(“]”)).split(/s*,s*/):[],”file”==JotForm.getInputType(e)&&”multiple”==o.getAttribute(“multiple”)&&o.up(“[class*=validate[multipleUpload]]”)){var n=o.up(“[class*=validate[multipleUpload]]”);n.className=n.className.replace(/validate[required]/gi,””),t?n.addClassName(“validate[required]”):n.removeClassName(“form-validation-error”)}o.className=o.className.replace(/validate[.*]/,””);for(var a=r.length-1;a>=0;a–)”required”===r[a]&&r.splice(a,1);t?(r.push(“required”),o.hasClassName(“form-widget”)&&o.addClassName(“widget-required”)):(o.removeClassName(“form-validation-error”),o.removeClassName(“widget-required”)),r.length>0&&o.addClassName(“validate[“+r.join(“,”)+”]”),JotForm.setFieldValidation(o)}});var o=$$(“div.pad#sig_pad_”+e)[0];o&&(o.setAttribute(“data-required”,t),o.className=o.className.replace(“validate[required]”,””).trim(),t&&(o.className=o.className+” validate[required]”)),t?$(“label_”+e)&&!$(“label_”+e).down(“.form-required”)&&$(“label_”+e).insert(‘*’):($(“label_”+e)&&$(“label_”+e).down(“.form-required”)&&$(“label_”+e).down(“.form-required”).remove(),$(“id_”+e).down(“.form-error-message”)&&$(“id_”+e).down(“.form-error-message”).remove(),$(“id_”+e).removeClassName(“form-line-error”),0==$$(“.form-line-error”).length&&JotForm.hideButtonMessage())}},enableDisableField:function(e,t){if($(“id_”+e))try{$(“id_”+e).select(“input, textarea, select, button”).each(function(o){if(t){if(o.removeClassName(“conditionallyDisabled”),!JotForm.isEditMode())return void o.enable();switch(o.tagName){case”SELECT”:$$(“#”+o.id+” > option”).each(function(e){e.enable()});break;default:o.removeAttribute(“readonly”),o.enable()}}else if(o.addClassName(“conditionallyDisabled”),JotForm.isEditMode())switch(o.tagName){case”SELECT”:$$(“#”+o.id+” > option:not(:selected)”).each(function(e){e.disable()});break;case”INPUT”:([“checkbox”,”radio”].include(o.type)&&!o.checked||”file”===o.type||[“year_”+e,”month_”+e,”day_”+e,”lite_mode_”+e].include(o.id))&&o.disable();default:o.setAttribute(“readonly”,””)}else o.disable()})}catch(e){console.log(e)}},triggerWidgetCalculation:function(e){if(JotForm.widgetsAsCalculationOperands.include(e))if(document.createEvent){var t=document.createEvent(“HTMLEvents”);t.initEvent(“change”,!0,!0),$(“input_”+e).dispatchEvent(t)}else if($(“input_”+e).fireEvent)return $(“input_”+e).fireEvent(“onchange”)},setCalculationResultReadOnly:function(){$A(JotForm.calculations).each(function(e,t){e.readOnly&&”0″!=e.readOnly&&null!=$(“input_”+e.resultField)&&$(“input_”+e.resultField).setAttribute(“readOnly”,”true”)})},setCalculationEvents:function(){var e=function(e,t,o){$(e).observe(t,function(){“paste”===t?setTimeout(function(){e.addClassName(“calculatedOperand”),JotForm.checkCalculation(o)},10):(e.addClassName(“calculatedOperand”),JotForm.checkCalculation(o))})};$A(JotForm.calculations).each(function(t,o){if(t.operands)for(var r=t.operands.split(“,”),n=0;n-1&&(i=”input_”+a.split(“|”)[0]+”_field_”+a.split(“|”)[1]),a&&!a.empty()&&($(“id_”+a)||$(i)))switch(JotForm.calculationType(a)){case”mixed”:e($(i),”change”,t),e($(i),”blur”,t),e($(i),”keyup”,t),e($(i),”paste”,t);break;case”widget”:e($(“id_”+a),”change”,t),JotForm.widgetsAsCalculationOperands.push(a);break;case”radio”:case”checkbox”:e($(“id_”+a),”click”,t),$(“input_”+a)&&e($(“id_”+a),”keyup”,t);break;case”select”:case”file”:Protoplus&&Protoplus.getIEVersion&&8==Protoplus.getIEVersion()?e($(“id_”+a),”click”,t):e($(“id_”+a),”change”,t);break;case”datetime”:e($(“id_”+a),”date:changed”,t),$$(“#id_”+a+” select”).each(function(o){e($(o),”change”,t)});break;case”time”:case”birthdate”:$$(“#id_”+a+” select”).each(function(o){e($(o),”change”,t)});break;case”address”:e($(“id_”+a),”change”,t),e($(“id_”+a),”blur”,t),e($(“id_”+a),”keyup”,t),$$(“#id_”+a+” select”).each(function(o){e($(o),”change”,t)});break;case”number”:e($(“id_”+a),”keyup”,t),e($(“id_”+a),”paste”,t),e($(“id_”+a),”click”,t);break;default:e($(“id_”+a),”change”,t),e($(“id_”+a),”blur”,t),e($(“id_”+a),”keyup”,t),e($(“id_”+a),”paste”,t)}}})},runAllCalculations:function(e,t){$A(JotForm.calculations).each(function(o,r){t&&”html”!==JotForm.getInputType(o.resultField)||(!e||o.readOnly&&”0″!=o.readOnly)&&o.equation&&JotForm.checkCalculation(o)})},calculationType:function(e){return $(“id_”+e)&&$(“id_”+e).readAttribute(“data-type”)&&[“control_stripe”,”control_stripeACH”,”control_stripeACHManual”,”control_paymill”,”control_payment”,”control_paymentwall”,”control_paypal”,”control_paypalexpress”,”control_paypalpro”,”control_clickbank”,”control_2co”,”control_googleco”,”control_worldpay”,”control_onebip”,”control_authnet”,”control_dwolla”,”control_braintree”,”control_square”,”control_boxpayment”,”control_eway”,”control_bluepay”,”control_firstdata”,”control_paypalInvoicing”,”control_payjunction”,”control_chargify”,”control_cardconnect”,”control_echeck”,”control_bluesnap”,”control_payu”,”control_pagseguro”,”control_moneris”,”control_sofort”,”control_skrill”,”control_payoneer”,”control_paysafe”,”control_gocardless”,”control_paypalSPB”].include($(“id_”+e).readAttribute(“data-type”))?$(“id_”+e).readAttribute(“data-type”).replace(“control_”,””):$(“id_”+e)&&”control_matrix”==$(“id_”+e).readAttribute(“data-type”)?”matrix”:JotForm.getInputType(e)},checkCalculation:function(e){if(!e.resultField||e.hasOwnProperty(“conditionTrue”)&&!e.conditionTrue)return””;var t=e.resultField,o=!1;t.indexOf(“|”)>-1&&(o=”input_”+t.split(“|”)[0]+”_field_”+t.split(“|”)[1]);var r=!(!e.showBeforeInput||”0″==e.showBeforeInput)&&e.showBeforeInput,n=!(!e.ignoreHiddenFields||”0″==e.ignoreHiddenFields)&&e.ignoreHiddenFields,a=!(!e.useCommasForDecimals||”0″==e.useCommasForDecimals)&&e.useCommasForDecimals;if($(“id_”+t)||$(o)){try{if(![“text”,”email”,”textarea”,”calculation”,”combined”,”address”,”datetime”,”time”,”html”,”authnet”,”paypalpro”,”number”,”radio”,”checkbox”,”select”,”matrix”,”widget”,”signature”,”braintree”,”stripe”,”square”,”eway”,”bluepay”,”firstdata”,”chargify”,”echeck”,”payu”,”pagseguro”,”moneris”,”paypal”,”dwolla”,”bluesnap”,”paymentwall”,”payment”,”paypalexpress”,”payjunction”,”2co”,”cardconnect”,”clickbank”,”onebip”,”worldpay”,”rating”,”hidden”,”file”,”other”,”mixed”,”sofort”,”payoneer”,”paysafe”,”gocardless”,”stripeACH”,”paypalSPB”].include(JotForm.calculationType(t)))return}catch(e){console.log(e)}var i={},s=function(o,s){var l=””;o.indexOf(“_”)>-1&&(l=o.substring(o.indexOf(“_”)),o=o.substring(0,o.indexOf(“_”)));var u=!1;if(o.indexOf(“|”)>-1&&(u=!0),0==u){if(!$(“id_”+o))return””;if(!$(“id_”+o).hasClassName(“calculatedOperand”)&&r)return””;if(n&&($(“id_”+o).hasClassName(“form-field-hidden”)||$(“id_”+o).up(“.form-section”)&&$(“id_”+o).up(“.form-section”).hasClassName(“form-field-hidden”)))return s?0:””}var d=JotForm.calculationType(o),c=””;switch(d){case”matrix”:if($(“id_”+o).down(“.form-radio”))$$(‘input[id^=”input_’+o+l+’_”]’).each(function(e){e.checked&&(c=e.readAttribute(“data-calcvalue”)?e.readAttribute(“data-calcvalue”):e.value)});else if($(“input_”+o+l))if(“checkbox”==$(“input_”+o+l).type){if($(“input_”+o+l).checked){var m=$(“input_”+o+l);c=m.readAttribute(“data-calcvalue”)?m.readAttribute(“data-calcvalue”):m.value}}else c=$(“input_”+o+l).value;break;case”mixed”:var p;o.indexOf(“|”)>-1&&(v=(p=o.split(“|”))[0],g=p[1]),(h=$(“input_”+v+”_field_”+g))&&void 0!==h.value&&(c=h.value);break;case”2co”:case”authnet”:case”bluepay”:case”bluesnap”:case”boxpayment”:case”braintree”:case”cardconnect”:case”chargify”:case”clickbank”:case”dwolla”:case”echeck”:case”eway”:case”firstdata”:case”gocardless”:case”googleco”:case”moneris”:case”onebip”:case”pagseguro”:case”payjunction”:case”payment”:case”paymill”:case”paysafe”:case”payoneer”:case”paypal”:case”paypalexpress”:case”paypalSPB”:case”paypalpro”:case”payu”:case”square”:case”sofort”:case”stripe”:case”stripeACH”:case”wepay”:case”worldpay”:$(“id_”+o).down(“#payment_total”)?c=$(“id_”+o).down(“#payment_total”).innerHTML:$(“input_”+o+”_donation”)&&(c=$(“input_”+o+”_donation”).value),JotForm.currencyFormat&&”,”===JotForm.currencyFormat.dSeparator&&(c=c.replace(/./g,””).replace(/,/g,”.”));break;case”radio”:$$(“#id_”+o+’ input[type=”radio”]’).each(function(e,t){if(e.checked)if(e.readAttribute(“data-calcvalue”))c=e.readAttribute(“data-calcvalue”);else{var o=JotForm.getOptionOtherInput(e);”undefined”!=typeof FormTranslation&&o&&o.innerText?c=JotForm.getOptionOtherInput(e).innerText:(c=e.value,”undefined”!=typeof FormTranslation&&(c=FormTranslation.translate(c)))}});break;case”checkbox”:var f=[];$$(“#id_”+o+’ input[type=”checkbox”]’).each(function(e,t){e.checked&&(e.readAttribute(“data-calcvalue”)?f.push(e.readAttribute(“data-calcvalue”)):”undefined”!=typeof FormTranslation?f.push(FormTranslation.translate(e.value)):f.push(e.value))}),c=s?f.inject(0,function(e,t){return e+(parseFloat(t.replace(/-?([^0-9])/g,”$1″).replace(/[^0-9.-]/g,””))||0)}):f.join();break;case”select”:var h;if(s&&(c=0),o.indexOf(“|”)>-1){var v=(p=o.split(“|”))[0],g=p[1];h=$(“input_”+v+”_field_”+g)}else h=$(“input_”+o);h.select(“option”).each(function(t,o){if((t=h.options[o])&&t.selected){var r=!t.readAttribute(“data-calcvalue”)||e.hasOwnProperty(“insertAsText”)&&(!e.hasOwnProperty(“insertAsText”)||0!=e.insertAsText&&”0″!==e.insertAsText)?function(e){return e.textContent?e.textContent.replace(/^s+|s+$/g,””):e.innerText.replace(/^s+|s+$/g,””)}(t):t.readAttribute(“data-calcvalue”);s?/d/.test(r)?c+=””===r?0:parseFloat(r.replace(/[^-0-9.]/g,””)):c+=0:c+=r}});break;case”number”:if($$(“#id_”+o+’ input[type=”number”]’).length>1){f=[];$$(“#id_”+o+’ input[type=”number”]’).each(function(e){f.push(e.value)}),c=f.join(” “)}else $(“input_”+o).value.empty()||isNaN($(“input_”+o).value)||(c=parseFloat($(“input_”+o).value));break;case”combined”:case”grading”:f=[];i={},$$(“#id_”+o+’ input[type=”text”]’).each(function(e){e.value.empty()||f.push(e.value);var t=e.id.replace(/_.*/,””);i[t]=e.value}),$$(“#id_”+o+’ input[type=”tel”]’).each(function(e){e.value.empty()||f.push(e.value);var t=e.id.replace(/input_[0-9].*_+/,””);i[t]=e.value}),c=f.join(” “);break;case”datetime”:f=[];if(s?(f.push($(“month_”+o).value),f.push($(“day_”+o).value),f.push($(“year_”+o).value)):($$(“#id_”+o+’ input[type=”tel”]’).each(function(e){f.push(e.value);var t=e.id.replace(/_.*/,””);i[t]=e.value}),$$(“#id_”+o+” select”).each(function(e){var t=e.id.replace(/_.*/,””);i[t]=e.value})),$$(“#id_”+o+” select”).each(function(e){f.push(e.value)}),s)if(f[0].empty()||f[1].empty()||f[2].empty())c=0;else{var y=x=E=””;f.length>4&&!f[3].empty()&&!f[4].empty()&&(y=parseInt(f[3]),6!=f.length||f[5].empty()||(“PM”==(E=f[5])&&12!=y?y+=12:”AM”==E&&12==y&&(y=0)),x=f[4]);var b=Date.UTC(f[2],f[0]-1,f[1],y,x);c=b/60/60/24/1e3}else{if(f.length>2&&!f[0].empty()&&!f[1].empty()&&!f[0].empty()){var F=”/”,_=$$(“#id_”+o+” span[class=date-separate]”).first();_&&(F=_.innerHTML.replace(/[^/-.]/g,””)),c=f[0]+F+f[1]+F+f[2]}f.length>4&&!f[3].empty()&&!f[4].empty()&&(c+=” “+f[3]+”:”+f[4],6!=f.length||f[5].empty()||(c+=” “+f[5]))}break;case”time”:if($(“until_”+o)&&$(“duration_”+o+”_ampmRange”)){if(s){var w=$(“duration_”+o+”_ampmRange”).value;if(w.indexOf(“:”)>-1){var C=w.split(“:”),x=(y=C[0]||0,C[1]||0);b=Date.UTC(“1970″,”0″,”1”,y,x);c=b/60/60/1e3}}else c=$(“duration_”+o+”_ampmRange”).value;break}f=[];if(i={},s){$$(“#id_”+o+” select”).each(function(e){f.push(e.value)});var E=””;y=parseInt(f[0])||0,3!=f.length||f[2].empty()||(“PM”==(E=f[2])&&12!=y?y+=12:”AM”==E&&12==y&&(y=0)),x=f[1];b=Date.UTC(“1970″,”0″,”1”,y,x);c=b/60/60/1e3}else $(“input_”+o+”_hourSelect”)&&!$(“input_”+o+”_hourSelect”).value.empty()&&$(“input_”+o+”_minuteSelect”)&&!$(“input_”+o+”_minuteSelect”).value.empty()&&(c=$(“input_”+o+”_hourSelect”).value+”:”+$(“input_”+o+”_minuteSelect”).value,$(“input_”+o+”_ampm”)&&(c+=” “+$(“input_”+o+”_ampm”).value)),$(“input_”+o+”_hourSelectRange”)&&!$(“input_”+o+”_hourSelectRange”).value.empty()&&$(“input_”+o+”_minuteSelectRange”)&&!$(“input_”+o+”_minuteSelectRange”).value.empty()&&(c+=” – “+$(“input_”+o+”_hourSelectRange”).value+”:”+$(“input_”+o+”_minuteSelectRange”).value,$(“input_”+o+”_ampmRange”)&&(c+=” “+$(“input_”+o+”_ampmRange”).value),$(“duration_”+o+”_ampmRange”)&&!$(“duration_”+o+”_ampmRange”).value.empty()&&(c+=” (“+$(“duration_”+o+”_ampmRange”).value+”)”)),$$(“#id_”+o+” select”).each(function(e){var t=e.id.replace(/.*_.*_/,””);i[t]=e.value});break;case”birthdate”:f=[];if(s)try{var J=[“January”,”February”,”March”,”April”,”May”,”June”,”July”,”August”,”September”,”October”,”November”,”December”].indexOf($(“input_”+o+”_month”).value),k=$(“input_”+o+”_day”).value,S=$(“input_”+o+”_year”).value;b=new Date(S,J,k).getTime();c=b/60/60/24/1e3}catch(e){console.log(“birthdate error”),console.log(e)}else $$(“#id_”+o+” select”).each(function(e){f.push(e.value)}),f[0].empty()||f[1].empty()||f[2].empty()||(c=f[0]+” “+f[1]+” “+f[2]);break;case”address”:f=[];i={},$$(“#id_”+o+’ input[type=”text”]’).each(function(e){e.value.empty()||f.push(e.value);var t=e.id.replace(/input_[0-9].*?_+/,””);i[t]=e.value}),$$(“#id_”+o+” select”).each(function(e){e.value.empty()||f.push(e.value);var t=e.id.replace(/input_[0-9].*_+/,””);i[t]=e.value}),c=f.join(“, “);break;case”file”:c=(c=$(“input_”+o).value).substring(c.lastIndexOf(“\”)+1);break;case”textarea”:if($(“input_”+o)&&void 0!==$(“input_”+o).value)c=$(“input_”+o).value,$(“id_”+o).down(“.nicEdit-main”)&&(c=c.stripTags().replace(/s/g,” “).replace(/ /g,” “));break;case”widget”:var A=JotForm.getWidgetType(o);switch(A){case”timer”:case”fancyTimer”:if(s)c=$(“input_”+o).value;else{var N=$(“input_”+o).value,T=Math.floor(N/60);N-=60*T,N=JotForm.addZeros(N,2),c=T+”:”+N}break;case”configurableList”:case”dynMatrix”:var D=”html”===JotForm.calculationType(t)?”
“:”n”,M=$(“input_”+o).value;try{M=JSON.parse(M);for(var O=0;O”));break;case”imagelinks”:case”links”:for(D=”html”===JotForm.calculationType(t)?”
“:”n”,M=JSON.parse($(“input_”+o).value).widget_metadata.value,O=0;O‘:’‘+(I?M[O].name:M[O].url)+”“:(c+=I?M[O].name+”: “:””,c+=M[O].url+D)}break;case”htmltext”:var P=JSON.parse($(“input_”+o).value).widget_metadata.value;c=window.atob?window.atob(P):””,”html”!==JotForm.calculationType(t)&&(c=c.strip().replace(/
/g,”n”).stripTags().replace(/ /g,” “));break;case”drivingDistance”:if((c=$(“input_”+o).value).indexOf(“Distance”)>-1){var B=c.match(/Distance(.*)/);B.length>1&&(c=B[1])}break;case”pickers”:c=$(“input_”+o).value;if(s&&-1!==$(“customFieldFrame_”+o).src.indexOf(“datepicker.html”)){f=c.split(“/”),b=Date.UTC(f[2],f[0]-1,f[1],0,0);c=b/60/60/24/1e3}break;case”ios7Date”:c=$(“input_”+o).value;if(s&&c){f=c.split(“/”),b=Date.UTC(f[2],f[0]-1,f[1],0,0);c=b/60/60/24/1e3}break;default:c=$(“input_”+o).value}break;default:$(“input_”+o)&&void 0!==$(“input_”+o).value&&(c=$(“input_”+o).value)}return s&&”number”!=typeof c&&(a&&(/..*,/.test(c)&&(c=c.replace(/./g,””)),c=c.replace(“,”,”.”)),c=c.replace(/-?([^0-9])/g,”$1″).replace(/[^0-9.-]/g,””)),s&&c2)r+=(v=Date.UTC(p[0],p[1]-1,p[2]))/60/60/24/1e3}else if(“nth”===u){var y=p[0];r+=(p=(p=(p=p.splice(1)).sort(function(e,t){return parseInt(e)>parseInt(t)?1:parseInt(t)>parseInt(e)?-1:0})).reverse())[parseInt(y)-1]}else if(“avg”===u||”avgNoZero”===u){var b=sum=0;for(h=0;h

0&&(b++,sum+=parseFloat(p[h]));r+=”avg”===u?sum/p.length:sum/b}else if(“count”===u){var F=f[0];F=F.replace(/[{}]/g,””);var $=JotForm.getInputType(F);r+=b=$$(“#id_”+F+’ input[type=”‘+$+'”]:checked’).length}else if(“commaSeparate”===u)if(“number”==typeof p[0]){p[0]=p[0].toFixed(e.decimalPlaces);var _=p[0].toString().split(“.”);_[0]=_[0].replace(/B(?=(d{3})+(?!d))/g,”,”),r+=_.join(“.”)}else r+=p[0];else r+=n[u].apply(void 0,p)}else r+=”random”===u?Math.random():n[u]}catch(e){console.log(e)}else if(“{“===character){x=t.indexOf(“}”,i);var w=t.substring(i+1,x);try{var C=s(w,o)}catch(e){console.log(“error catching value”),console.log(e)}if(“”===C&&o)return!1;r+=C,i+=x-i}else r+=character;else{var x=t.indexOf(“]”,i);try{var E=l(t.substring(i+1,x),!0);E&&(-1==E.indexOf(“,”)&&(E=(new MathProcessor).parse(E),”datetime”!==JotForm.getInputType(e.resultField)&&(E=E.toFixed(e.decimalPlaces),e.showEmptyDecimals&&”0″!=e.showEmptyDecimals||(E=parseFloat(E))%1!=0&&(E=E.toFixed(e.decimalPlaces||2))),isFinite(E)||(E=0)),a&&(E=E.toString().replace(“.”,”,”)),r+=E)}catch(o){console.log(“exception in “+e.conditionId+” : “+E+”(“+t+”)”)}i=x}return r},u=l(e.equation);”string”==typeof u&&u.length>1||0!==parseFloat(u)||!$(“input_”+t)||null==$(“input_”+t).readAttribute(“defaultValue”)&&null==$(“input_”+t).readAttribute(“data-defaultvalue”)||(u=$(“input_”+t).readAttribute(“defaultValue”)||$(“input_”+t).readAttribute(“data-defaultvalue”));var d=e.isLabel?”html”:JotForm.calculationType(t);switch(d){case”html”:try{if(e.replaceText||(e.replaceText=””),e.replaceText.indexOf(“:”)>-1){var c=e.replaceText.substr(e.replaceText.indexOf(“:”)+1);c in i&&(u=i[c])}u.empty()&&e.defaultValue&&(u=e.defaultValue);var m=t+”_”+e.replaceText.replace(/[/g,”_field_”).replace(/:/g,”_”);m=m.replace(“]”,””);var p=$$(“.”+m),f=[];f=”cardform”==window.FORM_MODE?$$(“.jfField-sublabel”).filter(function(e){return e.htmlFor==”input_”+t}):$$(“.form-sub-label”).filter(function(e){return e.htmlFor==”input_”+t});var h=e.replaceText.replace(“[“,”\[“),v=new RegExp(“{“+h+”}”,”g”),g=e.defaultValue||””;if(0==p.length){var y=e.isLabel?$(“label_”+t).innerHTML:$(“text_”+t).innerHTML;y=y.replace(v,”+u+””),e.isLabel?$(“label_”+t).update(y):$(“text_”+t).update(y)}else p.each(function(e){e.update(u)});f.each(function(e){var t=e.innerHTML.replace(v,”+u+””);e.update(t)});var b=$(“input_”+t+”_description”);if(b){var F=b.innerHTML;F.indexOf(e.replaceText)>-1&&(F=F.replace(v,”+u+””),b.update(F))}}catch(e){console.log(e)}break;case”address”:case”authnet”:case”paypalpro”:case”combined”:case”time”:case”braintree”:case”stripe”:for(var _ in i)””!==_&&$(“id_”+t).select(“input[id*=”+_+”], select[id*=”+_+”]”).length>0&&($(“id_”+t).select(“input[id*=”+_+”], select[id*=”+_+”]”).first().value=i[_],i[_]&&$(“id_”+t).select(“input[id*=”+_+”], select[id*=”+_+”]”).first().parentNode.addClassName(“isFilled”));$(“input_”+t+”_full”)&&”true”==$(“input_”+t+”_full”).readAttribute(“masked”)&&JotForm.setQuestionMasking(“#input_”+t+”_full”,”textMasking”,$(“input_”+t+”_full”).readAttribute(“maskValue”));break;case”datetime”:if(i&&”year”in i)for(var _ in i)$(“id_”+t).select(“input[id*=”+_+”], select[id*=”+_+”]”).length>0&&($(“id_”+t).select(“input[id*=”+_+”], select[id*=”+_+”]”).first().value=i[_]);else try{if(“number”==typeof u&&u>0||”string”==typeof u&&u.replace(/s/g,””).length>0&&”0″!==u){isNaN(u)||(u=Math.round(60*u*60*24*1e3));var w=(E=new Date(u)).getFullYear(),C=JotForm.addZeros(E.getMonth()+1,2),x=JotForm.addZeros(E.getDate(),2);$(“input_”+t)?($(“input_”+t).value=w+”-“+C+”-“+x,isNaN(w)||($$(“#cid_”+t+’ .jfField[data-type=”year”] input’)[0].value=w),isNaN(C)||($$(“#cid_”+t+’ .jfField[data-type=”month”] input’)[0].value=C),isNaN(x)||($$(“#cid_”+t+’ .jfField[data-type=”day”] input’)[0].value=x)):(isNaN(w)||($(“year_”+t).value=w),isNaN(C)||($(“month_”+t).value=C),isNaN(x)||($(“day_”+t).value=x))}}catch(e){console.log(e)}var E;if($(“lite_mode_”+t))(E=new Date($(“year_”+t).value,$(“month_”+t).value-1,$(“day_”+t).value)).getTime()&&JotForm.formatDate({date:E,dateField:$(“id_”+t)});break;case”number”:u=u.replace(/[^-0-9.]/g,””),$(“input_”+t).value=u;break;case”radio”:var J=$$(“#id_”+t+’ input[type=”radio”]’);$A(J).each(function(e){e.checked=!1,e.value==u.strip()&&(e.checked=!0)});break;case”checkbox”:var k=$$(“#id_”+e.operands+’ input[type=”checkbox”]:checked’),S=k.length?k.collect(function(e){return e.value.strip()}):u.split(“,”).collect(function(e){return e.strip()}),A=$$(“#id_”+t+’ input[type=”checkbox”]’);$A(A).each(function(e){JotForm.defaultValues[e.id]||(e.checked=!1),S.include(e.value)&&(e.checked=!0)});break;case”select”:try{var N=$$(“#id_”+e.operands+” select”),T=N[0]?N[0].value:u;t.indexOf(“|”)>0?$(“input_”+t.split(“|”).join(“_field_”)).setValue(T.strip()):$(“input_”+t).setValue(T.strip());break}catch(e){console.log(e)}case”matrix”:”resultSubField”in e&&$(e.resultSubField)&&($(e.resultSubField).value=u);break;case”textarea”:(u=u.replace(/
|
/gi,”rn”))&&u.length>0&&$(“input_”+t).removeClassName(“form-custom-hint”).removeAttribute(“spellcheck”);var D=”cardform”==window.FORM_MODE?”#input_”+t+”_editor”:”.nicEdit-main”,M=$(“id_”+t).down(D);M&&(M.innerHTML=u,M.setStyle({color:””})),$(“input_”+t).value=u;break;case”mixed”:if($(o)){$(o).value=u;var O=$(o).up();”cardform”==window.FORM_MODE&&O&&!O.hasClassName(“isFilled”)&&O.addClassName(“isFilled”)}break;default:try{if($(“input_”+t)&&!0===$(“input_”+t).hinted&&$(“input_”+t).clearHint(),$(“input_”+t)&&($(“input_”+t).value=u),$(“input_”+t)&&u&&0===u.length&&$(“input_”+t).hintClear&&$(“input_”+t).hintClear(),$(“input_”+t)&&”true”==$(“input_”+t).readAttribute(“data-masked”)&&JotForm.setQuestionMasking(“#input_”+t,”textMasking”,$(“input_”+t).readAttribute(“maskValue”)),”widget”===d){var I=$(“input_”+t);I&&(I.fire(“widget:populate”,{qid:t,value:u}),I.triggerEvent(“change”))}break}catch(e){console.log(e)}}var P,B,L,j;if(P=”object”==typeof u?JSON.stringify(u):u,B=e.resultSubField||e.resultField,”__antiLoopCache”in window||(window.__antiLoopCache={}),window.__antiLoopCache[B]!==P&&(window.__antiLoopCache[B]=P,1))if(!o&&$(“id_”+t).hasClassName(“form-line-error”)&&$(“id_”+t).select(“select[class*=’required’], textarea[class*=’required’], input[class*=’required’]”).each(function(e){e.validateInput&&e.validateInput()}),”checkbox”==d||”radio”==d?(j=”click”,L=$(“id_”+t)):”select”==d?(j=”change”,t.indexOf(“|”)>0?$(“input_”+t.split(“|”).join(“_field_”))&&(L=$(“input_”+t.split(“|”).join(“_field_”))):$(“input_”+t)&&(L=$(“input_”+t))):(j=”keyup”,$(o)?L=$(o):e.isLabel||(L=$(“input_”+t)?$(“input_”+t):$(“id_”+t).select(“input”).first())),L){if(document.createEvent){var q=document.createEvent(“HTMLEvents”);q.initEvent(j,!0,!0),L.dispatchEvent(q)}L.fireEvent&&L.fireEvent(“on”+j)}}},getWidgetType:function(e){try{if(!$(“id_”+e||$(“id_”+e).down(“iframe”)))return!1;if($(“input_”+e).value.indexOf(“widget_metadata”)>1)return JSON.parse($(“input_”+e).value).widget_metadata.type;var t=$(“id_”+e).down(“iframe”).src,o=new RegExp(“jotform.io/(.*)/”).exec(t);return!(!o||o.length-1&&e.indexOf(“}”)>-1){var t=e.strip().replace(/[{}]/g,””),o=$$(‘input[name*=”_’+t+'[“],select[name*=”_’+t+'[“]’);if(o&&0!=o.length||(o=$$(‘input[name*=”_’+t+'”],select[name*=”_’+t+'”]’)),o.length>0){var r=o.first().up(“.form-line”);if(r)return r.id.replace(/.*id_/,””)}}}catch(e){console.log(e)}return!1},setConditionEvents:function(){try{$A(JotForm.conditions).each(function(e){if(1!=e.disabled)if(“field”==e.type||”calculation”==e.type||”require”==e.type||”mask”==e.type||$A(e.action).length>0&&”hidePage”===e.action.first().skipHide){var t=[];$A(e.terms).each(function(e){e.field=String(e.field);var o=””;if(e.field.indexOf(“|”)>-1){var r=e.field.split(“|”);o=r[0]+”_field_”+r[1]}else o=e.field;t.push(o);var n=JotForm.getFieldIdFromFieldRef(e.value);n&&t.push(n)}),$A(t).each(function(t){switch(JotForm.getInputType(t)){case”widget”:case”signature”:JotForm.setFieldConditions(“input_”+t,”change”,e),JotForm.widgetsWithConditions.push(t);break;case”combined”:case”email”:t.indexOf(“_field_”)>-1?JotForm.setFieldConditions(“input_”+t,”autofill”,e):JotForm.setFieldConditions(“id_”+t,”autofill”,e);break;case”address”:JotForm.setFieldConditions(“id_”+t,”autofill”,e),JotForm.setFieldConditions(“input_”+t+”_country”,”change”,e);break;case”datetime”:JotForm.setFieldConditions(“id_”+t,”date:changed”,e);break;case”birthdate”:JotForm.setFieldConditions(“input_”+t+”_day”,”change”,e),JotForm.setFieldConditions(“input_”+t+”_month”,”change”,e),JotForm.setFieldConditions(“input_”+t+”_year”,”change”,e);break;case”time”:JotForm.setFieldConditions(“input_”+t+”_hourSelect”,”change”,e),JotForm.setFieldConditions(“input_”+t+”_minuteSelect”,”change”,e),JotForm.setFieldConditions(“input_”+t+”_ampm”,”change”,e);case”select”:case”file”:$(“input_”+t)?JotForm.setFieldConditions(“input_”+t,”change”,e):$(“id_”+t).select(“select”).each(function(t){JotForm.setFieldConditions(t.id,”change”,e)});break;case”checkbox”:case”radio”:JotForm.setFieldConditions(“id_”+t,”click”,e);break;case”number”:JotForm.setFieldConditions(“input_”+t,”number”,e);break;case”autocomplete”:JotForm.setFieldConditions(“input_”+t,”autocomplete”,e);break;case”grading”:JotForm.setFieldConditions(“id_”+t,”keyup”,e);break;case”text”:JotForm.setFieldConditions(“input_”+t,”autofill”,e);break;case”hidden”:$(“input_”+t+”_donation”)?JotForm.setFieldConditions(“input_”+t+”_donation”,”keyup”,e):JotForm.setFieldConditions(“input_”+t,”keyup”,e);break;case”mixed”:if(t.indexOf(“_field_”)>-1){var o,r=t.split(“_field_”)[0];this.CardLayout.layoutParams.allQuestions.forEach(function(e){e.id==r&&(o=e)}),o&&o.fields&&o.fields.forEach(function(t){var o=”input_”+r+”_field_”+t.fieldID;JotForm.setFieldConditions(o,”change”,e),JotForm.widgetsWithConditions.push(o)})}break;default:JotForm.setFieldConditions(“input_”+t,”keyup”,e)}})}else $A(e.terms).each(function(t){var o=t.field.toString();if(-1!==o.indexOf(“_”)&&(o=o.split(“_”)[0]),-1!==o.indexOf(“|”)&&(o=o.split(“|”)[0]),$(“id_”+o)){if(“control_widget”===$(“id_”+o).getAttribute(“data-type”)&&$(“input_”+o)&&”hidden”===$(“input_”+o).type&&$$(“#jfCard-welcome-start”)){var r=$$(“#jfCard-welcome-start”).first();r&&r.observe(“mousedown”,function(){JotForm.checkCondition(e)})}var n;(n=”cardform”===window.FORM_MODE?$(“id_”+o).select(“.forNext”)[0]:JotForm.getSection($(“id_”+o)).select(“.form-pagebreak-next”)[0])&&n.observe(“mousedown”,function(){JotForm.checkCondition(e)})}})}),$H(JotForm.fieldConditions).each(function(e){var t=e.key,o=e.value.event,r=e.value.conditions;$(t)&&(“autocomplete”==o?($(t).observe(“blur”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“blur”),$(t).observe(“keyup”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“keyup”)):”number”==o?($(t).observe(“change”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“change”),$(t).observe(“keyup”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“keyup”)):”autofill”==o?($(t).observe(“blur”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“blur”),$(t).observe(“keyup”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“keyup”),(Prototype.Browser.IE9||Prototype.Browser.IE10||!Prototype.Browser.IE)&&$(t).observe(“change”,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}).run(“change”)):($(t).observe(o,function(){$A(r).each(function(e){JotForm.checkCondition(e)})}),$(t).id.match(/input_[0-9]+_quantity_[0-9]+_[0-9]+/)?JotForm.runConditionForId(t.replace(“input_”,””)):$(t).run(o)))})}catch(e){JotForm.error(e)}},setFieldsToPreserve:function(e){var t=$$(‘input[name=”simple_fpc”]’).length>0&&[“braintree”,”dwolla”,”stripe”,”paypal”,”paypalpro”,”paypalexpress”,”authnet”].indexOf($$(‘input[name=”simple_fpc”]’)[0].getAttribute(“data-payment_type”))>-1,o=[{type:”phone”,pattern:/Phone|Contact/i},{type:”email”,pattern:/email|mail|e-mail/i},{type:”company”,pattern:/company|organization/i}],r=$$(‘.form-line[data-type*=”email”],.form-line[data-type*=”textbox”],.form-line[data-type*=”phone”],.form-line[data-type*=”dropdown”],.form-line[data-type*=”radio”]’);sortedFields=r.sort(function(e,t){return Number(e.id.replace(“id_”,””))-Number(t.id.replace(“id_”,””))});var n={};sortedFields.each(function(r){var a=r.id.replace(“id_”,””),i=r.down(“input, select”).name.replace(/qd+_/,””),s=r.getAttribute(“data-type”).replace(“control_”,””);t&&Object.keys(n).length-1||e.indexOf(a)>-1)&&JotForm.fieldsToPreserve.push(a)})},changePaymentStrings:function(e){$(“coupon-header”)&&e.couponEnter&&($(“coupon-header”).innerHTML=e.couponEnter),$(“shipping-text”)&&e.shippingShipping&&($(“shipping-text”).innerHTML=e.shippingShipping),$(“tax-text”)&&e.taxTax&&($(“tax-text”).innerHTML=e.taxTax),$(“subtotal-text”)&&e.totalSubtotal&&($(“subtotal-text”).innerHTML=e.totalSubtotal),$(“total-text”)&&e.totalTotal&&($(“total-text”).innerHTML=e.totalTotal)},handleSubscriptionPrice:function(){navigator.userAgent.toLowerCase().indexOf(“safari/”)>-1&&$$(“.form-product-custom_price”).each(function(e){e.onclick=function(e){e.preventDefault()}});var e=$$(“input[data-price-source]”);if(!(e.length0?t:0)})}}),t.each(function(e){var t=e.id.replace(“input_”,””);e.onkeyup=function(){o[t].each(function(e){e()}),JotForm.countTotal()}})}},handleDonationAmount:function(){var e=JotForm.donationField=$$(‘input[id*=”_donation”]’)[0];if(JotForm.paymentTotal=e.value||0,e.observe(“keyup”,function(){JotForm.paymentTotal=this.value=this.value.replace(/[^.0-9]+/g,””)}),e.observe(“change”,function(){JotForm.paymentTotal=this.value}),$$(‘input[id*=”_donation”]’)[0].getAttribute(“data-custom-amount-field”)>0){if(JotForm.donationSourceField=$(“input_”+e.getAttribute(“data-custom-amount-field”)),!JotForm.donationSourceField)return void $$(‘input[id*=”_donation”]’)[0].removeAttribute(“readonly”);setTimeout(function(){JotForm.updateDonationAmount(),e.triggerEvent(“keyup”)},1e3),JotForm.donationSourceField.observe(“keyup”,JotForm.updateDonationAmount),JotForm.donationSourceField.observe(“change”,JotForm.updateDonationAmount)}else if(e.hasAttribute(“data-min-amount”)){var t=e.nextSibling.textContent.strip(),o=parseFloat(e.readAttribute(“data-min-amount”));e.validateMinimum=function(){var r=this.getValue();if(isNaN(r)||r0?t:0),window.FORM_MODE&&”cardform”==window.FORM_MODE&&JotForm.donationField.parentNode.addClassName(“isFilled”)}else JotForm.donationField.value=JotForm.paymentTotal=e},isPaymentSelected:function(){var e=!1,t=$$(‘input[name=”simple_fpc”]’)[0]&&$$(‘input[name=”simple_fpc”]’)[0].value,o=$(“id_”+t);if(!o)return!!$$(‘input[name=”simple_fpc”]’)[0];if(o.hasClassName(“form-field-hidden”)||o.up(“ul.form-section”).hasClassName(“form-field-hidden”)||o.up(“ul.form-section-closed”)&&o.up(“ul.form-section-closed”).hasClassName(“form-field-hidden”))return!1;if($$(‘input[name=”simple_fpc”]’).length0,r.length>1&&(e=r.any(function(e){return e.getValue()>0})),e)throw $break}});else{if(!$(“input_”+t+”_donation”)){var r=$$(‘input[name*=”q’+t+'”][type=”hidden”]’);return!(r.length0)}return e},togglePaypalButtons:function(e){var t=$$(‘input[name=”simple_fpc”]’)[0].value;$(“input_”+t+”_paymentType_express”)&&!$(“input_”+t+”_paymentType_express”).checked&&(e=!1),$$(“.paypal-button”).length-1)throw t=!0,$break}):$(“input_”+o+”_donation”)&&(t=$(“input_”+o+”_donation”).getAttribute(“class”).indexOf(“required”)>-1),JotForm.togglePaypalButtons(t||JotForm.isPaymentSelected()),t||$H(e).each(function(e){$(e.value).observe(“click”,function(){JotForm.togglePaypalButtons(JotForm.isPaymentSelected())})})},checkEmbed:function(){var e=$$(“.jotform-form”)[0];window!==window.top&&(e.insert(new Element(“input”,{type:”hidden”,name:”embedUrl”}).putValue(document.referrer)),JotForm.debug&&console.log(document.referrer))},handlePaypalExpress:function(){“function”==typeof _paypalExpress&&”No”!==$(“express_category”).getAttribute(“data-digital_goods”)&&(new _paypalExpress).init()},handleBraintree:function(){if(!(window.location.pathname.match(/^/edit/)||[“edit”,”inlineEdit”,”submissionToPDF”].indexOf(document.get.mode)>-1&&document.get.sid)){if(“function”!=typeof __braintree)return alert(“Braintree payment script didn’t work properly. Form will be reloaded”),void location.reload();JotForm.braintree=__braintree(),JotForm.braintree.init()}},handlePagseguro:function(){if(!(window.location.pathname.match(/^/edit/)||[“edit”,”inlineEdit”,”submissionToPDF”].indexOf(document.get.mode)>-1&&document.get.sid)){if(“function”!=typeof __pagseguro)return alert(“PagSeguro payment script didn’t work properly. Form will be reloaded”),void location.reload();JotForm.pagseguro=__pagseguro(),JotForm.pagseguro.init()}},handleSquare:function(){if(!(window.location.href.match(/mode=inlineEdit/)||window.location.pathname.match(/^//edit/)||window.location.pathname.match(/^/edit/)||window.location.href.match(/mode=submissionToPDF/))||!document.get.sid)if(window!==window.top||”https:”===window.location.protocol){if(“function”!=typeof __square)return alert(“Square payment script didn’t work properly. Form will be reloaded”),void location.reload();JotForm.squarePayment=__square(),JotForm.squarePayment.init()}else window.location.href=window.location.href.replace(“http”,”https”)},handleStripeACH:function(){if(!JotForm.isEditMode()){if(“undefined”==typeof __stripeACH)return alert(“Stripe ACH payments script didn’t work properly. Form will be reloaded. “),void location.reload();JotForm.stripeACH=__stripeACH,JotForm.stripeACH.init()}},handlePaypalSPB:function(){JotForm.paypalSPB=__paypalSPB;try{JotForm.paypalSPB.init(),JotForm.paypalSPB.render()}catch(e){if(console.error(e),”string”==typeof e)return void alert(e);alert(“There was a problem with PayPal Smart Payment Buttons integration.”)}},handlePaymentSubProducts:function(){var e=[],t=[],o=$$(“.form-section”),r=!1;function n(o){var r=o.parentNode;o.checked?(r.shift({height:e[o.id][0]-10,duration:.3,onEnd:JotForm.handleIFrameHeight}),t[o.id]&&t[o.id].length>0&&t[o.id].each(function(e){$(e[0]).stopObserving(),$$(“#”+e[0]+”.form-product-custom_quantity”).each(function(e,t){e.observe(“blur”,function(){isNaN(this.value)||this.value1?(r=r||o.filter(function(e){return t.descendantOf(e)&&t.up(“.form-section”)===e})[0]).isVisible()?e[t.id]=[t.parentNode.getHeight(),$$(‘label[for=”‘+t.id+'”]’)[0].getHeight()]:(r.setStyle({display:”block”}),e[t.id]=[t.parentNode.getHeight(),$$(‘label[for=”‘+t.id+'”]’)[0].getHeight()],r.setStyle({display:”none”})):e[t.id]=[t.parentNode.getHeight(),$$(‘label[for=”‘+t.id+'”]’)[0].getHeight()],n(t),t.observe(“click”,function(){n(this)}),a&&t.up(“.form-line”).hide()})},handleProductLightbox:function(){$$(“.form-product-image-with-options”).forEach(function(e,t){e.observe(“click”,function(){onProductImageClicked(t)})})},setCurrencyFormat:function(e,t,o){var r=[“BIF”,”CLP”,”DJF”,”GNF”,”JPY”,”KMF”,”KRW”,”MGA”,”PYG”,”RWF”,”VUV”,”XAF”,”XOF”,”XPF”].indexOf(e)>-1||!t?0:2;this.currencyFormat={curr:e,dSeparator:”comma”==o?”,”:”.”,tSeparator:”comma”==o?”.”:”,”,decimal:r}},countTotal:function(e){e=e||JotForm.prices;var t=!1;if(Object.keys(JotForm.discounts).length>0)if(t=!0,JotForm.discounts.total||JotForm.discounts.shipping)var o=JotForm.discounts.type,r=JotForm.discounts.rate,n=JotForm.discounts.minimum,a=JotForm.discounts.code;else for(var i in e)for(var s in JotForm.discounts)-1!==i.indexOf(s)&&(e[i].discount=JotForm.discounts[s]);else $H(e).each(function(t){delete e[t.key].discount});var l=0,u=0,d=0,c=0,m=[],p=0,f=0,h=0,v=0,g=0,y=0,b=JotForm.currencyFormat.curr,F=JotForm.currencyFormat.decimal,_=JotForm.currencyFormat.dSeparator,w=JotForm.currencyFormat.tSeparator,C=0,x=0,E=[];if($H(e).each(function(e){var t=e.key.split(“_”),o=t[0]+”_”+t[1]+”_”+t[2],r=$$(“#”+o+”+ label”)[0]&&$$(“#”+o+”+ label .form-product-name”)[0].textContent.trim();if(r||(r=$$(“#”+o+”+ .product__header”)[0]&&$$(“#”+o+”+ .product__header .product__title”)[0].textContent.trim()),”custom”!=e.value.price){if($(e.value.quantityField)){if(e.value.quantityField&&!(parseInt($(e.value.quantityField).getValue())>0)&&!$(e.value.quantityField).hasClassName(“form-subproduct-quantity”))return;try{var n=e.key.split(“_”).slice(0,-1).join(“_”);if($(n)&&”radio”===$(n).type&&!$(n).checked)return $(e.value.quantityField).value>0&&($(e.value.quantityField).value=0,$(n+”_item_subtotal”)&&$(n+”_item_subtotal”).update(“0.00”)),void(“cardform”===window.FORM_MODE&&($$(“ul.products”)[0]&&$$(“ul.products”)[0].querySelector(‘li[data-input=”‘+n+'”]’)&&$$(“ul.products”)[0].querySelector(‘li[data-input=”‘+n+'”]’).classList.remove(“product–selected”),$(e.value.quantityField).up().querySelector(“.jfDropdown-chip.isSingle”).innerText=0))}catch(e){console.warn(e)}}var a=!!e.value.recurring;l=parseFloat(l);var i,s=0,u=parseFloat(e.value.price)||0,b=u,J=0,k=0,S=!1,A=e.value.recurring,N=!1,T=1,D=[];if(4===e.key.split(“_”).length?(S=!0,(i=e.key.split(“_”)).pop(),i=i.join(“_”),m[i]=m[i]||0):i=e.key,$(e.value.specialPriceField)){var M=$(e.value.specialPriceField);if(e.value.child&&4===e.value.specialPriceField.split(“_”).length){var O=e.value.specialPriceField.split(“_”)[3];u=parseFloat(e.value.specialPriceList[O])}else{isNaN($(M).options[0].value)||$(M).options[0].value>0||$(“”!=M.options[0].innerHTML.strip())?priceIndex=M.getSelected().index:priceIndex=M.getSelected().index-1;var I=null;if((I=$(e.value.quantityField)&&$(e.value.quantityField).up(“tr”)?$(e.value.quantityField).up(“tr”).querySelector(“th”).textContent.trim():document.querySelector(“label[for=”+e.value.specialPriceField+”]”).textContent.trim())&&D.push({name:I,value:$(M).getSelected().value}),priceIndex>-1)u=parseFloat(e.value.specialPriceList[priceIndex]),$(e.key+”_price”)&&$(e.key+”_price”).siblings(“.freeCurr”).each(function(e){e.style.display=”inline”});else{var P=e.value.specialPriceList[priceIndex+1];u=0}}N=!0}if(b=u,e.value.discount){var B=e.value.discount.split(“-“);if(b=u,B[2]){if(“all”===B[2]||”product”===B[2])a&&(A=(A-=”fixed”===B[1]?B[0]:A*(B[0]/100))1&&(s=parseFloat(Y.addItem)?parseFloat(Y.firstItem)+parseFloat(Y.addItem)*(U-1):parseFloat(Y.firstItem))}else 0==C&&Y.flatRate&&(p=C=parseFloat(Y.flatRate))}f+=J,h+=k,C||(p+=s),d+=u,c+=b,v+=s+J,g+=s+k}else $(e.key+”_item_subtotal”)&&$(e.key+”_item_subtotal”).update(“0.00”);if($(e.key)&&($(“coupon-button”)&&!0===$(e.key).checked&&”subscription”===window.paymentType&&Array.from(document.querySelectorAll(“.jfCard”)).filter(function(e){return”control_stripe”===e.dataset.type}).length>0&&(selected_product_id=$(e.key).value,JotForm.checkCouponAppliedProducts()),$(e.key).checked&&u>0)){var z=N?b:parseFloat(e.value.price),W=””;N&&D.forEach(function(e){W+=e.name+”:”+e.value+” “}),E.push({name:r,unit_amount:Number(z),quantity:N?1:T,description:W.substr(0,124)})}}else $(e.key)&&$(e.key).checked&&(d=parseFloat($(e.key+”_custom_price”).getValue()))}),$(“coupon-button”))var J=$($(“coupon-button”).getAttribute(“data-qid”)+”_coupon”);if(JotForm.discounts.total){if(d>=n){var k=”fixed”===o?r:r/100*parseFloat(d);d=d>k?d-k:0,J.value=a}else k=0,J.value=””;var S=document.querySelector(“.form-payment-total”);S&&(S.parentNode.insertBefore(JotForm.discounts.container,S),$(“discount_total”).update(parseFloat(k).formatMoney(F,_,w)))}if(“paypalSPB”!==JotForm.payment&&”Stripe”!==JotForm.payment||(v=P(v),g=P(g)),l=d+v,u=c+g,u=C>0?u+C:u,(0===(l=C>0?l+C:l)||isNaN(l))&&(l=”0.00″,u=”0.00″),JotForm.discounts.shipping&&p>0&&d>=n){k=”fixed”===o?r:r/100*parseFloat(p);var A=p;l-=A-(p=p>k?p-k:0),u-=A-p}this.paymentTotal=Number(l),$(“creditCardTable”)&&(x>0&&0===this.paymentTotal&&t?JotForm.setCreditCardVisibility(!1):$$(‘input[id*=”paymentType_credit”]’).length>0&&$$(‘input[id*=”paymentType_credit”]’)[0].checked&&JotForm.setCreditCardVisibility(!0)),$(“payment_subtotal”)&&$(“payment_subtotal”).update(parseFloat(d).formatMoney(F,_,w)),$(“payment_tax”)&&$(“payment_tax”).update(parseFloat(f).formatMoney(F,_,w)),$(“payment_shipping”)&&$(“payment_shipping”).update(parseFloat(p).formatMoney(F,_,w)),$(“payment_total”)&&($(“payment_total”).update(parseFloat(l).formatMoney(F,_,w)),$(“payment_total”).up(“.form-line”)&&$(“payment_total”).up(“.form-line”).triggerEvent&&$(“payment_total”).up(“.form-line”).triggerEvent(“keyup”)),$(“payment_footer_total”)&&$(“payment_footer_total”).update(parseFloat(l).formatMoney(F,_,w));var N=P(c),T=P(p);u=P(u)||0,l=P(l)||0,h=P(h),f=P(f);var D=0;for(var M in JotForm.discounts)D++;var O=D>0,I=P(Math.abs(N+T+f-l));function P(e){return parseFloat(parseFloat(e).formatMoney(F,_,””))}I=O?I:0,JotForm.pricingInformations={items:E,general:{net_amount:l,total_amount:u,item_total:N,tax_total:f,shipping:T,discount:I,currency:b}}},prices:{},setCreditCardVisibility:function(e){e?$(“creditCardTable”).show():$(“creditCardTable”).hide()},totalCounter:function(e){Number.prototype.formatMoney||(Number.prototype.formatMoney=function(e,t,o){var r=void 0!==this.toString().split(“.”)[1]&&this.toString().split(“.”)[1].length>e&&”5″===this.toString().charAt(this.toString().length-1)?this.toString()+”1″:this.toString(),n=parseFloat(r),a=(e=isNaN(e=Math.abs(e))?2:e,t=void 0===t?”.”:t,o=void 0===o?”,”:o,n3?s%3:0;return a+(s?i.substr(0,s)+o:””)+i.substr(s).replace(/(d{3})(?=d)/g,”$1″+o)+(e?t+Math.abs(n-i).toFixed(e).slice(2):””)}),JotForm.prices=e,document.observe(“dom:loaded”,JotForm.countTotal(e)),$H(e).each(function(t){if($(t.key)&&$(t.key).observe(“click”,function(){JotForm.countTotal(e)}),”custom”==t.value.price&&($(t.key+”_custom_price”).stopObserving(“keyup”),$(t.key+”_custom_price”).observe(“keyup”,function(){JotForm.countTotal(e)})),t.value.tax){var o=t.value.tax.surcharge;$$(‘select[id*=”input_’+o.field+'”]’).length>0&&($$(‘select[id*=”input_’+o.field+'”]’)[0].stopObserving(“change”),$$(‘select[id*=”input_’+o.field+'”]’)[0].observe(“change”,function(){setTimeout(JotForm.countTotal(),500)})),$$(‘input[id=”input_’+o.field+'”]’).length>0&&($$(‘input[id=”input_’+o.field+'”]’)[0].stopObserving(“keyup”),$$(‘input[id=”input_’+o.field+'”]’)[0].observe(“keyup”,function(){setTimeout(JotForm.countTotal(),500)}))}var r=function(e){var t=$(e).id.match(/input_([0-9]*)_quantity_/)||$(e).id.match(/input_([0-9]*)_custom_/);setTimeout(function(){t&&$(“id_”+t[1])&&$(“id_”+t[1]).triggerEvent(“click”);var o=e.up(“.form-product-item”);o&&o.down(“input”)&&o.down(“input”).validateInput&&o.down(“input”).validateInput()},100)};if($(t.value.quantityField)){function n(){if(JotForm.isVisible($(t.value.quantityField))){if(“SELECT”!==$(t.value.quantityField).tagName||$(t.value.quantityField).getSelected().index>0||”0″===$(t.value.quantityField).getValue()){var o=$(t.value.quantityField).up(“.form-product-item”).down(“.form-product-has-subproducts”);o?(o.checked=!1,$H(e).each(function(e){-1===e.key.indexOf(o.id)||$(e.value.quantityField).getValue()0)&&$(t.key)&&($(t.key).checked=!0),JotForm.countTotal(e))}$(t.value.specialPriceField).observe(“change”,function(){setTimeout(a,50),r(this)}),$(t.value.specialPriceField).observe(“keyup”,function(){setTimeout(a,50)})}})},discounts:{},handleCoupon:function(){var e=this;if(JotForm.countTotal(JotForm.prices),$(“coupon-button”)){var t=$(“coupon-button”),o=$(“coupon-loader”),r=$(“coupon-message”),n=$(“coupon-input”);t.innerHTML=this.paymentTexts.couponApply;var a=$$(‘input[name=”formID”]’)[0].value;n.observe(“keypress”,function(e){13===e.keyCode&&(e.preventDefault(),t.click(),n.blur())}),n.enable(),$$(‘input[name=”coupon”]’)[0].value=””,t.observe(“click”,function(){if(n.value){t.hide(),o.show(),n.value=n.value.replace(/s/g,””),t.disable();var i=(n.hasAttribute(“stripe”)||n.hasAttribute(“data-stripe”))&&”subscription”===window.paymentType;new Ajax.Jsonp(JotForm.server,{parameters:{action:”checkCoupon”,coupon:n.value,formID:a,stripe:i,editMode:JotForm.isEditMode(),paymentID:$$(‘input[name=”simple_fpc”]’)[0].value},evalJSON:”force”,onComplete:function(a){(a=a.responseJSON||a).success&&(-1===a.message.indexOf(“{“)?(“expired”===a.message?r.innerHTML=e.paymentTexts.couponExpired:r.innerHTML=e.paymentTexts.couponInvalid,r.removeClassName(“valid”),r.addClassName(“invalid”),n.select(),o.hide(),t.show(),t.enable()):(o.hide(),t.show(),r.innerHTML=e.paymentTexts.couponValid,r.removeClassName(“invalid”),r.addClassName(“valid”),JotForm.applyCoupon(a.message)))}})}else $(“coupon-message”).innerHTML=e.paymentTexts.couponBlank}.bind(this))}},checkCouponAppliedProducts:function(){var e=$(“coupon-button”),t=$(“coupon-message”);if(window.discounted_products){var o=Array.from(window.discounted_products);cleared_discounted_products=[],o.forEach(function(o,r){if(“string”==typeof o||”number”==typeof o){if(cleared_discounted_products[r]=o.toString(),!0===cleared_discounted_products.includes(selected_product_id)||”all”===cleared_discounted_products[0])e.innerHTML=”Change”,t.innerHTML=”Coupon is valid.”;else{e.enable();var n=document.querySelectorAll(“div#coupon-container > div#coupon-table > div.jfField.isFilled”).length;n&&0!==n&&(t.innerHTML=”Coupon code is not valid for this product.”)}$(“coupon-button”).addEventListener(“click”,function(){t.innerHTML=””})}})}},applyCoupon:function(e){var t=this;e=JSON.parse(e),window.discounted_products=[],e.products&&e.products[0]&&e.products.forEach(function(e,t){window.discounted_products[t]=e}),JotForm.discounts={};var o=$(“coupon-button”),r=($(“coupon-loader”),$(“coupon-message”)),n=$(“coupon-input”),a=$(o.getAttribute(“data-qid”)+”_coupon”);o.stopObserving(“click”),a&&(a.value=e.code),o.enable(),n.disable(),o.innerHTML=this.paymentTexts.couponChange||”Change”,o.observe(“click”,function(){JotForm.isEditMode()||(a.value=””,$H(i).each(function(e){e[1].remove()}),JotForm.discounts.container&&JotForm.discounts.container.remove(),$$(‘span[id*=”_price”]’).each(function(e,t){$(e).removeClassName(“underlined”)}),$$(‘span[id*=”_setupfee”]’).each(function(e,t){$(e).removeClassName(“underlined”)}),JotForm.discounts={},o.stopObserving(“click”),r.innerHTML=””,o.innerHTML=t.paymentTexts.couponApply,n.enable(),n.select(),JotForm.handleCoupon())});var i={},s=function(e,t){i[t]=new Element(“span”);var o=new Element(“span”,{style:”text-decoration:line-through; display:inline-block;”});o.insert(e.innerHTML.replace(“price”,”price_old”)),i[t].insert({top:”&nbsp”}),i[t].insert(o),i[t].insert({bottom:”&nbsp”}),e.insert({top:i[t]})};if(e.products&&e.products.length>0&&e.products.include(“all”))for(var l in e.products=[],productID)e.products.push(productID[l].slice(-4));if(!e.paymentType||e.paymentType&&”product”===e.paymentType)if(“product”===e.apply)$A(e.products).each(function(t){JotForm.discounts[t]=e.rate+”-“+e.type,$$(‘span[id*=”_price”]’).each(function(e,o){e.id.indexOf(t)>-1&&$(e).addClassName(“underlined”)}),$$(‘label[for*=”‘+t+'”] span.form-product-details b’)[0]&&s($$(‘label[for*=”‘+t+'”] span.form-product-details b’)[0],t),$$(“[id*=”+t+”_subproducts]”).length>0&&$$(“[id*=”+t+”_subproducts]”)[0].down(“.form-product-child-price”)&&$$(“#”+$$(“[id*=”+t+”_subproducts]”)[0].id+” .form-product-child-price”).each(function(e,o){s(e,t+”_”+o)})});else if(“total”===e.apply){JotForm.discounts={total:!0,code:e.code,minimum:e.minimum,type:e.type,rate:e.rate};var u=document.querySelector(“.form-payment-total”);if(u){var d=u.innerHTML.replace(“Total:”,”Discount:”).replace(“payment_total”,”discount_total”).replace(“”,” – “);JotForm.discounts.container=new Element(“span”,{class:”form-payment-discount”}).insert(d)}}else JotForm.discounts={shipping:!0,code:e.code,minimum:e.minimum,type:e.type,rate:e.rate};else $A(e.products).each(function(t){JotForm.discounts[t]=e.rate+”-“+e.type,e.apply&&(JotForm.discounts[t]+=”-“+e.apply),e.duration&&1===e.duration&&(JotForm.discounts[t]+=”-once”),$$(‘span[id*=”_price”]’).each(function(o,r){if(o.id.indexOf(t)>-1&&$$(‘span[id*=”‘+t+’_setupfee”]’).length>0&&”all”===e.apply)throw $(o).addClassName(“underlined”),$break}),$$(‘span[id*=”_setupfee”]’).each(function(e,o){if(e.id.indexOf(t)>-1)throw $(e).addClassName(“underlined”),$break})});JotForm.countTotal(JotForm.prices)},setStripeSettings:function(e,t,o,r,n,a){if(!JotForm.isEditMode()&&!document.get.sid&&(e||t)&&”function”==typeof Stripe&&”function”==typeof _StripeValidation){var i=e.replace(/s+/g,””);if(“”==i)return void console.log(“Stripe publishable key is empty. You need to connect your form using Stripe connect.”);var s=$$(“form”).first().readAttribute(“id”)+$$(“form”).first().readAttribute(“name”),l=[“92240684220955″,”92240208040947″,”92107392840961″,”82977791484982″,”91902352137958″,”70695373980367″,”72373139928970″,”72962389752370″,”80351169529460″,”80731950474358″,”80903229804355″,”81095206035349″,”81114329384354″,”81165997284370″,”81364096117962″,”81984710808364″,”81992751749372″,”82352633784967″,”82456109484361″,”82552480320349″,”82563717795370″,”82663483984371″,”82731463995367″,”82865732584368″,”83025650684357″,”83324799146366″,”83370676127360″,”83393498490471″,”83466140349358″,”90183991663365″,”90284937400356″,”90435462815357″,”90442100149344″,”90485384617365″,”90797847658380″,”90922411929358″,”90994307715364″,”91323776681363″,”91355649644366″,”91413410523343″,”91424212787357″,”91434630986363″,”91542708601353″,”91562031701951″,”91718734955874″,”91762329187365″,”91886040808362″,”91964416029361″,”91974013744359″,”90316994357871″,”91728930322255″,”73176133143349″,”81781026384358″,”71664477628368″,”81072643178963″,”91830873419868″,”91345055715961″,”91774507315460″,”91832148517864″,”71356844190358″,”90416303114342″,”90544316651354″,”80723551128958″,”90482383149361″,”91292691522964″,”73232269480356″,”91853002381350″,”70006053654346″,”82632643365964″,”91801811515350″,”90231818137858″,”91321637443959″,”91561346008353″,”81352938333358″,”91321500044339″,”81614650020343″,”82822511684357″,”91122933423349″,”92041626209351″,”91963220822354″,”90483089786372″,”51292079741963″,”91784419617367″,”61443976390362″,”92041517543351″,”92034080167855″,”60592526975366″,”73253831827561″,”82383708582364″,”80282584055357″,”91541606381354″,”90982564815367″,”91855336851364″,”42654387911966″,”91203350081342″,”91784223345358″,”90425404186353″,”82685904316362″,”91693370917365″,”40054239625855″,”82362157376966″,”80844461969369″,”70603261883354″,”81724066643357″,”90073023581348″,”82195033349357″,”81193625284359″,”41473684843968″,”72964892579984″,”91983688122367″,”90825989815374″,”82753519784369″,”81594308019358″,”83043598784369″,”92033901587357″,”90083798635368″,”83444394994371″,”83162911279359″,”91713040481348″,”91616505858970″,”90632386322354″,”80033554484354″,”90164356614355″,”82056245845359″,”82263450284354″,”90932022151344″,”82763252684969″,”91894463881371″,”91832613408355″,”60144320112940″,”91832428122352″,”80435312175147″,”91403494786365″,”80663316856362″,”71143053459958″,”91455325786365″,”90293078086362″,”91952870645366″,”90896267729375″,”62774132210143″,”83513734658363″,”80294344883161″,”82746846615367″,”91282727229361″,”91982153529364″,”91464859081365″,”73426375107961″,”91205397551357″,”91543200923348″,”83193395771366″,”60621878932968″,”91764797201363″,”91485683151967″,”90863907381364″,”92063630217349″,”83454246863363″,”63196947967377″,”91616607258361″,”91455346387365″,”91633563958974″,”70186303879362″,”91462341944357″,”80525473812355″,”91292471658364″,”91532600381954″,”81223941253350″,”91181550917357″,”91453844908365″,”80465655504156″,”90575873658979″,”71563880870363″,”91452873501355″,”62943843128360″,”90412016751346″,”90576114517962″,”90714090359357″,”92107533503954″,”91774193023356″,”82626233884160″,”83112462472350″,”60151563086957″,”91694487531367″,”70321096542349″,”92096804901459″,”91064897808471″,”92096316499469″,”91292209887367″,”90605220515345″,”90254058729967″,”91984025644362″,”60737794680367″,”42311765083956″,”90845035343354″,”71352967749976″,”72052631162345″,”91863600723355″,”90976615915368″,”91712524723353″,”83464073829364″,”91362412358354″,”92111869117356″,”82755320258357″,”82376566778375″,”73532310940347″,”91052623651350″,”91022363843351″,”82808192402354″,”82872741184362″,”91845103215349″,”91844176017964″,”30083764182352″,”91483193958370″,”73343912890359″,”90433675122352″,”92071884490867″,”51412621653346″,”91453279123356″,”81425789884374″,”80635536784365″,”90092479917367″,”90964282543362″,”91562966423363″,”90213011463340″,”82502094334350″,”83035787728974″,”91972412151352″,”91844443481360″,”91633322472352″,”81557185990368″,”73392478503361″,”92123393181352″,”91367935517467″,”92122566917966″,”81784153450356″,”81443368075359″,”71273775770363″,”61125097093353″,”40084774141956″,”70566324549361″,”90433597751363″,”70152493942356″,”91336238829364″,”91881796681374″,”80142267330346″,”91921795115360″,”73563394457366″,”92130983743359″,”51202978950964″,”50744856639973″,”90872914417362″,”91985021651357″,”73253028080348″,”90294747014357″,”73284342428963″,”90453017586964″,”91681881209363″,”82795965541371″,”41506322653347″,”71314616165351″,”90483687535368″,”83132007472347″,”81072643178963″,”91794883623370″,”91336545217356″,”60304429567962″,”60494949831367″,”92321588229361″,”91903172444354″,”92206142045345″,”91903172444354″,”92330769643968″].indexOf(s)>-1,u=new _StripeValidation;JotForm.stripe=u,l||”function”!=typeof Stripe.setPublishableKey?(u.setFields(t,o,r,n,a),u.init(e),console.log(“Stripe SCA loaded”)):(Stripe.setPublishableKey(i),u.setAddress_qid(t),u.init(),console.log(“Stripe v1 loaded”))}},setFilePickerIOUpload:function(e){e&&”object”==typeof filepicker&&”function”==typeof _JF_filepickerIO?new _JF_filepickerIO(e).init():console.error(“filepicker OR _JF_filepickerIO object library are missing”)},initCaptcha:function(e){setTimeout(function(){var t=navigator.userAgent.toLowerCase(),o=-1!=t.indexOf(“msie”)&&parseInt(t.split(“msie”)[1],10);o&&o(e=e.toString()).length)for(i=0;i0){var e=”0″;JotForm.currencyFormat.decimal&&(e=”0″+JotForm.currencyFormat.dSeparator+”00″),$$(‘span[id*=”_item_subtotal”]’).each(function(t){t.update(e)})}if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&$(“coupon-button”))return setTimeout(function(){$(“payment_total”)&&JotForm.totalCounter(JotForm.prices)},40),!0;$$(“.form-line-error”).each(function(e){e.removeClassName(“form-line-error”)}),$$(“.form-error-message”,”.form-button-error”).each(function(e){e.remove()}),$$(“.form-textarea-limit-indicator > span”).each(function(e){var t=e.innerHTML;e.innerHTML=t.replace(t.substring(0,t.indexOf(“/”)),”0″)}),$$(“span[id^=grade_point_]”).each(function(e){e.innerHTML=0}),$$(“.form-grading-error”).each(function(e){e.innerHTML=””}),$$(“form”)[0].readAttribute(“data-autofill”)&&setTimeout(function(){for(var e in JotForm.defaultValues){var t=$(e);!t||”radio”!=t.type&&”checkbox”!=t.type||(t.checked=!0)}var o=$$(“form”).first().readAttribute(“id”)+$$(“form”).first().readAttribute(“name”),r=AutoFill.getInstance(o);r&&-1===window.location.href.indexOf(“jotform.pro”)&&r.saveAllData()},40),setTimeout(function(){$$(“.custom-hint-group”).each(function(e){e.hasContent=!(!e.value||e.value.replace(/n/gim,”
“)==e.readAttribute(“data-customhint”)),e.showCustomPlaceHolder()})},30),setTimeout(function(){$$(“.nicEdit-main”).each(function(e){var t=e.up(“.form-line”).down(“textarea”);t&&(t.hasClassName(“custom-hint-group”)&&!t.hasContent?e.setStyle({color:”#babbc0″}):e.setStyle({color:””}),e.innerHTML=t.value)})},40),setTimeout(function(){$(“coupon-button”)&&$(“coupon-button”).triggerEvent&&$(“coupon-button”).triggerEvent(“click”),$(“payment_total”)&&JotForm.totalCounter(JotForm.prices)},40),setTimeout(function(){$$(“input.form-widget”).each(function(e){e.value=””,e.fire(“widget:clear”,{qid:parseInt(e.id.split(“_”)[1])})})},40),setTimeout(function(){$$(“.currentDate”).each(function(e){var t=e.id.replace(/day_/,””);JotForm.formatDate({date:new Date,dateField:$(“id_”+t)})}),$$(“.currentTime”).each(function(e){if(e.up(“.form-line”)){var t=e.up(“.form-line”).id.replace(“id_”,””);$(“hour_”+t)?JotForm.displayLocalTime(“hour_”+t,”min_”+t,”ampm_”+t):JotForm.displayLocalTime(“input_”+t+”_hourSelect”,”input_”+t+”_minuteSelect”,”input_”+t+”_ampm”)}})},40),setTimeout(function(){JotForm.runAllConditions()},50)}}),$$(“.form-submit-print”).each(function(e){e.observe(“click”,function(){$(e.parentNode).hide();var t=[],o=[];$$(“.form-textarea, .form-textbox”).each(function(e){var r;e.type||(e.value=e.value||”0″),(r=e.next(“.date-separate”))&&r.hide();e.value.length div:nth-child(1)”).each(function(r){“on”==r.readAttribute(“unselectable”)&&($$(“#cid_”+e.id.split(“_”)[1]+” > div”)[0].hide(),$$(“#cid_”+e.id.split(“_”)[1]+” > div”)[1].setStyle({borderTopStyle:”solid”,borderWidth:”1px”,borderTopColor:”rgb(204, 204, 204)”}),t.push($$(“#cid_”+e.id.split(“_”)[1]+” > div”)[0]),o.push(e))})}),window.print();for(var r=0;ri?($(“grade_error_”+t).innerHTML=” “+JotForm.texts.lessThan+” “+i+”.”,JotForm.errored(this,JotForm.texts.gradingScoreError+” “+i)):JotForm.corrected(this)}return JotForm.corrected(this)}})},initSpinnerInputs:function(){$$(“.form-spinner-input”).each(function(e){e.observe(“blur”,function(){e.validateSpinnerInputs()}).observe(“change”,function(){e.validateSpinnerInputs()});var t=e.up(“.form-spinner”),o=t.select(“.form-spinner-up”)[0],r=t.select(“.form-spinner-down”)[0];o.observe(“click”,function(t){e.validateSpinnerInputs()}),r.observe(“click”,function(t){e.validateSpinnerInputs()}),e.validateSpinnerInputs=function(){this.id.replace(/input_(d+)_d+/,”$1″);var e=this.value||0;if(this.errored=!1,!JotForm.isVisible(this))return JotForm.corrected(this);if(e&&!/^(-?d+[.]?)+$/.test(e)&&!/^([.]d+)+$/.test(e))return JotForm.errored(this,JotForm.texts.numeric);if(this.hasClassName(“disallowDecimals”)&&e%1!=0)return JotForm.errored(this,JotForm.texts.disallowDecimals);var t=parseInt(this.readAttribute(“data-spinnermin”))||!1,o=parseInt(this.readAttribute(“data-spinnermax”))||!1;return t&&eo?JotForm.errored(this,JotForm.texts.inputCarretErrorB+” “+o):JotForm.corrected(this)}})},initNumberInputs:function(){$$(“.form-number-input”).each(function(e){e.observe(“blur”,function(){e.validateNumberInputs()}).observe(“change”,function(){e.validateNumberInputs()}).observe(“keyup”,function(){e.validateNumberInputs()}).observe(“keypress”,function(t){if(!t.metaKey&&!t.ctrlKey){var o=[8,9,13,35,36,37,39].join(“,”).match(new RegExp(t.which));if(!t.which||48=parseInt(e.readAttribute(“maxlength”))||t.which57))return;t.preventDefault()}else t.preventDefault()}}),e.validateNumberInputs=function(){var e=this;e.id.replace(/input_(d+)_d+/,”$1″);if(e.errored=!1,!JotForm.isVisible(e))return JotForm.corrected(e);if(“”!==e.value&&!/^-?(d+[.]?)+$|([.]d+)+$/.test(e.value)&&!0!==e.hinted)return JotForm.errored(e,JotForm.texts.numeric);var t=parseInt(e.readAttribute(“data-numbermin”)),o=parseInt(e.readAttribute(“data-numbermax”)),r=parseInt(e.readAttribute(“maxlength”));if(r&&e.value&&e.value.length>r)return JotForm.errored(e,JotForm.texts.maxDigitsError+” “+r);if((t||0==t)&&parseInt(e.value)o)return JotForm.errored(e,JotForm.texts.inputCarretErrorB+” “+o);var n=!1;return e.up(“.form-matrix-table”)&&e.up(“.form-matrix-table”).select(“input”).each(function(t){t!==e&&t.hasClassName(“form-validation-error”)&&(n=!0)}),n?void 0:JotForm.corrected(e)}})},backStack:[],currentSection:!1,autoNext:function(e){if($(“cid_”+e)){var t=$(“cid_”+e).previous();if(t){var o=t.readAttribute(“data-type”);”control_radio”!==o&&”control_dropdown”!==o||t.observe(“change”,function(o){if(JotForm.isVisible(t)&&””!==o.target.value){var r=$(“cid_”+e).down(“.form-pagebreak-next”);r&&r.triggerEvent&&(r.focus(),r.setStyle({fontWeight:”bold”}),setTimeout(function(){r.setStyle({fontWeight:”inherit”}),r.triggerEvent(“mousedown”),r.triggerEvent(“click”)},800))}})}}},handlePages:function(){var e,t=this,o=[];if($$(“.form-label-left”).length>0){var r=parseInt($$(“.form-label-left”)[0].getStyle(“width”)),n=parseInt($$(“.form-all”)[0].getStyle(“width”)),a=r>n/2?n/2:r;$$(“.form-pagebreak-back-container”).each(function(e){“”===e.style.width&&(e.style.width=a-14+”px”)})}if($$(“.form-pagebreak”).each(function(e,r){var n=$(e.parentNode.parentNode);r>=1?n.hide():JotForm.currentSection=n,o.push(n),n.pagesIndex=r+1,document.onkeypress=function(e){var t=(e=e||event||null).target?e.target:e.srcElement?e.srcElement:null;if(13==e.keyCode&&[“text”,”radio”,”checkbox”,”select-one”,”select-multiple”].include(t.type))return!1;(13==e.keyCode||32==e.which)&&e.target.hasClassName(“form-pagebreak-next”)&&e.target.triggerEvent&&e.target.triggerEvent(“mousedown”)};var a=function(){if(“undefined”!=typeof FormTranslation&&FormTranslation.properties&&”1″===FormTranslation.properties.firstPageOnly){var e=$$(“.language-dd”).length>0&&$$(“.language-dd”).first();if(!e)return;JotForm.currentSection===o.first()?e.show():e.hide()}},i=JotForm.getForm(n);n.select(“.form-pagebreak-next”).invoke(“observe”,”click”,function(){if(!JotForm.saving&&!JotForm.loadingPendingSubmission)if(JotForm.validateAll(i,n)||””!==getQuerystring(“qp”)){if(!t.noJump&&window.parent&&window.parent!=window&&window.parent.postMessage(“scrollIntoView::”+i.id,”*”),!JotForm.nextPage)for(var e=$$(“.form-all > .page-section”),o=e.indexOf(n);o .page-section”),o=JotForm.backStack.pop();JotForm.backStack.length>0;){var r=e.indexOf(o)+1;if(!0!==JotForm.hidePages[r])break;o=JotForm.backStack.pop()}JotForm.currentSection=JotForm.showFormSection(o),t.noJump||window.parent!=window||JotForm.currentSection.scrollIntoView(!0),JotForm.nextPage=!1,JotForm.enableDisableButtonsInMultiForms(),JotForm.saveForm&&JotForm.hiddenSubmit(JotForm.getForm(n)),$$(“.form-button-error”).invoke(“remove”),JotForm.iframeHeightCaller(),a(),setTimeout(function(){JotForm.runAllCalculations(!0)},10)}})}),o.length>0){var i=$$(“.form-section:not([id^=section_])”);if(i.length>0&&(e=i[i.length-1]),e){e.pagesIndex=i.length,o.push(e),e.hide();var s=new Element(“li”,{className:”form-input-wide”}),l=new Element(“div”,{className:”form-pagebreak”}),u=new Element(“div”,{className:”form-pagebreak-back-container”}),d=$$(“.form-pagebreak-back-container”)[0].select(“button”)[0];d.observe(“click”,function(){JotForm.saving||(e.hide(),JotForm.nextPage=!1)}),u.insert(d),l.insert(u),s.insert(l),e.insert(s)}}},jumpToPage:function(){var e=document.get.jumpToPage,t=$$(“.form-section:not([id^=section_])”);e&&e>1&&!(e>t.length)&&(JotForm.hideFormSection(t[0]),JotForm.showFormSection(t[e-1]),e>1&&(JotForm.backStack=t.splice(0,e-1)),JotForm.runAllCalculations(!0))},hideFormSection:function(e){return e.addClassName(“js-non-displayed-page”),e.style.display=””,e.style.position=”absolute”,e.style.top=”-9999px”,e.style.left=”-9999px”,e},showFormSection:function(e){return e.removeClassName(“js-non-displayed-page”),e.style.display=””,e.style.position=””,e.style.top=””,e.style.left=””,e},handleFormCollapse:function(){var e=this,t=!1,o=0;$$(“.form-collapse-table”).each(function(r){var n=$(r.parentNode.parentNode);”form-section-closed”==n.className?n.closed=!0:n.select(“.form-collapse-hidden”).length0&&($$(“#id_”+t+’ [class*=”cc”]’).each(function(e){if(!e.getValue())throw o=JotForm.texts.ccMissingDetails,$break}),o?(Event.stop(e),setTimeout(function(){JotForm.errored($$(“.cc_firstName”)[0],o);var e=$$(“.cc_number”)[0];if(!e.isVisible()&&!e.up(“li”).hasClassName(“form-field-hidden”)&&!e.up(“ul”).hasClassName(“form-field-hidden”)&&$$(“ul.form-section.page-section”).length>1){var t=[];if($$(“.form-submit-button”).each(function(e){e.isVisible()&&t.push(e)}),t.length”+o+”

“),$(r.parentNode.parentNode).insert(n)}JotForm.enableButtons()},500)):JotForm.corrected($$(“.cc_firstName”)[0]))})},handlePaypalPro:function(){if($(“creditCardTable”)){var e=$$(“.jotform-form”)[0],t=$$(‘input[name=”simple_fpc”]’)[0].value;Event.observe(e,”submit”,function(e){if(JotForm.isEditMode())return!0;if(JotForm.isPaymentSelected()&&JotForm.paymentTotal>0){var o=””;JotForm.corrected($$(“.paymentTypeRadios”)[0]),$$(“.paymentTypeRadios”)[0].checked||$$(“.paymentTypeRadios”)[1].checked||(o=”You must select a payment method”),$(“input_”+t+”_paymentType_credit”).checked&&$$(“#id_”+t+’ [class*=”cc”]’).each(function(e){if(!e.getValue())throw o=”All fields are required”,$break}),o?(JotForm.errored($$(“.paymentTypeRadios”)[0],o),Event.stop(e)):JotForm.corrected($$(“.paymentTypeRadios”)[0])}}),$$(“.paymentTypeRadios”).each(function(e){e.observe(“click”,function(){e.checked&&”express”===e.value&&JotForm.setCreditCardVisibility(!1),e.checked&&”credit”===e.value&&(JotForm.paymentTotal>0||0===Object.keys(JotForm.discounts).length)&&JotForm.setCreditCardVisibility(!0),JotForm.corrected($$(“.paymentTypeRadios”)[0]),JotForm.togglePaypalButtons(e.checked&&”express”===e.value)})})}},description:function(e,t){if(“20″!=t){var o=!1;if(!$(e)){var r=e.replace(/[^d]/gim,””);if($(“id_”+r))e=$(“id_”+r),o=!0;else{if(!$(“section_”+r))return;e=$(“section_”+r),o=!0}}$(e).setSliderValue&&(e=$($(e).parentNode));var n=JotForm.getContainer(e);if(n){var a,i=!1,s=new Element(“div”,{className:”form-description”}),l=new Element(“div”,{className:”form-description-arrow”}),u=new Element(“div”,{className:”form-description-arrow-small”}),d=new Element(“div”,{className:”form-description-content”});if(“desc”in document.get&&”v2″==document.get.desc&&(i=!0,n.insert(a=new Element(“div”,{className:”form-description-indicator”})),s.addClassName(“right”)),d.insert(t),s.insert(l).insert(u).insert(d).hide(),n.insert(s),n.getWidth()/20&&n.each(function(e){e.id.split(“_”)[1];switch(e.readAttribute(“data-type”)){case”input-number”:r=!!e.validateNumberInputs()&&r;break;case”input-spinner”:r=!!e.validateSpinnerInputs()&&r;break;case”input-grading”:r=!!e.validateGradingInputs()&&r}}),window.signatureForm){o(“signature form”);for(var a=jQuery(“.pad”),i=0;i ‘}).setStyle({color:”red”}),r.errored=!0)}var n=JotForm.getContainer(e);e.errored=!0,e.addClassName(“form-validation-error”),n.addClassName(“form-line-error”);var a=n;return(a=n.select(“.form-input”)[0])||(a=n.select(“.form-input-wide”)[0]),a||(a=n),a.select(“.form-error-message”).invoke(“remove”),a.insert(new Element(“div”,{className:”form-error-message”}).insert(‘ ‘+t).insert(new Element(“div”,{className:”form-error-arrow”}).insert(new Element(“div”,{className:”form-error-arrow-inner”})))),JotForm.iframeHeightCaller(),!1},corrected:function(e){(e=$(e)).errored=!1;var t=JotForm.getContainer(e);if(!t)return!0;if(t.select(‘*[class*=”validate”]’).each(function(e){e.errored=!1}),t.select(“.form-validation-error”).invoke(“removeClassName”,”form-validation-error”),t.removeClassName(“form-line-error”),t.select(“.form-error-message”).invoke(“remove”),JotForm.isCollapsed(e)){var o=JotForm.getCollapseBar(e);o.errored&&o.up(“.form-section-closed”)&&0==o.up(“.form-section-closed”).select(“.form-validation-error”).length&&(o.select(“.form-collapse-mid”)[0].setStyle({color:””}).select(“img”)[0].remove(),o.errored=!1)}return setTimeout(function(){0==$$(“.form-validation-error”).length&&JotForm.hideButtonMessage()},100),JotForm.iframeHeightCaller(),!0},hideButtonMessage:function(){“cardform”==window.FORM_MODE&&$$(“.form-submit-button”).each(function(e){var t=e.parentNode.parentNode,o=t.select(“.form-button-error”)[0];if(o&&t.hasClassName(“jfCard”)){var r=t.getBoundingClientRect(),n=o.getBoundingClientRect(),a=t.select(“.jfCard-question”)[0];if(a){var i=a.getBoundingClientRect(a);t.style.maxHeight=r.height+n.height,a.style.maxHeight=i.height+n.height,t.parentNode.style.paddingBottom=”unset”}}}),$$(“.form-button-error”).invoke(“remove”)},showButtonMessage:function(e){this.hideButtonMessage(),$$(“.form-submit-button”).each(function(t){var o=new Element(“div”,{className:”form-button-error”});o.insert(“

“+(void 0!==e?e:JotForm.texts.generalError)+”

“);var r=t.parentNode.parentNode;if($(r).insert(o),r.hasClassName(“jfCard”)){var n=r.getBoundingClientRect(),a=document.querySelector(“#cardProgress”),i=a.getBoundingClientRect(),s=o.getBoundingClientRect();if(s.bottom>i.top&&”none”!==getComputedStyle(a).display){var l=r.select(“.jfCard-question”)[0];if(l){var u=l.getBoundingClientRect(l);r.style.maxHeight=n.height-s.height,l.style.maxHeight=u.height-s.height,r.parentNode.style.paddingBottom=s.height}}}})},disableGoButton:function(){-1==navigator.appVersion.indexOf(“iPhone”)&&-1==navigator.appVersion.indexOf(“iPad”)&&-1==navigator.appVersion.indexOf(“Android”)||$$(“input”).each(function(e){e.observe(“keypress”,function(e){13===(e.keyCode?e.keyCode:e.which)&&e.preventDefault()})})},disableSubmitForCard:function(e,t){“cardform”===window.FORM_MODE&&window.CardForm&&window.CardForm.cards&&(JotForm.disableSubmitButton=t,JotForm.disableSubmitButtonMessage=e&&e.disableSubmitErrorMessage?e.disableSubmitErrorMessage:”You are not eligible to submit this form.”,t||JotForm.toggleDisableSubmitMessage())},toggleDisableSubmitMessage:function(){var e=window.CardForm.getLastVisibleIndex();if(e&&document.getElementsByClassName(“jfCard-disableSubmitError”)){var t=document.getElementsByClassName(“jfCard-disableSubmitError”)[e];if(!t)return;t.innerHTML=”

“+JotForm.disableSubmitButtonMessage+”

“,t.style.display=JotForm.disableSubmitButton?”block”:”none”}},validator:function(){if(this.debugOptions&&this.debugOptions.stopValidations)return this.info(“Validations stopped by debug parameter”),!0;$A(JotForm.forms).each(function(e){e.validationSet||(e.validationSet=!0,e.observe(“submit”,function(t){try{if($(“payment_total_checksum”)&&($(“payment_total_checksum”).value=JotForm.paymentTotal),$$(“.form-submit-button”)&&$$(“.form-submit-button”).length>0){var o=!1;$$(“.form-submit-button”).each(function(e){JotForm.isVisible(e.parentNode)&&(o=!0)}),o||(JotForm.enableButtons(),t.stop())}if(JotForm.disableSubmitButton)return JotForm.toggleDisableSubmitMessage(),JotForm.enableButtons(),void t.stop();if(!JotForm.validateAll(e)){if(JotForm.enableButtons(),JotForm.showButtonMessage(),JotForm.submitError)if(“jumpToSubmit”==JotForm.submitError){var r=[];$$(“.form-submit-button”).each(function(e){JotForm.isVisible(e)&&r.push(e)}),r.length>0&&(r[r.length-1].up(“.form-line”)?r[r.length-1].up(“.form-line”).scrollIntoView(!1):r[r.length-1].scrollIntoView(!1))}else”jumpToFirstError”==JotForm.submitError&&setTimeout(function(){var e=$$(“.form-error-message”).first();if(e&&(JotForm.isCollapsed(e)&&JotForm.getCollapseBar(e).run(“click”),!JotForm.noJump&&e.up(“.form-line”))){e.up(“.form-line”).scrollIntoView();var t=e.up(“.form-line”).down(“input,select,textarea”);t&&t.focus()}},100);return $$(“.custom-hint-group”).each(function(e){e.showCustomPlaceHolder()}),void t.stop()}if($$(“.form-radio-other,.form-checkbox-other”).each(function(e){!e.checked&&JotForm.getOptionOtherInput(e)&&JotForm.getOptionOtherInput(e).disable()}),JotForm.runAllCalculations(!0),$$(“textarea.form-textarea:first-child”).each(function(e){if(e.value){e.value=e.value.replace(/&/g,”&”).replace(/,”<").replace(/>/g,”>”).replace(/”/g,”””).replace(/’/g,”‘”),textEl=e.clone(),textEl.writeAttribute(“disabled”,”true”),textEl.innerHTML=e.value,e.up().appendChild(textEl),e.hide()}}),$$(“input, select, textarea”).length>900&&$$(“.form-matrix-table”).each(function(e){var t={};e.select(“input, select”).each(function(e){var o=e.id.split(“_”),r=o[2],n=o[3];”radio”==e.type?e.checked?t[r]=e.value:r in t||(t[r]=!1):(r in t||(t[r]={}),”checkbox”==e.type?t[r][n]=!!e.checked&&e.value:t[r][n]=e.value),e.writeAttribute(“disabled”,”true”)});try{var o=e.down(“input, select”).readAttribute(“name”).split(“[“)[0],r=new Element(“textarea”).setStyle({display:”none”});e.insert({after:r}),r.value=JSON.stringify(t),r.writeAttribute(“name”,o)}catch(e){console.log(e)}}),JotForm.autoFillDeployed&&!JotForm.payment&&void 0!==window.localStorage){var n=$$(“form”).first().readAttribute(“id”)+$$(“form”).first().readAttribute(“name”);AutoFill.getInstance(n).stopSavingData(),window.localStorage.clear()}}catch(e){return JotForm.error(e),void t.stop()}if($$(“.time-dropdown”).each(function(e){e.enable()}),$$(“.form-checkbox, .form-radio”).each(function(e){var t=e.up(“.form-line”)?e.up(“.form-line”).getAttribute(“data-type”):null,o=JotForm.stripe&&void 0!==JotForm.stripe.validateStripe;t&&[“control_stripe”,”control_paypalSPB”].indexOf(t)>-1&&(o||”control_paypalSPB”===t)||(e.up(“.form-product-item”)&&e.disabled&&e.checked&&e.observe(“click”,function(e){e.preventDefault(),setTimeout(JotForm.countTotal,20)}),e.enable())}),$$(“.conditionallyDisabled”).each(function(e){e.enable()}),”dontClear”!==JotForm.clearFieldOnHide&&$$(“.form-field-hidden input”,”.form-field-hidden select”,”.form-field-hidden textarea”).each(function(e){“simple_fpc”!=e.name&&(“INPUT”==e.tagName&&[“checkbox”,”radio”].include(e.type)?e.checked=!1:e.clear())}),JotForm.compact&&0==JotForm.imageSaved)return t.stop(),window.parent.saveAsImage(),void $(document).observe(“image:loaded”,function(){var t;$(document.body).insert(t=new Element(“div”).setStyle(“position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.85);”)),t.insert(”),setTimeout(function(){e.submit()},1e3)});”cardform”==window.FORM_MODE&&Array.prototype.forEach&&CardForm&&CardForm.cards&&window.toMarkdown&&Array.prototype.forEach.call(CardForm.cards,function(e,t){e.markdownEditor&&e.markdownEditor.setMarkdownFromHtml&&e.markdownEditor.setMarkdownFromHtml()});var a=$$(‘[data-invisible-captcha=”true”]’);if(!!a.length){var i=a[0].select(‘[name=”recaptcha_invisible”]’)[0];if(!(i&&i.getValue()))return window.grecaptcha.execute(),JotForm.enableButtons(),void t.stop()}if(JotForm.isEncrypted){var s={};$A(JotForm.conditions).each(function(e){e.disabled||”url”!==e.type||(s[e.id]=JotForm.checkCondition(e))}),JotForm.encryptAll(t,function(t){t&&(Object.keys(s).length>0&&e.insert(new Element(“input”,{type:”hidden”,name:”redirectConditions”}).putValue(JSON.stringify(s))),e.submit())})}}),$$(“#”+e.id+’ *[class*=”validate”]’).each(function(e){JotForm.setFieldValidation(e)}),$$(“.form-upload”).each(function(e){try{var t=!!e.validateInput,o=e.validateInput||Prototype.K;e.validateInput=function(){if(e.errored=!1,!1!==o()){if(!e.files)return!0;var t=e.readAttribute(“accept”)||e.readAttribute(“data-file-accept”)||e.readAttribute(“file-accept”)||””,r=e.readAttribute(“maxsize”)||e.readAttribute(“data-file-maxsize”)||e.readAttribute(“file-maxsize”)||””,n=e.readAttribute(“minsize”)||e.readAttribute(“data-file-minsize”)||e.readAttribute(“file-minsize”)||””,a=t.strip().toLowerCase().split(/s*,s*/gim);for(var i in a)”string”==typeof a[i]&&(a[i]=”.”===a[i].slice(0,1)?a[i].slice(1):a[i]);var s=1024*parseInt(r,10),l=1024*parseInt(n,10),u=e.files[0];if(!u)return!0;u.fileName||(u.fileName=u.name);var d=””;if(JotForm.getFileExtension(u.fileName)&&(d=JotForm.getFileExtension(u.fileName)),”*”!=t&&!a.include(d)&&!a.include(d.toLowerCase()))return JotForm.errored(e,JotForm.texts.uploadExtensions+”
“+t);var c=e.readAttribute(“data-imagevalidate”)||!1;if((a.include(d)||a.include(d.toLowerCase()))&&c&&(“yes”===c||”true”===c)&&(“jpeg, jpg, png, gif, bmp”.include(d)||”jpeg, jpg, png, gif, bmp”.include(d.toLowerCase()))&&void 0!==window.FileReader){var m=new FileReader;m.onloadend=function(t){var o={filename:u.name,size:u.size,binary:function(e){for(var t=””,o=new Uint8Array(e),r=o.length,n=0;ns&&0!==s?JotForm.errored(e,JotForm.texts.uploadFilesize+” “+r+”Kb”):u.fileSize-1||e.indexOf(“+”)>-1)&&(t=e.split(/[+-]/)[1],t=e.indexOf(“-“)>-1?”-“+t:””+t,e=e.split(/[+-]/)[0]),e=e.replace(/[{}]/g,””),!$(“year_”+e)||!$(“year_”+e).value)return!1;var o=$(“year_”+e).value,r=$(“month_”+e).value,n=$(“day_”+e).value,a=new Date(o,r-1,n);return t.length&&a.setDate(a.getDate()+parseInt(t,10)),a},getInputValidations:function(e){return e?e.className.replace(/.*validate[(.*)].*/,”$1”).split(/s*,s*/):[]},setFieldValidation:function(e){var t=this,o=JotForm.validationRegexes;e.validateInput=function(r,n){if(document.get.ignoreValidation&&”true”===document.get.ignoreValidation)return!0;if(!JotForm.isVisible(e)&&!e.hasClassName(“g-recaptcha-response”))return!0;if(“control_datetime”===JotForm.getContainer(e).getAttribute(“data-type”)&&!JotForm.getContainer(e).down(‘input[id*=”month_”]’).dateTimeCheck(!1))return!1;$(e.parentNode).hasClassName(“form-matrix-values”)||e.hasClassName(“form-subproduct-option”)||e.hasClassName(“time-dropdown”)||e.id.match(/_quantity_/)||e.id.match(/_custom_/)||JotForm.corrected(e);var a=JotForm.getInputValidations(e);if(!0===e.hinted&&(e.clearHint(),setTimeout(function(){e.hintClear()},150)),”function”==typeof e.overridenValidateInput)return e.overridenValidateInput(e,r,n);if(“input-spinner”===e.readAttribute(“data-type”)&&e.value)return e.validateSpinnerInputs();if(“input-grading”===e.readAttribute(“data-type”)&&e.value)return e.validateGradingInputs();if(“input-number”===e.readAttribute(“data-type”)&&e.value)return e.validateNumberInputs();if(e.readAttribute(“data-min-amount”))return e.validateMinimum();if(e.limitValidation&&e.classList.contains(“mdInput”)){var i=e.limitValidation();if(!1!==i)return JotForm.errored(e,i)}if(!e.up(“.form-line”)||!e.up(“.form-line”).down(“.form-textarea-limit-indicator-error”)){if(a.include(“disallowFree”))for(var s=0;s-1)return JotForm.errored(e,JotForm.texts.freeEmailError,n);if(a.include(“minSelection”)||a.include(“minselection”)){var l=parseInt(e.readAttribute(“data-minselection”)),u=0;if(e.up(“.form-line”).select(“input[type=checkbox]”).each(function(e){e.checked&&u++}),u>0&&ud)return JotForm.errored(e,JotForm.texts.maxSelectionsError.replace(/s*$/,””)+” “+d+”.”,n)}if(a.include(“disallowPast”)){var c=e.id.split(“_”).last(),m=JotForm.getDateValue(c).split(“T”)[0],p=new Date,f=p.getMonth()+1-1){var k=JotForm.dateFromField(x.custom[E]);return(k=JotForm.addZeros(k.getFullYear(),2)+”-“+JotForm.addZeros(k.getMonth()+1,2)+”-“+JotForm.addZeros(k.getDate(),2))===J+”-“+f+”-“+h?JotForm.errored(e,JotForm.texts.dateLimited,n):void 0}if(x.custom[E]===J+”-“+f+”-“+h||”string”==typeof x.custom[E]&&5===x.custom[E].length&&x.custom[E]===f+”-“+h||”string”==typeof x.custom[E]&&2===x.custom[E].length&&x.custom[E]==h)return JotForm.errored(e,JotForm.texts.dateLimited,n)}var S=new Date($(“year_”+c).value,$(“month_”+c).value-1,$(“day_”+c).value);if(“ranges”in x&&!1!==x.ranges&&Array.isArray(x.ranges))for(E=0;E”)){var A=x.ranges[E].split(“>”);if(A[0].indexOf(“{“)>-1)I=JotForm.dateFromField(A[0]);else{var N=A[0].split(“-“);I=new Date(N[0],parseInt(N[1])-1,N[2])}if(A[1].indexOf(“{“)>-1)P=JotForm.dateFromField(A[1]);else{var T=A[1].split(“-“);P=new Date(T[0],parseInt(T[1])-1,T[2])}if(P&&(P.setDate(P.getDate()+1),S.getTime()>=I.getTime()&&S.getTime()

(M=new Date))return JotForm.errored(e,JotForm.texts.dateLimited,n);if(“past”in x&&!1===x.past){var M=new Date,O=new Date;if(O.setDate(M.getDate()-1),S-1){var I;if(S(P=new Date(T[0],T[1]-1,T[2])))return JotForm.errored(e,JotForm.texts.dateLimited,n)}else if(x.end.indexOf(“{“)>-1){var P;if(S>(P=JotForm.dateFromField(x.end)))return JotForm.errored(e,JotForm.texts.dateLimited,n)}}}catch(e){console.log(e)}if(a.include(“validateLiteDate”)&&e.hasClassName(“invalidDate”)){var B=e.readAttribute(“placeholder”);return JotForm.errored(e,JotForm.texts.dateInvalid.replace(“{format}”,B),n)}if(a.include(“Email_Confirm”)){var L=e.id.replace(/.*_(d+)(?:_confirm)?/gim,”$1″);if($(“input_”+L).value!=$(“input_”+L+”_confirm”).value)return JotForm.errored(e,JotForm.texts.confirmEmail,n);if($(“input_”+L+”_confirm”).value&&!o.email.test($(“input_”+L+”_confirm”).value))return JotForm.errored(e,JotForm.texts.email,n)}if(a.include(“required”)){if(“control_signature”==JotForm.getContainer(e).getAttribute(“data-type”)){var j=e;if(“true”===jQuery(j).attr(“data-required”))if(jQuery(“#id_”+jQuery(j).attr(“data-id”)).is(“:visible”))return 0!=jQuery(j).jSignature(“getData”,”base30″)[1].length||jQuery(j).hasClass(“edit-signature”)?JotForm.corrected(e):JotForm.errored(e,JotForm.texts.required,n)}if(“INPUT”==e.tagName&&”file”==e.readAttribute(“type”)){var q=e.up(“.form-input”)||e.up(“.form-input-wide”);return”multiple”===e.readAttribute(“multiple”)||e.hasAttribute(“multiple”)?JotForm.isFillingOffline()?e.value.empty()?JotForm.errored(e,JotForm.texts.required,n):JotForm.corrected(e):e.up(“div[class*=validate[multipleUpload]]”).validateInput():e.value.empty()&&!(e.uploadMarked||q&&q.uploadMarked)?JotForm.errored(e,JotForm.texts.required,n):JotForm.corrected(e)}if(“INPUT”!=e.tagName||”radio”!=e.readAttribute(“type”)&&”checkbox”!=e.readAttribute(“type”)){if((“INPUT”==e.tagName||”SELECT”==e.tagName)&&($(e).up().hasClassName(“form-matrix-values”)||$(e).up(1).hasClassName(“form-matrix-values”))){z={};var H=!1;Q=!1;return(e.up(“table”)?e.up(“table”):e.up(“.jfMatrix”)).select(e.tagName).each(function(e){e.name in z||(z[e.name]=!1),!0!==z[e.name]&&(z[e.name]=e.value&&!e.value.strip(” “).empty()),!0===z[e.name]&&(H=!0),”value”in e&&e.value.strip(” “).empty()&&(Q=!0)}),a.include(“requireEveryRow”)&&!$H(z).values().all()?JotForm.errored(e,JotForm.texts.requireEveryRow,n):a.include(“requireOneAnswer”)&&!H?JotForm.errored(e,JotForm.texts.requireOne,n):a.include(“requireEveryCell”)&&Q?JotForm.errored(e,JotForm.texts.requireEveryCell,n):JotForm.corrected(e)}if(“INPUT”!==e.tagName&&”SELECT”!==e.tagName||!e.hasClassName(“form-subproduct-option”)){if(e.name&&e.name.include(“[“))try{if(“matrix”===$(e).getAttribute(“data-component”)&&($(e).up().hasClassName(“form-matrix-values-disabled”)||$(e).up(1).hasClassName(“form-matrix-values-disabled”)))return!0;ee=t.getContainer(e);e.hasClassName(“form-address-search”)&&ee.select(“.jfQuestion-clean”).length>0?inputs=[e]:inputs=ee.select(“input,select[name*=”+e.name.replace(/[.*$/,””)+”]”);var R=inputs.map(function(t){if(t.hasClassName(“form-address-state”)){var o=ee.select(“.form-address-country”)[0].value;if(“United States”!=o&&”Canada”!=o&&””!=o)return t.removeClassName(“form-validation-error”),t.__skipField=!0,!1}else t.__skipField&&(t.__skipField=!1);if(t.id.match(/_donation/))return 0==t.getValue();if(“cardform”!==window.FORM_MODE&&t.name&&t.name.match(/cc_/))return 0==JotForm.paymentTotal;if(t.id.match(/input_[0-9]+_quantity_[0-9]+_[0-9]+/)){var r=$(t.id.replace(“_quantity”,””).match(/input_[0-9]+_[0-9]+/)[0]),a=$$(‘[id*=”‘+t.id.match(/input_[0-9]*/)[0]+'”][type=”‘+r.getAttribute(“type”)+'”]’);if(6===t.id.split(“_”).length)var i=$$(‘[id*=”‘+t.id.replace(/_[0-9]*_[0-9]*$/,””)+'”]’);if(r.checked&&!i&&(isNaN(t.value)||0==t.value||t.value.empty())||!a.map(function(e){return e.checked}).any()||r.checked&&i&&!i.map(function(e){return e.value>0}).any())return t.addClassName(“form-validation-error”),!0}if(t.className.replace(/.*validate[(.*)].*/,”$1″).split(/s*,s*/).include(“required”)&&JotForm.isVisible(t)){if(t.value.empty()||”Please Select”==t.value.strip()){if(“cardform”!=window.FORM_MODE&&t.hasClassName(“form-dropdown”)&&t.hasAttribute(“multiple”)){for(var s=0,l=0,u=1;u=1)return!(s>l)}return n||t.addClassName(“form-validation-error”),!0}if(JotForm.getContainer(t).hasClassName(“form-datetime-validation-error”))return JotForm.errored(e,”Enter a valid date”,n)}return t.hasClassName(“js-forMixed”)||t.removeClassName(“form-validation-error”),!1});if(JotForm.payment&&ee.getAttribute(“data-type”).match(JotForm.payment)&&JotForm.isEditMode())return JotForm.corrected(e);if(R.any()){if(JotForm.payment&&ee.getAttribute(“data-type”).match(JotForm.payment)&&JotForm.isPaymentSelected()&&0==JotForm.paymentTotal)return JotForm.corrected(e);if(e.hasClassName(“form-address-search”)&&ee.select(“.jfQuestion-clean”).length0||e.value>0}).any()?JotForm.corrected(e):JotForm.errored(e,JotForm.texts.required,n)}}else if($(e.parentNode).hasClassName(“form-matrix-values”)){e.readAttribute(“type”);var z={},W=!1,Q=!1;if((e.up(“table”)?e.up(“table”):e.up(“.jfMatrix”)).select(“input”).each(function(e){e.name in z||(z[e.name]=!1),!0!==z[e.name]&&(z[e.name]=e.checked),!0===z[e.name]&&(W=!0),”value”in e&&e.value.strip(” “).empty()&&(Q=!0)}),!a.include(“requireOneAnswer”))return a.include(“requireEveryCell”)&&Q?JotForm.errored(e,JotForm.texts.requireEveryCell,n):$H(z).values().all()?JotForm.corrected(e):JotForm.errored(e,JotForm.texts.requireEveryRow,n);if(!W)return JotForm.errored(e,JotForm.texts.requireOne,n)}else{var G=e.up(“.form-“+e.type+”-item”)?e.up(“.form-“+e.type+”-item”).down(“.form-“+e.type+”-other-input”):null;if(G&&e.checked&&””==G.value)return JotForm.errored(e,JotForm.texts.required);var K=e.name.substr(0,e.name.indexOf(“[“)),X=K+”[other]”,Z=[];if(document.getElementsByName(X)[0]){if((Z=$A(document.getElementsByName(K+”[]”)))[Z.length]=document.getElementsByName(X)[0],!Z.map(function(e){return e.checked}).any())return JotForm.errored(e,JotForm.texts.required,n)}else{var ee=JotForm.getContainer(e);if(JotForm.payment&&ee.getAttribute(“data-type”).match(JotForm.payment)){if(!$A(document.getElementsByName(e.name)).map(function(e){if(JotForm.isVisible(e)){if(“checkbox”===e.readAttribute(“type”)&&e.value.indexOf(“_expanded”)>-1)return!!e.checked&&$A($$(“#”+e.id+”_subproducts .form-subproduct-quantity”)).map(function(e){return e.getSelected().value>0||e.value>0}).any();if($(e.id+”_custom_price”))return e.checked&&$(e.id+”_custom_price”).getValue()>0;var t=!!e.up(“.form-product-item”)&&e.up(“.form-product-item”).down(‘select[id*=”quantity”], input[id*=”quantity”]’);return t?e.checked&&t.getValue()>0:e.checked}if(JotForm.productPages&&JotForm.productPages.totalPage>1&&ee.select(“.product–selected”).length>0)return JotForm.corrected(e),!0}).any()||”cardform”===window.FORM_MODE&&0===ee.select(“.product–selected”).length)return e.hasClassName(“paymentTypeRadios”)?JotForm.errored(e,”Please select payment method.”,n):JotForm.errored(e,JotForm.texts.required,n);$A(ee.querySelectorAll(‘select[id*=”quantity”], input[id*=”quantity”]’)).forEach(function(e){e.getValue()>0&&JotForm.corrected(e)})}else if(0===ee.select(“input:checked”).length)return JotForm.errored(e,JotForm.texts.required,n)}}if(e.__skipField)return JotForm.corrected(e);if(“textarea”===e.tagName.toLowerCase()&&e.hasClassName(“form-custom-hint”)&&!e.up(“div”).down(“.nicEdit-main”))return JotForm.errored(e,JotForm.texts.required,n);if(e.hasClassName(“form-textarea”)&&e.up(“div”).down(“.nicEdit-main”)){if(e.up(“div”).down(“.nicEdit-main”).innerHTML.stripTags().replace(/s/g,””).replace(/ /g,””).empty()||e.readAttribute(“data-customhint”)&&e.readAttribute(“data-customhint”)==e.up(“div”).down(“.nicEdit-main”).innerHTML)return JotForm.errored(e,JotForm.texts.required,n)}else if(“control_datetime”===JotForm.getContainer(e).getAttribute(“data-type”)){if(!e.value||e.value.strip(” “).empty())return JotForm.errored(e,JotForm.texts.required,n);if(e.id&&e.id.indexOf(“lite_mode_”)>-1){var te=e.readAttribute(“seperator”)||e.readAttribute(“data-seperator”);B=(e.readAttribute(“format”)||e.readAttribute(“data-format”)).toLowerCase();if(e.value.length!==2*te.length+B.length)return JotForm.errored(e,JotForm.texts.dateInvalid.replace(“{format}”,B),n)}if(JotForm.getContainer(e).hasClassName(“form-datetime-validation-error”))return JotForm.errored(e,”Enter a valid date”,n)}else if((!e.value||e.value.strip(” “).empty()||e.value.replace(“
“,””).empty()||”Please Select”==e.value)&&”radio”!=e.readAttribute(“type”)&&”checkbox”!=e.readAttribute(“type”)&&!$(e.parentNode).hasClassName(“form-matrix-values”)&&”control_address”!==JotForm.getContainer(e).getAttribute(“data-type”)){if(“cardform”!=window.FORM_MODE&&e.hasClassName(“form-dropdown”)&&e.hasAttribute(“multiple”)){var oe=0,re=0;for(s=1;s=1)return oe>re?JotForm.corrected(e):JotForm.errored(e,JotForm.texts.required,n)}return e.hasClassName(“form-dropdown”)&&$$(“.jfDropdown-search:focus”).length>0?JotForm.corrected(e):”cc_paypalSPB_orderID”===e.getAttribute(“name”)||”cc_paypalSPB_payerID”===e.getAttribute(“name”)?JotForm.corrected(e):JotForm.errored(e,JotForm.texts.required,n)}a=a.without(“required”)}else if(!e.value)return!0;if(!a[0])return!0;switch(a[0]){case”Email”:e.value=e.value.replace(/^s+|s+$/g,””);var ne=”undefined”!=typeof punycode?punycode.toASCII(e.value):e.value;if(!o.email.test(ne))return JotForm.errored(e,JotForm.texts.email,n);break;case”Alphabetic”:if(!o.alphabetic.test(e.value))return JotForm.errored(e,JotForm.texts.alphabetic,n);break;case”Zipcode”:if(!o.zipcode.test(e.value))return JotForm.errored(e,JotForm.texts.zipcode,n);break;case”Numeric”:if(!o.numeric.test(e.value)&&!o.numericDotStart.test(e.value))return JotForm.errored(e,JotForm.texts.numeric,n);break;case”AlphaNumeric”:if(!o.alphanumeric.test(e.value))return JotForm.errored(e,JotForm.texts.alphanumeric,n);break;case”Cyrillic”:if(!o.cyrillic.test(e.value))return JotForm.errored(e,JotForm.texts.cyrillic,n);break;case”Url”:case”URL”:if(!o.url.test(e.value))return JotForm.errored(e,JotForm.texts.url,n);break;case”Currency”:if(e.up(“.form-matrix-table”)){if(e.up(“.form-matrix-table”).select(“input”).collect(function(e){return!o.currency.test(e.value)}).any())return JotForm.errored(e,JotForm.texts.currency,n)}else if(!o.currency.test(e.value))return JotForm.errored(e,JotForm.texts.currency,n);break;case”Fill Mask”:if(“true”==e.readAttribute(“data-masked”)&&!jQuery(e).inputmask(“isComplete”)&&e.value&&e.value!==e.readAttribute(“maskvalue”).replace(/#|@/g,”_”))return JotForm.errored(e,JotForm.texts.fillMask,n)}return JotForm.corrected(e)}e.triggerEvent(“change”)};var r=function(o){setTimeout(function(){try{var o=t.getContainer(e),r=o.select(“[class*=validate]”),n=r[r.length-1],a=t.getContainer(t.lastFocus)==t.getContainer(e)&&n==e,i=e&&”prefix”===e.getAttribute(“data-component”);!t.lastFocus||t.lastFocus!=e&&t.getContainer(t.lastFocus)==t.getContainer(e)&&!a||i||”cardform”===window.FORM_MODE&&”control_fullname”===o.dataset.type?”hidden”==e.type||”file”==e.type?e.validateInput():”control_address”===o.dataset.type?e.validateInput():e.hasClassName(“form-textarea”)&&e.up(“div”).down(“.nicEdit-main”)?e.validateInput():e.hasClassName(“pad”)&&e.validateInput():e.validateInput()}catch(e){console.log(e)}},10)};(“hidden”==e.type||”file”==e.type?e.observe(“change”,r):e.observe(“blur”,r),”checkbox”==e.type||”radio”==e.type)&&(e.observe(“keyup”,function(){e.validateInput()}),JotForm.getOptionOtherInput(e)&&JotForm.getOptionOtherInput(e).observe(“keyup”,function(){e.validateInput()}));if(e.hasClassName(“pad”)&&jQuery(e).bind(“change”,r),e.hasClassName(“form-textarea”)&&e.up(“div”).down(“.nicEdit-main”)&&e.up(“div”).down(“.nicEdit-main”).observe(“blur”,r),e.up(“.form-spinner”)){var n=function(){e.validateInput()};e.up(“.form-spinner”).down(“.form-spinner-up”).observe(“click”,n),e.up(“.form-spinner”).down(“.form-spinner-down”).observe(“click”,n)}},isFillingOffline:function(){return!(“true”!==getQuerystring(“offline_forms”)&&!JotForm.switchedToOffline)},FBInit:function(){JotForm.FBNoSubmit=!0,FB.getLoginStatus(function(e){e.authResponse?JotForm.FBCollectInformation(e.authResponse.userID):FB.Event.subscribe(“auth.login”,function(e){JotForm.FBCollectInformation(e.authResponse.userID)})})},FBCollectInformation:function(e){JotForm.FBNoSubmit=!1;var t=$$(“.form-helper”).collect(function(e){var t=””,o=e.readAttribute(“data-info”).replace(“user_”,””);switch(o){case”can_be_anyvalue”:t=”place correct one here”;break;case”sex”:t=”gender”;break;case”about_me”:t=”bio”;break;default:t=o}return[t,e.id]}),o={},r=!1;$A(t).each(function(e){“pic_with_logo”==e[0]&&(r={fieldID:e[1]}),”username”!==e[0]&&(o[e[0]]=e[1])});var n=$H(o).keys().without(“pic_with_logo”),a=function(t,o){JotForm.bringOldFBSubmissionBack(e);var r=new Element(“input”,{type:”hidden”,name:”fb_user_id”}).setValue(e);JotForm.getForm(t).insert({top:r})};try{FB.api(“/”+e,{fields:n},function(t){var n;$H(t).each(function(e){if($(o[e.key]))switch(n=$(o[e.key]),e.key){case”location”:n.value=e.value.name;break;case”website”:n.value=e.value.split(/s+/).join(“, “);break;default:n.value=e.value}}),r?FB.api(“/”+e+”/picture”,function(e){e.data.url&&$(r.fieldID)&&($(r.fieldID).value=e.data.url),a(n)}):a(n)})}catch(e){console.error(e)}$$(“.fb-login-buttons”).invoke(“show”),$$(“.fb-login-label”).invoke(“hide”)},bringOldFBSubmissionBack:function(e){var t=$$(‘input[name=”formID”]’)[0];new Ajax.Jsonp(JotForm.url+”server.php”,{parameters:{action:”bringOldFBSubmissionBack”,formID:t.value,fbid:e},evalJSON:”force”,onComplete:function(e){var t=e.responseJSON;t.success&&JotForm.editMode(t,!0,[“control_helper”,”control_fileupload”])}})},setCustomHint:function(e,t){var o=$(e)||null,r=t.replace(/
/gim,”n”)||””;o.addClassName(“custom-hint-group”).writeAttribute(“data-customhint”,t).writeAttribute(“customhinted”,”true”),o.hasContent=!(!o.value||o.value.replace(/n/gim,”
“)==t),o.showCustomPlaceHolder=function(){this.hasContent||(this.placeholder=r,this.writeAttribute(“spellcheck”,”false”).addClassName(“form-custom-hint”))},o.hideCustomPlaceHolder=function(){this.hasContent||(this.placeholder=””,this.removeClassName(“form-custom-hint”).removeAttribute(“spellcheck”))},o.observe(“focus”,function(e){this.hasContent||this.removeClassName(“form-custom-hint”).removeAttribute(“spellcheck”)}).observe(“blur”,function(e){this.showCustomPlaceHolder()}).observe(“keyup”,function(e){this.hasContent=this.value.length>0&&this.value!==r}).observe(“paste”,function(e){$this=this,setTimeout(function(){$this.hasContent=$this.value.length>0&&$this.value!==r},2)}),o&&”textarea”===o.type&&o.hasAttribute(“data-richtext”)&&setTimeout(function(){var e=$$(“#id_”+o.id.replace(“input_”,””)+” .nicEdit-main”)[0]||null,t=nicEditors.findEditor(o.id);e&&(o.hasContent||e.setStyle({color:”#babbc0″}),e.observe(“blur”,function(){t.getContent()&&”
“!==t.getContent()||(e.setStyle({color:”#babbc0”}),t.setContent(r),o.writeAttribute(“spellcheck”,”false”).addClassName(“form-custom-hint”))}),e.observe(“focus”,function(){e.setStyle({color:””}),o.removeClassName(“form-custom-hint”).removeAttribute(“spellcheck”),t.getContent()===r&&t.setContent(“”)}))},1e3),o.up(“form.jotform-form”).observe(“submit”,function(){this.select(“.custom-hint-group”).each(function(e){e.hideCustomPlaceHolder()})}),o.showCustomPlaceHolder()},fieldHasContent:function(e){if($(“id_”+e).hasClassName(“form-line-error”))return!1;if($(“id_”+e).select(“.form-custom-hint”).length>0)return!1;switch(JotForm.getInputType(e)){case”address”:case”combined”:return $$(“#id_”+e+” input”).collect(function(e){return e.value}).any();case”number”:return $$(“#id_”+e+” input”).collect(function(e){return e.value.length>0}).any();case”birthdate”:return JotForm.getBirthDate(e);case”datetime”:var t=JotForm.getDateValue(e);return!(“T00:00″==t||””==t);case”time”:return JotForm.get24HourTime(e);case”checkbox”:case”radio”:return $$(“#id_”+e+” input”).collect(function(e){return e.checked}).any();case”select”:return $$(“#id_”+e+” select”).collect(function(e){return e.value}).any();case”grading”:return $$(“input[id^=input_”+e+”_]”).collect(function(e){return e.value}).any();case”signature”:return jQuery(“#id_”+e).find(“.pad”).jSignature(“getData”,”base30″)[1].length>0;case”slider”:return $(“input_”+e).value>0;case”file”:if(“multiple”===$$(“#id_”+e+” input”)[0].readAttribute(“multiple”)||””===$$(“#id_”+e+” input”)[0].readAttribute(“multiple”)){var o=$(“id_”+e).select(“.qq-upload-list li”);if(o.length>0){var r=!0;return o.each(function(e){e.getAttribute(“class”)&&e.getAttribute(“class”).indexOf(“fail”)>0&&(r=!1)}),r}return!0}return $(“input_”+e).value;default:return!(!$(“input_”+e)||!$(“input_”+e).value)&&$(“input_”+e).value}},setupProgressBar:function(){JotForm.progressBar=new ProgressBar(“progressBar”,{height:”20px”,width:”95%”});var e=[“select”,”radio”,”checkbox”,”file”,”combined”,”email”,”address”,”combined”,”datetime”,”time”,”birthdate”,”number”,”radio”,”number”,”radio”,”autocomplete”,”radio”,”text”,”textarea”,”signature”,”div”,”slider”],t=0,o=0,r=function(){o=0,$$(“.form-line”).each(function(t){var r=t.id.split(“_”)[1],n=JotForm.getInputType(r);$A(e).include(n)&&JotForm.fieldHasContent(r)&&o++});var r=parseInt(100/t*o);isNaN(r)&&(r=0),JotForm.progressBar.setPercent(r),$(“progressPercentage”).update(r+”% “),$(“progressCompleted”).update(o),100==r?$(“progressSubmissionReminder”).show():$(“progressSubmissionReminder”).hide()},n=function(e,t){$(e).observe(t,function(){r()})};$$(“.form-line”).each(function(o){var r=o.id.split(“_”)[1],a=JotForm.getInputType(r);if(e.include(a))switch(t++,a){case”radio”:case”checkbox”:n($(“id_”+r),”click”);break;case”select”:case”file”:n($(“id_”+r),”change”);break;case”datetime”:n($(“id_”+r),”date:changed”),$$(“#id_”+r+” select”).each(function(e){n($(e),”change”)});break;case”time”:case”birthdate”:$$(“#id_”+r+” select”).each(function(e){n($(e),”change”)});break;case”address”:n($(“id_”+r),”keyup”);break;case”number”:n($(“id_”+r),”keyup”),n($(“id_”+r),”click”);break;case”signature”:n($(“id_”+r),”click”);break;default:n($(“id_”+r),”keyup”)}}),$(“progressTotal”).update(t),r()},setupRichArea:function(e){if(Prototype.Browser.IE9||Prototype.Browser.IE10||!Prototype.Browser.IE){var t=”id_”+e,o=$(t).hasClassName(“always-hidden”)||”none”===$(t).style.display||”hidden”===$(t).style.display;JotForm.isVisible(t)||($(t).up(“.form-section”)&&$(t).up(“.form-section”).show(),JotForm.showField(e)),new nicEditor({iconsPath:location.protocol+”//www.jotform.com/images/nicEditorIcons.gif?v2″}).panelInstance(“input_”+e),JotForm.updateAreaFromRich(t),o&&this.hideField(e)}},updateAreaFromRich:function(e){try{var t=$(e).down(“.nicEdit-main”),o=$(e).down(“textarea”);t&&o&&t.observe(“keyup”,function(){o.value=t.innerHTML,o.triggerEvent&&o.triggerEvent(“keyup”)})}catch(e){console.error(e)}},autoFillInitialize:function(e){if(!this.isEditMode()){var t=$$(‘input[name=”formID”]’)[0].value;e.name=”form_”+t;var o=”form#”+t,r=$$(o)[0],n=[“formID”,”simple_spc”,”temp_upload_folder”];r.writeAttribute(“data-autofill”,”true”);var a=function(e){var t=e.protectedfields,o=e.protectedfieldsdata,r=0;$H(o).each(function(e){var o=t[r],n=$(o),a=e[1],i=!!a.newinputvalue&&a.newinputvalue.replace(/n/gim,”
“);if(n.hasAttribute(“data-customhint”)||n.hasAttribute(“customhinted”))(s=n.readAttribute(“data-customhint”))&&i&&s!=i&&(n.removeClassName(“form-custom-hint”),n.hasContent=!0);else if(n.hasAttribute(“hinted”)||n.hinted){var s;(s=!!a.oldinputvalue&&a.oldinputvalue.replace(/n/gim,”
“))&&i&&s!=i&&n.setStyle({color:”#000”})}r++})},i=function(e){if($$(“.form-grading-input”).length>0&&$(“grade_total_”+o)){var t=0,o=null;$$(“.form-grading-input”).each(function(e){o=e.id.replace(/input_(d+)_d+/,”$1″),t+=parseFloat(e.value)||0}),$(“grade_point_”+o).innerHTML=t}},s=function(e){$$(“.nicEdit-main”).each(function(e){var t=e.up(“.form-line”).down(“textarea”);t&&(e.innerHTML=t.value)})},l=function(e){$$(“.form-star-rating”).each(function(e){“function”===e.setRating&&e.setRating(e.down(“input”).value)})},u=function(){$(“payment_total”)&&JotForm.totalCounter(JotForm.prices)};JotForm.payment&&$$(“.form-product-item > input.form-product-has-subproducts”).length>0&&$$(‘.form-line[data-type=”control_authnet”] select, .form-line[data-type=”control_authnet”] input’).each(function(e){e.id&&n.push(e.id)});var d=Number(e.timeout)>0?e.timeout:4,c=$$(“input, select, textarea”).length;c>200&&(d=Math.floor(c/10)),jQuery(o).autoFill({timeout:d,sessionID:JotForm.sessionID,excludeFields:n,ttl:e.ttl,allowBindOnChange:!(!e.bindChange||”on”!=e.bindChange),onBeforeSave:function(){},onSave:function(){},onRelease:function(){},onBeforeRestore:function(){},onRestore:function(e){var t=this.restoredData[0];t&&(a(t),i(t),s(t),l(t),u(t))}}),this.runAllConditions(),this.autoFillDeployed=!0}},runAllConditions:function(){$H(JotForm.fieldConditions).each(function(e){var t=e.key,o=e.value.event;$(t)&&([“autofill”,”number”,”autocomplete”].include(o)&&(o=”keyup”),$(t).run(o))}),JotForm.isEditMode()&&(JotForm.ignoreInsertionCondition=null)},hasQuestion:function(e,t){var o=!1;return e.length>0&&e.some(function(e){if(e&&e.type===t)return o=e}),o},paymentExtrasOnTheFly:function(e){var t=this;e.length>0&&e.each(function(o){if(o)switch(o.type){case”control_chargify”:if(!1!==t.hasQuestion(e,”control_email”))$$(‘input[type=”email”]’)[0].observe(“blur”,function(e){e.target.value&&($$(“.cc_email”)[0].value=e.target.value)});break;case”control_wepay”:if(!1!==t.hasQuestion(e,”control_email”))$$(‘input[type=”email”]’)[0].observe(“blur”,function(e){e.target.value&&($$(“.cc_email”)[0].value=e.target.value)});if(!1!==t.hasQuestion(e,”control_address”))$$(“.form-address-postal”)[0].observe(“blur”,function(e){e.target.value&&($$(“.cc_zipcode”)[0].value=e.target.value)})}})},setQuestionMasking:function(e,t,o,r){if(o||r){r=r||!1;var n=(o=(o=o.replace(/’/g,”‘”)).replace(/\/g,””)).replace(/#/g,”_”).replace(/[|]/g,””);o=o.replace(/9/g,”\9″).replace(/a/g,”\a”).replace(/A/g,”\A”);var a={“#”:{validator:”[0-9]”}};”textMasking”===t&&(Object.extend(a,{“@”:{validator:”[A-Za-zА-яЁё一-鿿]”},”*”:{validator:”[0-9A-Za-zА-яЁё一-鿿]”}}),n=n.replace(/*|@/g,”_”));try{var i=jQuery(e);if(r)i.inputmask(“remove”).off(“blur”).attr(“placeholder”,””);else{i.inputmask(o,{placeholder:”_”,autoclear:!1,definitions:a}).on(“blur”,function(e){e.target.triggerEvent(“change”)}).attr(“maskValue”,o).attr(“placeholder”,n);var s=i.val().indexOf(“_”);i.caret(s)}}catch(e){console.log(e)}}},setInputTextMasking:function(e,t,o){setTimeout(function(){JotForm.setQuestionMasking(“#”+e,”textMasking”,t,o)},10)},setPhoneMaskingValidator:function(e,t,o){setTimeout(function(){JotForm.setQuestionMasking(“#”+e,”phoneMasking”,t,o)},10)},loadScript:function(){var e,t,o=arguments.length;arguments[o-1]instanceof Function?(o–,e=arguments[arguments.length-1]):e=function(){};for(var r=0;r0)){var r,n,a=$$(“.jotform-form”)[0],i=a.getAttribute(“id”);try{r=encodeURIComponent(document.referrer)}catch(e){r=”undefined”}try{n=encodeURIComponent(window.top.location.href)}catch(e){n=”undefined”}var s,l,u=window.screen.height,d=window.screen.width;if(!i)return!1;if(a&&location&&location.href&&-1==location.href.indexOf(“&nofs”)&&-1==location.href.indexOf(“&sid”)){var c=1*new Date+”_”+i+”_”+function(e){charSet=”ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789″;for(var t=””,o=0;o0)for(var t=this.forms.length-1;t>=0;t–){var o=this.forms[t];o.action=o.action.replace(///submit..*?//,”//”+e+”/”)}},handleChinaCensorship:function(){this.getClientCountry(function(e){var t=e.country;t.length>0&&”cn”===t.toLowerCase()&&this.changeSubmitURL(“china.jotfor.ms”)}.bind(this))},handlePreview:function(e){$$(“body”)[0].setStyle({overflowX:”hidden”}),$A(JotForm.forms).each(function(t){var o=document.createElement(“input”);if(o.setAttribute(“type”,”hidden”),o.setAttribute(“name”,”preview”),o.value=”true”,t.appendChild(o),!0===e){var r=document.createElement(“script”);r.setAttribute(“type”,”text/javascript”),r.setAttribute(“src”,”//cdn.jotfor.ms/js/form-tester.js?rev=”+(new Date).getTime()),t.appendChild(r)}})},getClientCountry:function(e){new Ajax.Request(“//china.jotfor.ms/opt/geo.ip.php”,{evalJSON:”force”,onComplete:function(t){200===t.status?e(t.responseJSON):e({country:””})}})},updateMatrixInputs:function(e,t){var o=document.getElementById(“matrix_”+e),r=(o.getAttribute(“data-type”),$(o).select(“.forDesktop”)[0]),n=$(o).select(“.forMobile”)[0];if(“mobile”===t)var a=n,i=r;else a=r,i=n;$(a).select(“.form-matrix-values”).each(function(e){$(e).removeClassName(“form-matrix-values”),$(e).addClassName(“form-matrix-values-disabled”)}),$(a).select(“input, select”).each(function(e){e.id.indexOf(“disabled”)-1&&n){var s=n.getElementsByClassName(“jfMatrixLabelList-item”),l=n.getElementsByClassName(“jfMatrixInputList-item”);Array.prototype.forEach&&Array.prototype.forEach.call(s,function(e,t){var o=l[t];o&&e&&(o.style.height=e.offsetHeight+”px”)})}var u=$(r).select(“.forMobile”).length>0,d=[“Slider”,”Emoji Slider”].indexOf(i)>-1;if(d&&u){var c=$(r).select(“.slider”)[0],m=$(r).select(“.jfMobileMatrix-nextRow”)[0],p=$(r).select(“.jfMobileMatrix-prevRow”)[0],f=$(r).select(“.jfMobileMatrix-row”),h=$(r).select(“.jfMobileMatrix-columnDot”),v=f.length,g=$(r).select(“.jfMobileMatrix-row.isSelected”)[0],y=parseInt(g.readAttribute(“data-order”),10),b=!1,F=!1;h[y]&&h[y].addClassName(“isActive”);var _=c.querySelectorAll(“.jfMatrixInputList-item”);$(r).select(“.jfMobileMatrix-prevRow”)[0].observe(“click”,function(){x()}),$(r).select(“.jfMobileMatrix-nextRow”)[0].observe(“click”,function(){C()});var w=function(){_[b].removeClassName(“isHidden”),_[y].addClassName(“isHidden”),h[y].removeClassName(“isActive”),h[b].addClassName(“isActive”),g=F,y=b},C=function(){(b=y+1)!==v&&((F=f[b]).addClassName(“isSelected”),g.removeClassName(“isSelected”),b>0&&(p.disabled=!1),b+1===v&&(m.disabled=!0),w())},x=function(){0!==y&&((F=f[b=y-1]).addClassName(“isSelected”),g.removeClassName(“isSelected”),0===b&&(p.disabled=!0),b>=v&&(m.disabled=!0),b0){for(var E=r.getElementsByClassName(“jfMatrixHeader-item”),J=r.getElementsByClassName(“jfMatrixTable-cell”),k=1;k0&&($(r).select(“.forMatrixPrev”)[0].disabled=!isBackEnabled),$(r).select(“.forMatrixNext”).length>0&&($(r).select(“.forMatrixNext”)[0].disabled=!n),$(r).select(“.jfMatrixProgress-text span”)[0].innerHTML=e+1};o&&D(o);var M=function(){$(this).stopObserving(“click”);$(r).select(“.jfMatrix-question”);var e=parseInt($(r).select(“.jfMatrix-question.isActive”)[0].readAttribute(“data-order”));e=parseInt(e,10)+1,D(e),$(this).observe(“click”,M)},O=function(){$(this).stopObserving(“click”);$(r).select(“.jfMatrix-question”);var e=parseInt($(r).select(“.jfMatrix-question.isActive”)[0].readAttribute(“data-order”));e=parseInt(e,10)-1,D(e),$(this).observe(“click”,O)};$(r).select(“.forMatrixNext”).length>0&&$(r).select(“.forMatrixNext”)[0].observe(“click”,M),$(r).select(“.forMatrixPrev”).length>0&&$(r).select(“.forMatrixPrev”)[0].observe(“click”,O);var I=function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e};t||a.hasClassName(“hidden-matrix”)||$(r).select(“input”).each(function(e){if(“radio”==e.type&&”Yes No”!==i){var t=function(){if($(this).stopObserving(“click”),!a.hasClassName(“hidden-matrix”)){var e=I(this,”jfMatrixChoice-table”);if($(e)&&$(e).select(“.jfMatrixChoice-row.isSelected”)&&$(e).select(“.jfMatrixChoice-row.isSelected”).length>0)$(e).select(“.jfMatrixChoice-row.isSelected”)[0].removeClassName(“isSelected”);I(this,”jfMatrixChoice-row”).addClassName(“isSelected”),setTimeout(function(){var e=$(r).select(“.jfMatrixProgress-button.forMatrixNext”)[0];$(e)&&null==$(e).readAttribute(“disabled”)&&$(e).triggerEvent(“click”)},500),$(this).observe(“click”,t)}};e.observe(“click”,t)}})}}}},setRatingLayout:function(e){if(document.getElementById(“stage”))return null;”object”==typeof CardForm&&CardForm.layoutParams&&!1===CardForm.layoutParams.hasTouch&&JotForm.setRatingClickTransfer(e);var t=document.getElementById(“rating_”+e);if($(t)){var o=$(t).select(“.jfRating-shortcut-input”)[0],r=$(t).select(“.jfRating-items”)[0],n=$(t).select(“.jfRating-input”);JotForm.ratingFnQueues||(JotForm.ratingFnQueues=[]),JotForm.ratingFnQueues[“fnQueue_”+e]=[],r.addEventListener(“click”,function(e){“object”==typeof CardForm&&CardForm.layoutParams&&!1===CardForm.layoutParams.hasTouch&&o&&o.focus()}),o.addEventListener(“keyup”,function(o){var r=this.value;if(r){if($(t).select(“.jfRating-input:checked”).length)var n=$(t).select(“.jfRating-input:checked”)[0].value;”-“===r&&(r=parseInt(n)-1),”+”===r&&(r=parseInt(n)+1),r=r.toString();var a=$(t).select(“.jfRating-input[value=”+r+”]”)[0];a&&(a.checked=”checked”,JotForm.setRatingItemsChecked(e,r,n))}this.value=””}),n.each(function(o){o.addEventListener(“mouseenter”,function(){$(this).up(“.jfRating-item”).addClassName(“indicate”),$(t).select(“.jfRating-items .jfRating-item.jfRating-selection”).each(function(e){if($(e).hasClassName(“indicate”))throw $break;$(e).addClassName(“indicate”)})}),o.addEventListener(“mouseleave”,function(){n.each(function(e){e.up(“.jfRating-item”).removeClassName(“indicate”)})}),o.addEventListener(“change”,function(){JotForm.setRatingItemsChecked(e,this.value)})})}},setRatingItemsChecked:function(e,t,o){JotForm.ratingFnQueues||(JotForm.ratingFnQueues=[]),JotForm.ratingFnQueues[“fnQueue_”+e]||(JotForm.ratingFnQueues[“fnQueue_”+e]=[]);var r=document.getElementById(“rating_”+e),n=$(r).select(“.jfRating-selection”),a=!isNaN(t)&&parseInt(t),i=(o=!isNaN(o)&&parseInt(o)||null,$(r).select(“.jfRating-input”)),s=JotForm.ratingFnQueues[“fnQueue_”+e],l=null;!o&&r.dataset.oldValue&&(o=r.dataset.oldValue),r.dataset.oldValue=t;var u={enqueue:function(e){s.push(e),null===l&&(l=setInterval(function(){u.processQueue()},33))},processQueue:function(){“function”==typeof s[0]&&s[0](),s.shift(),0===s.length&&(clearInterval(l),l=null)}};i.each(function(e){e.up(“.jfRating-item”).removeClassName(“indicate”)}),(o
a&&(n.reverse(),n.each(function(e,t){if(e.dataset){var o=e.dataset.value;if(o){if(o===this.value)throw $break;u.enqueue(function(){e.classList.remove(“checked”)})}}},{value:t})),$(“input_”+e).value=t,r.select(“.form-textbox”)[0].value=parseInt(t,10),JotForm.runConditionForId(e.toString())},setRatingClickTransfer:function(e){document.body.addEventListener(“click”,function(){var t=document.querySelector(“.jfCard-wrapper.isVisible #rating_”+e+” input”);t&&t.focus()})},getScrollbarWidth:function(e){var t=document.createElement(“div”);t.style.visibility=”hidden”,t.style.width=”100px”,t.style.msOverflowStyle=”scrollbar”,e.appendChild(t);var o=t.offsetWidth;t.style.overflow=”scroll”;var r=document.createElement(“div”);r.style.width=”100%”,t.appendChild(r);var n=r.offsetWidth;return t.parentNode.removeChild(t),o-n},getOptionOtherInput:function(e){if(e){var t=e.up(“.form-“+e.type+”-item”);if(t){var o=”.form-“+e.type+”-other-input”;return t.down(o)}}return null},setFullNameAutoFocus:function(e){$$(“#prefix_”+e)[0].observe(“change”,function(){setTimeout(function(){$$(“#first_”+e)[0].focus()},500)})},initShoppingBag:function(){},initProductPages:function(){},initDonation:function(){},customToQueryParams:function(e,t){var o=e.strip().match(/[^#&?]*?=[^#&?]*/g);return o&&o[1]?o[1].split(t||”&”).inject({},function(e,t){if((t=t.split(“=”))[0]){var o=decodeURIComponent(t.shift()),r=t.length>1?t.join(“=”):t[0];if(null!=r)try{r=decodeURIComponent(r)}catch(e){r=unescape(r)}o in e?(Object.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}return e}):{}},loadEmbedStyle:function(e,t){try{t=JSON.parse(t)}catch(e){t={}}if(window.parent!==window&&!(window.location.href.indexOf(“disableSmartEmbed”)>-1)){var o=document.getElementById(“form-css”);if(o){var r=document.createElement(“a”);r.href=o.href;var n=r.search.toQueryParams(),a=n.embedUrl||document.URL,i=getMD5(a);[“resetSmartStyle”,”clearSmartStyle”,”clearInlineStyle”].each(function(e){var t=new RegExp(“&?”+e+”(?:=[0-9]*)?”).exec(a);if(t&&t[0]){a=a.replace(t[0],””);var o=t[0].replace(“&”,””).split(“=”);n[o[0]]=void 0!==o[1]?o[1]:”1″}}),n.embedUrl&&delete n.embedUrl,n=Object.toQueryString(n),n+=(“”!==n?”&”:””)+”embedUrl=”+a,pathname=r.pathname.split(“.css”)[0]+”/”+i+”.css”;var s=r.protocol+”//”+r.hostname+”/”+pathname+”?”+n;this.loadStyleSheet(s,function(){var r=(t[i]||{}).inlineStyle||{};void 0!==r.embedHeight&&window.parent.postMessage(“setHeight:”+r.embedHeight+”:”+e,”*”),o.remove()})}}},initOwnerView:function(e){if(this.jsForm){var t=this.url;this.url.include(“.jotform.pro”)||(t=”https://www.jotform.com”);var o=t+”/ownerView.php?id=”+e;window.parent.postMessage([“loadScript”,o,e].join(“:”),”*”)}}};function getMD5(e){function t(e,t){return e>>32-t}function o(e,t){var o,r,n,a,i;return n=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(o=1073741824&e)&(r=1073741824&t)?2147483648^i^n^a:o|r?1073741824&i?3221225472^i^n^a:1073741824^i^n^a:i^n^a}function r(e,r,n,a,i,s,l){return e=o(e,o(o(function(e,t,o){return e&t|~e&o}(r,n,a),i),l)),o(t(e,s),r)}function n(e,r,n,a,i,s,l){return e=o(e,o(o(function(e,t,o){return e&o|t&~o}(r,n,a),i),l)),o(t(e,s),r)}function a(e,r,n,a,i,s,l){return e=o(e,o(o(function(e,t,o){return e^t^o}(r,n,a),i),l)),o(t(e,s),r)}function i(e,r,n,a,i,s,l){return e=o(e,o(o(function(e,t,o){return t^(e|~o)}(r,n,a),i),l)),o(t(e,s),r)}function s(e){var t,o=””,r=””;for(t=0;t>>8*t&255).toString(16)).substr(r.length-2,2);return o}var l,u,d,c,m,p,f,h,v,g=Array();for(g=function(e){for(var t,o=e.length,r=o+8,n=16*((r-r%64)/64+1),a=Array(n-1),i=0,s=0;s>>29,a}(e=function(e){e=e.replace(/rn/g,”n”);for(var t=””,o=0;o127&&r>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e)),p=1732584193,f=4023233417,h=2562383102,v=271733878,l=0;lo&&n.setDate(o),n.setMonth(e)}switch(t.navAction){case Calendar.NAV_PREVIOUS_YEAR:a>o.minYear&&n.setFullYear(a-1);break;case Calendar.NAV_PREVIOUS_MONTH:i>0?s(i-1):a– >o.minYear&&(n.setFullYear(a),s(11));break;case Calendar.NAV_TODAY:break;case Calendar.NAV_NEXT_MONTH:i-1&&r&&””!==r&&n&&””!==n){var a=new Date(n,t,r,0,0,0);o.date.equalsTo(a)||(o.date=a,o.update(o.date))}}};n(),o.dateField.up(“li”).observe(“date:changed”,function(){n()})}catch(e){console.log(e)}return o},Calendar.prototype={container:null,selectHandler:null,closeHandler:null,id:null,minYear:1900,maxYear:2100,dateFormat:”%Y-%m-%d”,date:new Date,currentDateElement:null,shouldClose:!1,isPopup:!0,dateField:null,startOnMonday:!1,initialize:function(e){e?this.create($(e)):this.create()},fixCustomLimits:function(){var e=function(e){if(e.indexOf(“today”)>-1)return e;var t=e.toString().split(“-“);return e=””,t.length>2&&(e+=(2===t[0].length?”20″+t[0]:t[0])+”-“),t.length>1&&(e+=JotForm.addZeros(t[t.length-2],2)+”-“),e+=JotForm.addZeros(t[t.length-1],2)},t=this.limits;if(“custom”in t&&!1!==t.custom&&t.custom instanceof Array)for(var o=0;o”)){var r=t.ranges[o].split(“>”),n=e(r[0]),a=e(r[1]);t.ranges[o]=n+”>”+a}},setDynamicLimits:function(){var e=function(e){if(e.indexOf(“today”)>-1){var t=new Date,o=parseInt(e.replace(/s/g,””).split(“today”)[1])||0;return t.setDate(t.getDate()+o),t.getFullYear()+”-“+JotForm.addZeros(t.getMonth()+1,2)+”-“+JotForm.addZeros(t.getDate(),2)}return e},t=this.limits;if(t.start=e(t.start),t.end=e(t.end),”custom”in t&&!1!==t.custom&&t.custom instanceof Array)for(var o=0;o”)){var r=t.ranges[o].split(“>”);start=e(r[0]),end=e(r[1]),t.ranges[o]=start+”>”+end}},update:function(e){var t=this,o=new Date,r=o.getFullYear(),n=o.getMonth(),a=o.getDate(),i=e.getMonth(),s=e.getDate();e.getFullYear()this.maxYear&&e.setFullYear(this.maxYear),this.date=new Date(e),e.setDate(1),t.startOnMonday?e.setDate(-e.getDay()-5):e.setDate(1-e.getDay()),setTimeout(function(){this.id&&this.container.setAttribute(“id”,”calendar_”+this.id)}.bind(this),0),Element.getElementsBySelector(this.container,”tbody tr”).each(function(o,l){var u=!1;o.immediateDescendants().each(function(o,d){var c=e.getDate(),m=e.getDay(),p=e.getMonth()==i;o.className=””,o.date=new Date(e),o.update(c),p?u=!0:o.addClassName(“otherDay”),p&&c==s&&(o.addClassName(“selected”),t.currentDateElement=o);var f=[“sunday”,”monday”,”tuesday”,”wednesday”,”thursday”,”friday”,”saturday”],h=function(){e.getFullYear()==r&&e.getMonth()==n&&c==a&&$$(“.todayButton”).length>0&&($$(“.todayButton”).first().setStyle({color:”white”}),$$(“.todayButton”).first().addClassName(“unselectable”)),o.setOpacity(.5),o.addClassName(“unselectable”)};if(t.limits){var v=t.limits;if(o.setOpacity(1),o.removeClassName(“unselectable”),f[l]in v.days&&0==v.days[f[m]]&&h(),”future”in v&&!1===v.future){var g=new Date;e>g&&h()}if(“past”in v&&!1===v.past){g=new Date;var y=new Date;y.setDate(g.getDate()-1),e-1)b=JotForm.dateFromField(v.start);else 3==(E=v.start.split(“-“)).length&&(b=new Date(E[0],E[1]-1,E[2]));e-1)F=JotForm.dateFromField(v.end);else if(3==(J=v.end.split(“-“)).length)var F=new Date(J[0],J[1]-1,J[2]);if(F){var $=new Date(F);$.setDate(F.getDate()+1),e>=$&&h()}}if(“custom”in v&&!1!==v.custom&&v.custom instanceof Array)for(d=0;d-1){var C=JotForm.dateFromField(v.custom[d]);(C=JotForm.addZeros(C.getFullYear(),2)+”-“+JotForm.addZeros(C.getMonth()+1,2)+”-“+JotForm.addZeros(C.getDate(),2))===e.getFullYear()+”-“+_+”-“+w&&h()}(v.custom[d]===e.getFullYear()+”-“+_+”-“+w||”string”==typeof v.custom[d]&&5===v.custom[d].length&&v.custom[d]===_+”-“+w||”string”==typeof v.custom[d]&&2===v.custom[d].length&&v.custom[d]==w)&&h()}if(“ranges”in v&&!1!==v.ranges&&v.ranges instanceof Array)for(d=0;d”)){var x=v.ranges[d].split(“>”),E=x[0],J=x[1];E.indexOf(“{“)>-1?b=JotForm.dateFromField(E):(b=E.split(“-“),b=new Date(b[0],b[1]-1,b[2],0,0,0)),J.indexOf(“{“)>-1?F=JotForm.dateFromField(J):(F=J.split(“-“),F=new Date(F[0],F[1]-1,F[2],0,0,0)),F&&(F.setDate(F.getDate()+1),e>=b&&e=t?a(this.container.down(“.nextYear”)):i(this.container.down(“.nextYear”)),r>=t&&n>=o?a(this.container.down(“.nextMonth”)):i(this.container.down(“.nextMonth”))),”past”in this.limits&&!1===this.limits.past&&(r0;–s){(r=l.appendChild(new Element(“tr”))).addClassName(“days”);for(var u=7;u>0;–u)(n=r.appendChild(new Element(“td”))).calendar=this}this.container=new Element(“div”),this.container.setAttribute(“aria-hidden”,!0),this.container.addClassName(“calendar”),this.isPopup&&(this.container.setStyle({position:”absolute”,display:”none”}),this.container.addClassName(“popup”)),this.container.appendChild(t),this.update(this.date),Event.observe(this.container,”mousedown”,Calendar.handleMouseDownEvent),e.appendChild(this.container)},_drawButtonCell:function(e,t,o,r,n){var a=new Element(“td”);return o>1&&(a.colSpan=o),a.className=”button”+(n?” “+n:””),a.calendar=this,a.navAction=r,a.innerHTML=t,a.unselectable=”on”,e.appendChild(a),a},callSelectHandler:function(){this.selectHandler&&this.selectHandler(this,this.date.print(this.dateFormat))},callCloseHandler:function(){this.closeHandler&&this.closeHandler(this)},show:function(){this.container.show(),this.isPopup&&(window._popupCalendar=this,Event.observe(document,”mousedown”,Calendar._checkCalendar))},showAt:function(e,t){this.show(),this.container.setStyle({left:e+”px”,top:t+”px”})},showAtElement:function(e){var t=e.up(“div”).down(“input”);!1===t.up(“div”).visible()&&(t=e);var o=Position.cumulativeOffset(t),r=o[0]+40,n=o[1]+100+t.getHeight();if(e.id.match(/_pick$/)){var a=Position.cumulativeOffset(e),i=a[0]-140;i>r&&(r=i),n=a[1]+100+e.getHeight()}this.showAt(r,n)},hide:function(){this.isPopup&&Event.stopObserving(document,”mousedown”,Calendar._checkCalendar),this.container.hide()},parseDate:function(e,t){t||(t=this.dateFormat),this.setDate(Date.parseDate(e,t))},setSelectHandler:function(e){this.selectHandler=e},setCloseHandler:function(e){this.closeHandler=e},setDate:function(e){e.equalsTo(this.date)||this.update(e)},setDateFormat:function(e){this.dateFormat=e},setDateField:function(e){this.dateField=$(e)},setRange:function(e,t){this.minYear=e,this.maxYear=t}},window._popupCalendar=null,Date.DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],Date.SECOND=1e3,Date.MINUTE=60*Date.SECOND,Date.HOUR=60*Date.MINUTE,Date.DAY=24*Date.HOUR,Date.WEEK=7*Date.DAY,Date.parseDate=function(e,t){var o=new Date,r=0,n=-1,a=0,i=e.split(/W+/),s=t.match(/%./g),l=0,u=0,d=0,c=0;for(l=0;l29?1900:2e3);break;case”%b”:case”%B”:for(u=0;u=12&&(d-=12);break;case”%M”:c=parseInt(i[l],10)}if(isNaN(r)&&(r=o.getFullYear()),isNaN(n)&&(n=o.getMonth()),isNaN(a)&&(a=o.getDate()),isNaN(d)&&(d=o.getHours()),isNaN(c)&&(c=o.getMinutes()),0!=r&&-1!=n&&0!=a)return new Date(r,n,a,d,c,0);for(r=0,n=-1,a=0,l=0;l31&&0==r?(r=parseInt(i[l],10))29?1900:2e3):0==a&&(a=i[l]);return 0==r&&(r=o.getFullYear()),-1!=n&&0!=a?new Date(r,n,a,d,c,0):o},Date.prototype.getMonthDays=function(e){var t=this.getFullYear();return void 0===e&&(e=this.getMonth()),0!=t%4||0==t%100&&0!=t%400||1!=e?Date.DAYS_IN_MONTH[e]:29},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0)-new Date(this.getFullYear(),0,0,0,0,0);return Math.floor(e/Date.DAY)},Date.prototype.getWeekNumber=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=e.getDay();e.setDate(e.getDate()-(t+6)%7+3);var o=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((o-e.valueOf())/6048e5)+1},Date.prototype.equalsTo=function(e){return this.getFullYear()==e.getFullYear()&&this.getMonth()==e.getMonth()&&this.getDate()==e.getDate()&&this.getHours()==e.getHours()&&this.getMinutes()==e.getMinutes()},Date.prototype.setDateOnly=function(e){var t=new Date(e);this.setDate(1),this.setFullYear(t.getFullYear()),this.setMonth(t.getMonth()),this.setDate(t.getDate())},Date.prototype.print=function(e){var t=this.getMonth(),o=this.getDate(),r=this.getFullYear(),n=this.getWeekNumber(),a=this.getDay(),i={},s=this.getHours(),l=s>=12,u=l?s-12:s,d=this.getDayOfYear();0==u&&(u=12);var c=this.getMinutes(),m=this.getSeconds();return i[“%a”]=Calendar.SHORT_DAY_NAMES[a],i[“%A”]=Calendar.DAY_NAMES[a],i[“%b”]=Calendar.SHORT_MONTH_NAMES[t],i[“%B”]=Calendar.MONTH_NAMES[t],i[“%C”]=1+Math.floor(r/100),i[“%d”]=o

Get an estimate

Trust the experts at Ace Handyman Services! Fill in the form completely, and we will contact you to provide an estimate for your home improvement or maintenance needs.

Ace Handyman Services Scottsdale PV Why Choose Us

Not everyone is a natural handyman. If you are in need of installation or repair work around your home but don’t really know your wrench from your screwdriver, then it is time to call in the pros at Ace Handyman of Scottsdale PV. As a seasoned company offering handyman services in Phoenix, AZ, we are equipped to handle a wide variety of projects, from basic household fixes to more extensive renovations and everything in between.

Let Us Do the Heavy Lifting

Unless you are an experienced handyman, you could be putting your health, property, and wallet at risk by tackling your repair or renovation project on your own. In some cases, one false move could land you in the emergency room or cause you to spend even more time and money fixing a significant mistake. When you work with Ace Handyman of Scottsdale PV, on the other hand, we will take care of your project from start to finish so that you won’t have to worry about the logistics involved. We pride ourselves on:

  • Affordable handyman rates
  • Reliable, courteous service
  • Precision and efficiency with every job

Making Your Life Easier, One Project at a Time

Hiring a handyman from Ace Handyman of Scottsdale PV will help you alleviate the burden of tackling labor-intensive, time-consuming projects all by yourself. Get ready to reclaim your free time and save yourself those back-and-forth trips to the hardware store. It is all possible when you work with Ace Handyman of Scottsdale PV.

Whether your project calls for carpentry work, painting, staining, furniture assembly, door installations, and more, we have the skills, tools, and experience to get the job done. To learn more about our home repair services in Phoenix, AZ or to schedule an on-site estimate, call us today.

“Like It’s Our Home” Promise

Our pledge to you is simple.
We will treat your home, “like it’s our own”.

Our commitment—promising that you, our customer and your home are our number one priority—is not taken lightly. Our promise goes beyond your home. It encompasses your time, your privacy, and your family. Trust Ace Handyman Services to treat you and your home with the respect you deserve.

More About Our Promise

Our Guarantee

Quality Craftsmanship, superior service and pride in our work is what drives Ace Handyman Services. We guarantee if there is an issue or a problem, we’ll return and make sure the job is redone in a workmanlike manner.

Contact us for more details

Our Goals

Deliver quality craftsmanship and service that lead to amazing results.
Identify and communicate potential issues/opportunities if and when they exist.

More About Our Goals Map



Source

Leave a Reply