function LoadParams(){var n=window.location.href,u,t,i,r;if(n.indexOf("?")>0){for(n=n.substr(n.indexOf("?")+1),u=n.split("&"),t="{",i=0;i0&&(t+=","),r=u[i].split("="),t+='"'+r[0]+'":"'+(r.length>=1?r[1]:"")+'"';t+="}";try{pData=JSON.parse(t)}catch(f){alert(f.message)}}}function RenderParam(n,t){return pData!=undefined&&(pData===undefined||pData.hasOwnProperty(n)||pData.hasOwnProperty("aid"))||LoadParams(),paramRendered=!0,pData&&pData.hasOwnProperty(n)?pData[n]:t!==undefined?t:""}function PreviewLoad(){var n=!1;$('input[type="submit"],input[type="button"],button').each(function(){$(this).attr("disabled","disabled")}),$("a").each(function(){$(this).toggleClass("inactive")});$('input[type="submit"],input[type="button"],button').on("click",function(){n=!0,e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation()});$("a").on("click",function(t){n=!0,t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation()});$(window).on("beforeunload",function(){if(n)return!1})}function ReplaceQueryStringParams(){var t=window.location.href,i=t.toLowerCase().indexOf("/pages/")>0?!0:!1,n=t.indexOf("?")>0?window.location.search.substring(1):undefined;(n!=undefined&&n!=""||i)&&$("form").size()>0&&$("form").each(function(t,r){var u=r.action,f;u!=undefined&&u!=""&&(i&&(u.indexOf(window.location.host)>0?(f=u.indexOf(window.location.host)+window.location.host.length+1,u=u.substring(0,f)+"Pages/"+u.substring(f,u.length)):u="/Pages/"+u),n!=undefined&&n!=""&&(u.slice(-1)=="?"||u.indexOf("?")>0?u.slice(-1)==="/"&&(u=u.slice(0,-1)):u=u+"?"+n),$(this).prop("action",u))})}var pData,paramRendered=!1;$(document).ready(function(){ReplaceQueryStringParams(),pData!=undefined&&(pData===undefined||pData.hasOwnProperty("aid"))||LoadParams(),paramRendered||pData===undefined||($(document).find("label").each(function(n,t){(t.id!==undefined||t.id!==""||t.attributes.name!==undefined)&&(t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)||t.attributes.name!==undefined&&pData.hasOwnProperty(t.attributes.name.value))&&(t.innerHTML=t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)?pData[t.id]:pData[t.attributes.name.value],t.innerText=t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)?pData[t.id]:pData[t.attributes.name.value])}),$(document).find("span").each(function(n,t){(t.id!==undefined||t.id!==""||t.attributes.name!==undefined)&&(t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)||t.attributes.name!==undefined&&pData.hasOwnProperty(t.attributes.name.value))&&(t.innerHTML=t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)?pData[t.id]:pData[t.attributes.name.value],t.innerText=t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)?pData[t.id]:pData[t.attributes.name.value])}),$(document).find("div").each(function(n,t){(t.id!==undefined||t.id!==""||t.attributes.name!==undefined)&&(t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)||t.attributes.name!==undefined&&pData.hasOwnProperty(t.attributes.name.value))&&(t.innerHTML=t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)?pData[t.id]:pData[t.attributes.name.value],t.innerText=t.id!==undefined&&t.id!==""&&pData.hasOwnProperty(t.id)?pData[t.id]:pData[t.attributes.name.value])}))}),$(document).ready(function(){$(".optOutControl").click(function(){var t=$(this).attr("data-optVal");$("#optOutField").val(t),$(this).attr("type").toLowerCase()=="button"&&$("#optOutForm").submit()})}),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function i(n){return 10>n?"0"+n:n}function f(){return this.valueOf()}function e(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=h[n];return"string"==typeof t?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,f){var s,l,h,a,c,v=n,o=f[i];switch(o&&"object"==typeof o&&"function"==typeof o.toJSON&&(o=o.toJSON(i)),"function"==typeof t&&(o=t.call(f,i,o)),typeof o){case"string":return e(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,c=[],"[object Array]"===Object.prototype.toString.apply(o)){for(a=o.length,s=0;a>s;s+=1)c[s]=r(s,o)||"null";return h=0===c.length?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&"object"==typeof t)for(a=t.length,s=0;a>s;s+=1)"string"==typeof t[s]&&(l=t[s],h=r(l,o),h&&c.push(e(l)+(n?": ":":")+h));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&c.push(e(l)+(n?": ":":")+h));return h=0===c.length?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}var c=/^[\],:{}\s]*$/,l=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,a=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,o=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,h,t;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=f,Number.prototype.toJSON=f,String.prototype.toJSON=f),"function"!=typeof JSON.stringify&&(h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(i,f,e){var o;if(n="",u="","number"==typeof e)for(o=0;e>o;o+=1)u+=" ";else"string"==typeof e&&(u=e);if(t=f,f&&"function"!=typeof f&&("object"!=typeof f||"number"!=typeof f.length))throw new Error("JSON.stringify");return r("",{"":i})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),void 0!==u?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),s.lastIndex=0,s.test(text)&&(text=text.replace(s,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),c.test(text.replace(l,"@").replace(a,"]").replace(v,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}()