function FormatNumericValue(n){var i=0,u,r;arguments.length>1&&(i=arguments[1]);u=n<0;u&&(n=-n);var e=n.toFixed(i).toString(),t="",f=i==0?0:-1*(i+1);for(r=e.length-1;r>=0;r--)f>0&&f%3==0&&(t=","+t),t=e.substr(r,1)+t,f++;return u?"-"+t:t}function ToFixedTrunc(n,t){var r=n.toString().split("."),i;if(t<=0)return r[0];if(i=r[1]||"",i.length>t)return r[0]+"."+i.substr(0,t);while(i.length<t)i+="0";return r[0]+"."+i}function RoundToNearerValue(n,t){var i=GetNumericValue(n);i!=0&&SetNumericValue(n,Math.round(i/t)*t)}function RoundToDecimalPlaces(n,t){var i=GetNumericValue(n);i!=0&&SetNumericValue(n,RoundNumberToDecimalPlaces(i,t),t)}function RoundNumberToDecimalPlaces(n,t){return Math.round(n*Math.pow(10,t))/Math.pow(10,t)}function SetNumericValue(n,t){var r=0,i;arguments.length>2&&(r=arguments[2]);i=document.getElementById(n);i&&(i.tagName=="TD"?i.innerHTML=FormatNumericValue(t,r):(i.innerContext=FormatNumericValue(t,r),i.value=FormatNumericValue(t,r)))}function GetNumericValue(n){var t=document.getElementById(n);return GetElementNumericValue(t)}function GetElementNumericValue(n){var t=n.value,i;return(t=t.replace(/,/g,""),i=parseFloat(t),!isNaN(i))?i:0}var AnalyticsHelper=function(){var n={accountCode:"XXXXXXXXXXX",enable:!1},t=function(t,r,u,f,e,o,s,h){if(t&&$.extend(n,t),n.enable){var c=1*(new Date).valueOf();r.GoogleAnalyticsObject=o;r[o]=r[o]||function(){(r[o].q=r[o].q||[]).push(arguments)};r[o].l=c;s=u.createElement(f);h=u.getElementsByTagName(f)[0];s.async=1;s.src=e;h.parentNode.insertBefore(s,h)}i()},i=function(){n.enable&&(ga("create",n.accountCode,"auto"),ga("send","pageview"))},r=function(t,i,r,u){n.enable&&(t&&i&&typeof t=="string"&&typeof i=="string"?ga("send","event",t,i,r,u):console.log("Missing or invalid arguments: category and action strings are mandatory"))};return{init:t,trackEvent:r}},CkEditorHelper=function(){var n=function(n){$(n).each(function(){var n={customConfig:CKEDITOR.getUrl("ckeditor-our-config.js"),contentsCss:[CKEDITOR.getUrl("contents.min.css"),CKEDITOR.getUrl("ckeditor-override.css")],height:this.style.height};CKEDITOR.replace(this,n)})};return{Create:n}}