var Vars,Page,Mercantus,TimeLine,KnowledgeBase,IsAspnetJs,moi,HtmlEscape,DateOrEmpty,ValOrDefault,ValOrNbsp,ValOrEmpty,ValOrNull,ValOrUndefined,GetPositions,getScrollPosition,getClientWindowSize,ConfirmDelete,CheckNestedObject,GetNestedObject,ReloadWindow,GoToUrl,IsIe,isArray,round,formatNumber,unformatNumber,CheckNumericValue,cookiesAllowed,setCookie,getCookie,deleteCookie,deleteAllCookies,SetGlobalWaitCursor,ClearGlobalWaitCursor,GetUrlParam,FindAttribute,EnsureAttribute,EnsureObject,HasProperty,HasAnyProperties,cancelBubbling,CreateInputElement,FreezeBoxSize,ThawnBoxSize,Toggle,ToggleBlind,HideElement,ShowElement,IsDebugEnabled,showMembers,showMembersAndValues,showMembersAndValuesFull,isDefined,parseIntOrDefault,parseToFloat,parseFloatOrDefault,parseDate,parseDateOrDefault,parseTime,IsJQueryObject,IsJQueryEventObject,EnsureJQueryObject;(function(n,t,i){"use strict";var u=Type.registerNamespace,r,f,e;u("Vars");u("Page");u("Mercantus");u("TimeLine");Vars.PageUnloading=false;Vars.AutomaticTextInputHandler=0;Vars.ApplicationPath=null;Vars.CdnPath=null;Vars.CdnIterationPath=null;Vars.ApplicationUri=null;Vars.cphContentId=null;Vars.IsMobileDevice=false;TimeLine.Positions=function(){this.AbsoluteX=NaN;this.AbsoluteY=NaN;this.ScrollX=NaN;this.ScrollY=NaN;this.RelativeX=NaN;this.RelativeY=NaN;this.WindowWidth=NaN;this.WindowHeight=NaN};TimeLine.Positions.registerClass("TimeLine.Positions");KnowledgeBase=function(){};KnowledgeBase.prototype={"filterResults":function(n,t,i){var r=n?n:0;t&&(!r||r>t)&&(r=t);return i&&(!r||r>i)?i:r},"clientWidth":function(){return this.filterResults(n.innerWidth?n.innerWidth:0,t.documentElement?t.documentElement.clientWidth:0,t.body?t.body.clientWidth:0)},"clientHeight":function(){return this.filterResults(n.innerHeight?n.innerHeight:0,t.documentElement?t.documentElement.clientHeight:0,t.body?t.body.clientHeight:0)},"scrollLeft":function(){return this.filterResults(n.pageXOffset?n.pageXOffset:0,t.documentElement?t.documentElement.scrollLeft:0,t.body?t.body.scrollLeft:0)},"scrollTop":function(){return this.filterResults(n.pageYOffset?n.pageYOffset:0,t.documentElement?t.documentElement.scrollTop:0,t.body?t.body.scrollTop:0)}};KnowledgeBase.registerClass("KnowledgeBase");IsAspnetJs=function(){var n=false;typeof Type!="undefined"&&(n=true);return n};moi=function(){var t="moi",i=arguments.length,n;if(i>0){t+="\narguments:";for(n=0;n",">")};DateOrEmpty=function(n){if(String.IsNullOrEmpty(n))return"";var t=parseDateOrDefault(n);return t!=null?t.toShortDateString():n};ValOrDefault=function(n,t){return String.IsNullOrEmpty(n)?t:n};ValOrNbsp=function(n){return String.IsNullOrEmpty(n)?" ":n};ValOrEmpty=function(n){return String.IsNullOrEmpty(n)?"":n};ValOrNull=function(n){return String.IsNullOrEmpty(n)?null:n};ValOrUndefined=function(n){return String.IsNullOrEmpty(n)?undefined:n};GetPositions=function(i){i||(i=n.event);var r=new TimeLine.Positions;r.ScrollX=t.body.scrollLeft+t.documentElement.scrollLeft;r.ScrollY=t.body.scrollTop+t.documentElement.scrollTop;r.RelativeX=i.clientX;r.RelativeY=i.clientY;if(i.pageX&&i.pageY){r.AbsoluteX=i.pageX;r.AbsoluteY=i.pageY}else if(i.clientX||i.clientY){r.AbsoluteX=r.RelativeX+r.ScrollX;r.AbsoluteY=r.RelativeY+r.ScrollY}if(typeof n.innerWidth=="number"){r.WindowWidth=n.innerWidth;r.WindowHeight=n.innerHeight}else if(t.documentElement&&(t.documentElement.clientWidth||t.documentElement.clientHeight)){r.WindowWidth=t.documentElement.clientWidth;r.WindowHeight=t.documentElement.clientHeight}else if(t.body&&(t.body.clientWidth||t.body.clientHeight)){r.WindowWidth=t.body.clientWidth;r.WindowHeight=t.body.clientHeight}return r};getScrollPosition=function(){alert("getScrollPosition\nObsolete?");var n;n={"top":KnowledgeBase.scrollTop(),"left":KnowledgeBase.scrollLeft()};return n};getClientWindowSize=function(){var n;n={"height":KnowledgeBase.clientHeight(),"width":KnowledgeBase.clientWidth()};return n};ConfirmDelete=function(n,t){if(!confirm(t)){n.cancelBubble=true;return false}return true};CheckNestedObject=function(n,t){typeof t=="undefined"&&(t=[]);i.isArray(t)||(t=[t]);for(var r=0,u=t.length;r>>0;if(typeof n!="function")throw new TypeError;u=arguments.length>=2?arguments[1]:void 0;for(t=0;t=0||n.navigator.userAgent.indexOf("Trident/")>=0};cookiesAllowed=function(){setCookie("checkCookie","test",1);if(getCookie("checkCookie")){deleteCookie("checkCookie");return true}return false};setCookie=function(n,i,r,u){u==null&&(u={});var f=null;if(r){f=new Date;f.setDate(f.getDate()+r)}t.cookie=n+"="+escape(i)};getCookie=function(n){var r=t.cookie.indexOf(n+"="),u=r+n.length+1,i;if(!r&&n!=t.cookie.substring(0,n.length)||r==-1)return null;i=t.cookie.indexOf(";",u);i==-1&&(i=t.cookie.length);return unescape(t.cookie.substring(u,i))};deleteCookie=function(n,i,r){getCookie(n)&&(t.cookie=n+"="+(i?";path="+i:"")+(r?";domain="+r:"")+";expires=Thu, 01 Jan 1970 00:00:00 GMT")};deleteAllCookies=function(){for(var i=t.cookie.split(";"),n=0,r=i.length;n20){t+="\n(list continues...)";alert(t);t="Members of "+n+" ("+typeof n+") (continued)\n\n";r=0}u=typeof n[i];t+=i+" ("+u+"): ";t+=u=="function"?"\n":n[i]+"\n";++r}t+="\nEnd of members.";alert(t)};showMembersAndValuesFull=function(n){var i=0,t="Members of "+n+" ("+typeof n+")\n\n";for(var r in n){if(i>20){t+="\n(list continues...)";alert(t);t="Members of "+n+" ("+typeof n+") (continued)\n\n";i=0}t+=r+" ("+typeof n[r]+"): "+n[r]+"\n";++i}t+="\nEnd of members.";alert(t)};isDefined=function(t){return typeof n[t]=="undefined"?false:true};FindAttribute=function(n,t){var i=n.data(t);if(i==null){i=n.attr(t);i==null&&(i=n.prop(t))}return i};EnsureAttribute=function(n,t,i){n.data(t,i)};EnsureObject=function(n){n||(n={});return n};HasProperty=function(n,t){var i=false;for(var r in n)if(r==t){i=true;break}return i};HasAnyProperties=function(n){if(Object.keys(n).length>0)for(var t in n)if(typeof n[t]!="undefined")return true;return false};CreateInputElement=function(n){var i=null,r=!String.IsNullOrEmpty(n);try{i=r?t.createElement('"'):t.createElement("")}catch(u){i=t.createElement("input");r&&i.setAttribute("type",n)}return i};FreezeBoxSize=function(n,t){var i=true;t=EnsureObject(t);t.allowEmpty&&n.innerHTML.trim()===""&&(i=false);if(i){var f=n.width(),e=n.height(),r="",u="";if(n[0].style){n[0].style.width&&(r=n[0].style.width);n[0].style.height&&(u=n[0].style.height)}n.data("FrozenBoxSize",true).data("FrozenBoxSizeWidth",r).data("FrozenBoxSizeHeight",u);if(n[0].style){n[0].style.width=""+f+"px";n[0].style.height=""+e+"px"}}};ThawnBoxSize=function(n){typeof n=="string"&&(n=i(n));if(n.data("FrozenBoxSize")){var t="",r="",u=n.data("FrozenBoxSizeWidth"),f=n.data("FrozenBoxSizeHeight");if(u){t=u;n.data("FrozenBoxSizeWidth",null)}if(f){r=f;n.data("FrozenBoxSizeHeight",null)}if(n[0].style){n[0].style.width=t;n[0].style.height=r;n.data("FrozenBoxSize",false)}}};Toggle=function(n){typeof n=="string"&&(n=i("#"+n));n.css("display")!="none"?HideElement(n):ShowElement(n)};Mercantus.Toggle=function(){for(var n,t=0,r=arguments.length;t0){var i=Math.pow(10,t);n=Math.round(n*i)/i}return n};formatNumber=function(n,t){t=t||"";n+="";for(var r=n.split("."),i=r[0],f=r.length>1?"."+r[1]:"",u=/(\d+)(\d{3})/;u.test(i);)i=i.replace(u,"$1,$2");return t+i+f};unformatNumber=function(n){return n.replace(/([^0-9\.\-])/g,"")*1};CheckNumericValue=function(n){isNaN(n)||(n=n.toString().trim().replace(".",","));return n};isArray=function(n){return n&&!n.propertyIsEnumerable("length")&&typeof n=="object"&&typeof n.length=="number"};IsJQueryObject=function(n){return n instanceof i};IsJQueryEventObject=function(n){return n instanceof i.Event};EnsureJQueryObject=function(n){return IsJQueryObject(n)?n:i(n)};r=false;f=0;ReloadWindow=function(t,i){(typeof t=="undefined"||isNaN(t))&&(t=3);if(r){++f;if(f>=3){r=false;f=0}}if(!r)switch(t){case 1:Vars.PageUnloading=true;r=true;typeof i=="undefined"?n.location.reload():n.location.reload(i);break;case 2:Vars.PageUnloading=true;r=true;history.go(0);break;case 3:Vars.PageUnloading=true;r=true;n.location.href=n.location.href;break;default:alert("Error")}};GoToUrl=function(t,i){if(typeof i!="undefined"&&i===true)n.open(t,"_blank");else{Vars.PageUnloading=true;n.location.href=t}};parseIntOrDefault=function(n,t,i){typeof t=="undefined"&&(t=10);typeof i=="undefined"&&(i=0);try{var r=parseInt(n,t);if(!isNaN(r))return r}catch(u){}return i};parseToFloat=function(n){n=n.toString();n=n.replace(/\,/g,".");n=n.replace(/ /g,"");return parseFloat(n)};parseFloatOrDefault=function(n,t){typeof t=="undefined"&&(t=0);try{var i=parseToFloat(n);if(!isNaN(i))return i}catch(r){}return t};parseDate=function(n){var i=null;if(n!=null&&n.length>0){var r=n.match(/\./g),u=n.match(/-/g),f=n.match(/\//g),t;r!=null&&(r=r.length);u!=null&&(u=u.length);f!=null&&(f=f.length);if(r==2){t=n.split(/\./g);i=new Date(t[2],parseInt(t[1],10)-1,t[0],0,0,0)}else if(u==2){t=n.split(/-/g);i=new Date(t[0],parseInt(t[1],10)-1,t[2],0,0,0)}else if(f==2){t=n.split(/\//g);i=new Date(t[2],parseInt(t[0],10)-1,t[1],0,0,0)}}return i};parseDateOrDefault=function(n){var i=null;if(n!=null&&n.length>0){var r=n.match(/\./g),u=n.match(/-/g),f=n.match(/\//g),t;r!=null&&(r=r.length);u!=null&&(u=u.length);f!=null&&(f=f.length);if(r==2){t=n.split(/\./g);i=new Date(t[2],parseInt(t[1],10)-1,t[0],0,0,0)}else if(u==2){t=n.split(/-/g);i=new Date(t[0],parseInt(t[1],10)-1,t[2],0,0,0)}else if(f==2){t=n.split(/\//g);i=new Date(t[2],parseInt(t[0],10)-1,t[1],0,0,0)}}return i};parseTime=function(n,t){var s=null,u;if(n!=null){n=n.trim();if(n.length>0){u=n.match(/\:/g).length;if(u==1){n+=":00";u=2}if(u==2){var f=true,e=n.split(/\:/g),r=parseInt(e[0],10),i=parseInt(e[1],10),o=parseInt(e[2],10);if(r<0||r>24)f=false;else if(r==24){r=23;i=59;o=59}(i<0||i>59)&&(f=false);(i<0||i>59)&&(f=false);f&&(s=typeof t=="undefined"||t==null?new Date((r*3600+i*60+o)*1e3):new Date(t.getFullYear(),t.getMonth()+1,t.getDate(),(r*3600+i*60+o)*1e3))}}}return s};e=null;GetUrlParam=function(t){var r;if(e==null){for(var i,o=/\+/g,s=/([^&=]+)=?([^&]*)/g,u=function(n){return decodeURIComponent(n.replace(o," "))},h=n.location.search.substring(1),f={};(i=s.exec(h))!=null;)f[u(i[1])]=u(i[2]);e=f}r=e[t];return typeof r=="undefined"?null:r};typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});typeof String.prototype.ltrim!="function"&&(String.prototype.ltrim=function(){return this.replace(/^\s+/g,"")});typeof String.prototype.rtrim!="function"&&(String.prototype.rtrim=function(){return this.replace(/\s+$/g,"")});String.prototype.encodeHtmlEntities=function(){return this.replace("&","&").replace("<","<").replace(">",">").replace('"',""")};String.prototype.encodeHtmlCodes=function(){return this.replace("&","&").replace("<","<").replace(">",">").replace('"',""").replace("'","'").replace("/","/")};String.prototype.decodeHtmlEntities=function(){return this.replace("&","&").replace("<","<").replace(">",">").replace(""",'"')};String.prototype.stripTags=function(){return this.replace(/<([^>]+)>/g,"")};String.IsNullOrEmpty=function(n){return n==null||n===""};String.IsNullOrWhiteSpace=function(n){return n==null||!/\S/.test(n)};typeof String.prototype.startsWith!="function"&&(String.prototype.startsWith=function(n){return this.slice(0,n.length)==n});typeof String.prototype.endsWith!="function"&&(String.prototype.endsWith=function(n){return this.slice(-n.length)==n})})(window,document,jQuery)