function setBolDefaults(){$.validator.setDefaults({onkeyup:!1});var n=$("form");n?n.find("input[type=text],input[type=email],input[type=password],select").first().focus():$("input[type=text],input[type=email],input[type=password],select").first().focus();$(".defaultfocus").first().focus();n.keypress(submitKeypressHandler)}function submitKeypressHandler(n){return n.which==13?($(this).blur(),$("#SubmitButton").focus().click(),!1):!0}function hidePasswordStrengthIndicator(n){n.removeClass("PWDComplexityShowOK");n.removeClass("PWDComplexityShowError");n.removeClass("PWDComplexityTooShort");n.removeClass("PWDComplexityWeak");n.removeClass("PWDComplexityOK");n.removeClass("PWDComplexityStrong");n.text("")}function passwordStrength(n,t){var u=$("#PWD_MinimumLength").val(),r=$("#PWD_RequiredComplexityRuleMinimum").val(),f=jQuery.parseJSON($("#PWD_ComplexityRules").val()),i;if(hidePasswordStrengthIndicator(t),n.length!=0){if(n.length<u){t.text("Too Short");t.addClass("PWDComplexityShowError");t.addClass("PWDComplexityTooShort");return}if(i=0,$.each(f,function(t,r){n.match(r)&&i++}),i<r){t.text("Weak");t.addClass("PWDComplexityShowError");t.addClass("PWDComplexityWeak");return}if(t.removeClass("PWDComplexityShowError"),t.addClass("PWDComplexityShowOK"),t.addClass("PWDComplexityOK"),i>r){t.addClass("PWDComplexityStrong");t.text("Strong");return}t.text("Good")}}function OnlyAllowOneClick(){$(document).find("input[type=submit]").hide()}function setupPasswordChangeWatcher(){$("input[type=password].has-complexity-result").on("focusout keyup",function(){!$(this).valid()&&$(this).hasClass("input-validation-error")&&hidePasswordStrengthIndicator($("span#PWD_ComplexityResult"))})}function GlobalOpenHelpPage(n,t,i){i==undefined&&(i="HelpPopupPage");GlobalOpenPage(n,t,!0,i,"height=480px,width=990px,scrollbars=1,location=0,menubar=1,toolbar=0,resizable=1")}function GlobalOpenPage(n,t,i,r,u){if(t==undefined&&(t=!1),i==undefined&&(i=!1),r==undefined&&(r=""),u==undefined&&(u=""),t==!0&&!GlobalLeavingSiteConfirmed())return!1;i?window.open(n,r,u):window.location.href=n}function GlobalLeavingSiteConfirmed(){return confirm('You are now leaving the Robert W. Baird Web site. We do not endorse nor are responsible for the content of other Web sites. Please read the "Terms and Conditions" in the "Help" section of our Web site for more information. Do you wish to proceed?')}$(document).ready(function(){$("red").css("color","red");$("blue").css("color","blue");$("yellow").css("color","yellow");$("green").css("color","green");$(".button-showhide").click(function(){var n=$(this),t=n.attr("aria-controls");return n.html()=="Show"?($("#"+t).attr("type","text"),n.html("Hide")):($("#"+t).attr("type","password"),n.html("Show")),!1})});jQuery.fn.preventDoubleSubmission=function(){$(this).on("submit",function(n){var t=$(this);t.data("submitted")===!0?n.preventDefault():t.valid()&&t.data("submitted",!0)});return this};!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(n){function a(t){var i={},r=/^jQuery\d+$/;return n.each(t.attributes,function(n,t){t.specified&&!r.test(t.name)&&(i[t.name]=t.value)}),i}function u(i,r){var f=this,u=n(f);if(f.value==u.attr("placeholder")&&u.hasClass(t.customClass))if(u.data("placeholder-password")){if(u=u.hide().nextAll('input[type="password"]:first').show().attr("id",u.removeAttr("id").data("placeholder-id")),i===!0)return u[0].value=r;u.focus()}else f.value="",u.removeClass(t.customClass),f==s()&&f.select()}function e(){var r,f=this,i=n(f),e=this.id;if(""===f.value){if("password"===f.type){if(!i.data("placeholder-textinput")){try{r=i.clone().prop({type:"text"})}catch(o){r=n("<input>").attr(n.extend(a(this),{type:"text"}))}r.removeAttr("name").data({"placeholder-password":i,"placeholder-id":e}).bind("focus.placeholder",u);i.data({"placeholder-textinput":r,"placeholder-id":e}).before(r)}i=i.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",e).show()}i.addClass(t.customClass);i[0].value=i.attr("placeholder")}else i.removeClass(t.customClass)}function s(){try{return document.activeElement}catch(n){}}var r,i,h="[object OperaMini]"==Object.prototype.toString.call(window.operamini),f="placeholder"in document.createElement("input")&&!h,o="placeholder"in document.createElement("textarea")&&!h,c=n.valHooks,l=n.propHooks,t;f&&o?(i=n.fn.placeholder=function(){return this},i.input=i.textarea=!0):(t={},i=n.fn.placeholder=function(i){var r;return t=n.extend({},{customClass:"placeholder"},i),r=this,r.filter((f?"textarea":":input")+"[placeholder]").not("."+t.customClass).bind({"focus.placeholder":u,"blur.placeholder":e}).data("placeholder-enabled",!0).trigger("blur.placeholder"),r},i.input=f,i.textarea=o,r={get:function(i){var r=n(i),u=r.data("placeholder-password");return u?u[0].value:r.data("placeholder-enabled")&&r.hasClass(t.customClass)?"":i.value},set:function(i,r){var f=n(i),o=f.data("placeholder-password");return o?o[0].value=r:f.data("placeholder-enabled")?(""===r?(i.value=r,i!=s()&&e.call(i)):f.hasClass(t.customClass)?u.call(i,!0,r)||(i.value=r):i.value=r,f):i.value=r}},f||(c.input=r,l.value=r),o||(c.textarea=r,l.value=r),n(function(){n(document).delegate("form","submit.placeholder",function(){var i=n("."+t.customClass,this).each(u);setTimeout(function(){i.each(e)},10)})}),n(window).bind("beforeunload.placeholder",function(){n("."+t.customClass).each(function(){this.value=""})}))}),function(n,t,i){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?module.exports=n(require("jquery")):n(t||i)}(function(n){var i=function(t,i,r){var u={invalid:[],getCaret:function(){try{var n,i=0,e=t.get(0),f=document.selection,r=e.selectionStart;return f&&navigator.appVersion.indexOf("MSIE 10")===-1?(n=f.createRange(),n.moveStart("character",-u.val().length),i=n.text.length):(r||r==="0")&&(i=r),i}catch(o){}},setCaret:function(n){try{if(t.is(":focus")){var i,r=t.get(0);r.setSelectionRange?r.setSelectionRange(n,n):(i=r.createTextRange(),i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",n),i.select())}}catch(u){}},events:function(){t.on("keydown.mask",function(n){t.data("mask-keycode",n.keyCode||n.which);t.data("mask-previus-value",t.val())}).on(n.jMaskGlobals.useInput?"input.mask":"keyup.mask",u.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){t.keydown().keyup()},100)}).on("change.mask",function(){t.data("changed",!0)}).on("blur.mask",function(){e===u.val()||t.data("changed")||t.trigger("change");t.data("changed",!1)}).on("blur.mask",function(){e=u.val()}).on("focus.mask",function(t){r.selectOnFocus===!0&&n(t.target).select()}).on("focusout.mask",function(){r.clearIfNotMatch&&!o.test(u.val())&&u.val("")})},getRegexMask:function(){for(var u=[],r,e,h,s,n,o,t=0;t<i.length;t++)r=f.translation[i.charAt(t)],r?(e=r.pattern.toString().replace(/.{1}$|^.{1}/g,""),h=r.optional,s=r.recursive,s?(u.push(i.charAt(t)),n={digit:i.charAt(t),pattern:e}):u.push(!h&&!s?e:e+"?")):u.push(i.charAt(t).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return o=u.join(""),n&&(o=o.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern)),new RegExp(o)},destroyEvents:function(){t.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(n){var u=t.is("input"),i=u?"val":"text",r;return arguments.length>0?(t[i]()!==n&&t[i](n),r=t):r=t[i](),r},calculateCaretPosition:function(n,i){var u=i.length,r=t.data("mask-previus-value")||"",f=r.length;return t.data("mask-keycode")===8&&r!==i?n=n-(i.slice(0,n).length-r.slice(0,n).length):r!==i&&(n=n>=f?u:n+(i.slice(0,n).length-r.slice(0,n).length)),n},behaviour:function(i){var o,r,e;return i=i||window.event,u.invalid=[],o=t.data("mask-keycode"),n.inArray(o,f.byPassKeys)===-1?(r=u.getMasked(),e=u.getCaret(),setTimeout(function(n,t){u.setCaret(u.calculateCaretPosition(n,t))},10,e,r),u.val(r),u.setCaret(e),u.callbacks(i)):void 0},getMasked:function(n,t){var c=[],nt=t===undefined?u.val():t+"",e=0,v=i.length,s=0,b=nt.length,o=1,y="push",p=-1,l,k,d,g;for(r.reverse?(y="unshift",o=-1,l=0,e=v-1,s=b-1,k=function(){return e>-1&&s>-1}):(l=v-1,k=function(){return e<v&&s<b});k();){var w=i.charAt(e),a=nt.charAt(s),h=f.translation[w];h?(a.match(h.pattern)?(c[y](a),h.recursive&&(p===-1?p=e:e===l&&(e=p-o),l===p&&(e-=o)),e+=o):a===d?d=undefined:h.optional?(e+=o,s-=o):h.fallback?(c[y](h.fallback),e+=o,s-=o):u.invalid.push({p:s,v:a,e:h.pattern}),s+=o):(n||c[y](w),a===w?s+=o:d=w,e+=o)}return g=i.charAt(l),v!==b+1||f.translation[g]||c.push(g),c.join("")},callbacks:function(n){var f=u.val(),h=f!==e,s=[f,n,t,r],o=function(n,t,i){typeof r[n]=="function"&&t&&r[n].apply(this,i)};o("onChange",h===!0,s);o("onKeyPress",h===!0,s);o("onComplete",f.length===i.length,s);o("onInvalid",u.invalid.length>0,[f,n,t,u.invalid,r])}},f,e,o;t=n(t);f=this;e=u.val();i=typeof i=="function"?i(u.val(),undefined,t,r):i;f.mask=i;f.options=r;f.remove=function(){var n=u.getCaret();return u.destroyEvents(),u.val(f.getCleanVal()),u.setCaret(n),t};f.getCleanVal=function(){return u.getMasked(!0)};f.getMaskedVal=function(n){return u.getMasked(!1,n)};f.init=function(e){var s,h,c,l;if(e=e||!1,r=r||{},f.clearIfNotMatch=n.jMaskGlobals.clearIfNotMatch,f.byPassKeys=n.jMaskGlobals.byPassKeys,f.translation=n.extend({},n.jMaskGlobals.translation,r.translation),f=n.extend(!0,{},f,r),o=u.getRegexMask(),e)u.events(),u.val(u.getMasked());else{for(r.placeholder&&t.attr("placeholder",r.placeholder),t.data("mask")&&t.attr("autocomplete","off"),s=0,h=!0;s<i.length;s++)if(c=f.translation[i.charAt(s)],c&&c.recursive){h=!1;break}h&&t.attr("maxlength",i.length);u.destroyEvents();u.events();l=u.getCaret();u.val(u.getMasked());u.setCaret(l)}};f.init(!t.is("input"))},t;n.maskWatchers={};var u=function(){var t=n(this),u={},f="data-mask-",e=t.attr("data-mask");return t.attr(f+"reverse")&&(u.reverse=!0),t.attr(f+"clearifnotmatch")&&(u.clearIfNotMatch=!0),t.attr(f+"selectonfocus")==="true"&&(u.selectOnFocus=!0),r(t,e,u)?t.data("mask",new i(this,e,u)):void 0},r=function(t,i,r){r=r||{};var u=n(t).data("mask"),f=JSON.stringify,e=n(t).val()||n(t).text();try{return typeof i=="function"&&(i=i(e)),typeof u!="object"||f(u.options)!==f(r)||u.mask!==i}catch(o){}},f=function(n){var t=document.createElement("div"),i;return n="on"+n,i=n in t,i||(t.setAttribute(n,"return;"),i=typeof t[n]=="function"),t=null,i};n.fn.mask=function(t,u){u=u||{};var f=this.selector,e=n.jMaskGlobals,s=e.watchInterval,h=u.watchInputs||e.watchInputs,o=function(){if(r(this,t,u))return n(this).data("mask",new i(this,t,u))};return n(this).each(o),f&&f!==""&&h&&(clearInterval(n.maskWatchers[f]),n.maskWatchers[f]=setInterval(function(){n(document).find(f).each(o)},s)),this};n.fn.masked=function(n){return this.data("mask").getMaskedVal(n)};n.fn.unmask=function(){return clearInterval(n.maskWatchers[this.selector]),delete n.maskWatchers[this.selector],this.each(function(){var t=n(this).data("mask");t&&t.remove().removeData("mask")})};n.fn.cleanVal=function(){return this.data("mask").getCleanVal()};n.applyDataMask=function(t){t=t||n.jMaskGlobals.maskElements;var i=t instanceof n?t:n(t);i.filter(n.jMaskGlobals.dataMaskAttr).each(u)};t={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&f("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{"0":{pattern:/\d/},"9":{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};n.jMaskGlobals=n.jMaskGlobals||{};t=n.jMaskGlobals=n.extend(!0,{},t,n.jMaskGlobals);t.dataMask&&n.applyDataMask();setInterval(function(){n.jMaskGlobals.watchDataMask&&n.applyDataMask()},t.watchInterval)},window.jQuery,window.Zepto)