(function(n){var t=n.Process||{},i=function(n){var t=+n;return isNaN(t)?n:t},u=function(n){return decodeURIComponent(n.replace(/\+/g,"%20"))},o=/\{(.+?)\}/g,s=window.location.hash&&window.location.hash[1]==="~"&&!/\bSPPC=./i.test(document.cookie||""),e=[],f=null,r=null;t.Page=function(n){for(var i=n.length;i--;)s?e.push(n[i]):t.Element(document.getElementById(n[i]))}; t.Delayed=function(){var n;for(r=null;n=e.shift();)t.Element(document.getElementById(n))}; t.Element=function(n){if(n)switch(n.getAttribute("data-process")){case"if":t.If(n); break;case"replace":t.Replace(n);break;default:t.Fix(n)}}; t.Replace=function(n){var i=n.parentNode,r=document.createTextNode(t.Get(n.getAttribute("data-replace"))); i.insertBefore(r,n);i.removeChild(n)}; t.Fix=function(n){var r,u,i,f=n.attributes.length,e=n.childNodes.length;if(n.nodeName==="SCRIPT"){n.parentNode.removeChild(n); return}while(f--)r=n.attributes[f],r.name.substring(0,13)=="data-replace-"&&(u=r.name.substring(13),n.setAttribute(u,t.Get(r.value)),n.removeAttribute(r.name)); while(e--)i=n.childNodes[e],i.nodeType===3&&i.data&&i.data.indexOf("{")>=0&&(i.data=t.Get(i.data))}; t.If=function(n){for(var i,u,f,e,o=n.parentNode,s=n.attributes.length,r=undefined;s--;){i=n.attributes[s];switch(i.name){case"field":r=t.Check(n,t.Get(i.value));break;case"nofield":r=!t.Check(n,t.Get(i.value))}if(r!==undefined)break}if(r)for(u=n.childNodes,f=0,e=u.length;fi(t.Get(u.value));case"gte":return i(r)>=i(t.Get(u.value));case"lt":case"lessthan":case"lesserthan":return i(r)=0);case"notcontains":return f=t.Get(u.value),!r.indexOf(f>=0);case"in":return f=t.Get(u.value),t.InArray(r,(""+f).split(","));case"notin":return f=t.Get(u.value),!t.InArray(r,(""+f).split(","));case"between":return f=t.Get(u.value).Split(","),f.length==2&&i(r)>=i(f[0])&&i(r)<=i(f[1])?!0:!1}}return!!r};t.InArray=function(n,t){for(var i=t.length;i--;)if(t[i]==n)return!0;return!1};t.Get=function(n){return n.replace(o,function(n,i){var r=i.split("/"),f=r.shift();return t.Data(f.split(":"),0)||u(r.shift()||"")})};t.Data=function(n,i){switch(n[i].toLowerCase()){case"f":return t.Format(n[i+1],n,i+2);case"if":return t.Data(n,i+1)?n.pop():"";case"ifno":case"ifnot":return t.Data(n,i+1)?"":n.pop();case"q":case"querystring":return t.Query(n[i+1])||"";case"session":case"cookie":return t.Cookie(n[i+1])||"";default:return""}};t.Format=function(n,i,r){var s,u,o,f,e;if(!n||r>i.length-1)return"";if(s=null,u=null,n=n.toLowerCase(),f=0,n=="binary")f=2;else if(r+1=0&&(u=i[r],f=1);break;default:o=parseInt(i[r]);isNaN(o)||(s=o,f=1)}e=t.Data(i,r+f);switch(n){case"p":case"phone":return t.Phone(""+e,u);case"p2":case"phone2":return t.Phone(""+e,u||"000.000.0000");case"tel":return t.Phone(""+e,u||"0000000000")}};t.Phone=function(n,t){var u,i,f,r;if(!n)return"";if(u=n.replace(/\D+/g,""),u.length<10)return n;for(i=(t||"(000) 000-0000").split(""),f=0,r=0;r10&&i.push(" x"+u.substring(10)),i.join("")};t.Query=function(n){var i,r,t,e;if(!f)for(f={},i=window.location.search?window.location.search.substring(1).split("&"):[],r=i.length;r--;)t=i[r].split("="),e=u(t.shift()).toLowerCase(),f[e]=t.length?u(t.join("=")):null;return f[n.toLowerCase()]};t.Cookie=function(n){var f,i,o,e,t;if(!r)for(r={},f=document.cookie?document.cookie.split("; "):[],i=f.length;i--;){o=f[i].split("=");e=u(o.shift()).toLowerCase();t=o.join("=");switch(t[0]){case"#":r[e]=+t.substring(1);break;case":":r[e]=new Date(+t.substring(1));break;case"!":r[e]=t==="!!";break;case"'":r[e]=u(t.substring(1));break;default:r[e]=u(t)}}for(f=n.split("|"),i=0;i