function showDashboard(){showDiv("dashBoardBack"),showDiv("popup_outer")}function stristr(e,t,a){var i=0;return e+="",-1!=(i=e.toLowerCase().indexOf((t+"").toLowerCase()))&&(a?e.substr(0,i):e.slice(i))}function hideDashboard(){hideDiv("dashBoardBack"),hideDiv("popup_outer")}function hideDiv(e){document.getElementById(e).style.display="none"}function showDiv(e){document.getElementById(e).style.display=""}function setVisible(e,t){document.getElementById(e).style.display=t}function select_all_orders(){if(x=0,y=!0,clicks<=1)for(;y;)z=document.getElementById("cb_"+x),a_span=document.getElementById("cust_order_"+x),null!=z?(0==clicks?""!=a_span.style.backgroundColor&&(z.checked=!0):1==clicks&&(z.checked=!0),x++):y=!1;else for(;y;)null!=(z=document.getElementById("cb_"+x))?(z.checked=!1,x++):y=!1;3==++clicks&&(clicks=0)}function number_format(e,t,a,i,l){c=isNaN(t=Math.abs(t))?2:t;var n=Math.round((e=parseFloat(e))*Math.pow(10,c))/Math.pow(10,c);return l&&-1==(n+"").indexOf(".")?n+=".00":l&&(n+"").indexOf(".")==(n+"").length-2&&(n+="0"),n}function paymentTypeChange(e){for(var t=0;tdocument.body.offsetHeight?(yWithScroll=document.body.scrollHeight,xWithScroll=document.body.scrollWidth):(yWithScroll=document.body.offsetHeight,xWithScroll=document.body.offsetWidth),arrayPageSizeWithScroll=[xWithScroll,yWithScroll]}function ccNumKeyPress(e){if(window.event){if(8==window.event.keyCode||127==window.event.keyCode)return!0}else if(8==e.which||127==e.which)return!0;return this.getAttribute("my_maxlength")>this.value.length}function topInputSiteChanged(e){return e.value.indexOf("converted to hub")>-1?(swal("Notice!","Selected storefront was converted to HUB. Please use Login to HUB feature located in Main Menu -> Settings.","warning"),!1):(window.open("/settings/loginAsClientSite.html?siteId="+e.smID,"_blank"),!1)}function getParameterByName(e,t){t||(t=window.location.href);var a=RegExp("[?&]"+(e=e.replace(/[\[\]]/g,"\\$&"))+"(=([^&#]*)|&|#|$)").exec(t);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}