(function(){function h(){var e=!1,n=_ge("cust_width"),r=_ge("cust_height"),u,f;return n!=null&&r!=null&&(u=Number(CustSizeFilterProp.MinSize),f=Number(CustSizeFilterProp.MaxSize),t=parseInt(n.value),i=parseInt(r.value),n.value.length<1||r.value.length<1||isNaN(t)||isNaN(i)||t<u||i<u||t>f||i>f?a():e=!0),e}function c(){var n=_ge("cust_width"),t=_ge("cust_height");e(n);e(t)}function e(n){var t,i;n&&(i=(t=n.getAttribute("placeholder"))===null||t===void 0?void 0:t.length,i&&n.setAttribute("size",i))}function o(n){return n.keyCode||n.charCode||n.which}function l(t){t&&o(t)==f&&(n.click(),t.stopPropagation(),t.preventDefault())}function a(){u!=null&&(u.setAttribute("show","true"),u.focus())}function v(){r=_ge("cust-container");u=_ge("cust_size_msg");s.bind(r,"keydown",l);n=_ge("custftrlink");n!=null&&(n.onclick=function(r){if(h()){var u=n.getAttribute("href"),f=new RegExp("_[0-9]+_[0-9]+","g"),e="_"+t+"_"+i;u!=null&&(u=u.replace(f,e));n.setAttribute("href",u);r.customEvent=1}});r!=null&&(r.onclick=function(n){n.customEvent||o(n)==f||(sj_pd(n),sj_sp(n))});c()}var t,i,n,r,u,s=SmartEvent,f=13;v()})()