var ifs=ifs||{};ifs.redirToLogin=function(){var b=(ifs.env&&ifs.env.context)?ifs.env.context:"";var a=(ifs.env&&ifs.env.logoutUrl)?ifs.env.logoutUrl:"/app/logout";window.top.location.href=b+a+"?reason=403"};ifs.parseMessageParams=function(i){var c={};var g,b=/\+/g,f=/([^&=]+)=?([^&]*)/g,h=function(a){return decodeURIComponent(a.replace(b," "))};while(g=f.exec(i)){c[h(g[1])]=h(g[2])}return c};ifs.showLightbox=function(a){var b=Ext.get(a);if(b){b.show();if(!b.hasCls("usp-close-handler-installed")){b.on("keyup",ifs.closeLightboxOnESC,b);b.addCls("usp-close-handler-installed")}var c=b.select(".usp-focus-on-open").first();if(c){c.focus()}else{c=b.select("[tabindex],a[href],input,button").first();if(c){c.focus()}}}};ifs.hideLightbox=function(a){var b=Ext.get(a);if(b){b.hide()}};ifs.closeLightboxOnESC=function(a,b){if(a.keyCode===27){ifs.hideLightbox(this);return false}};ifs.isPrintable=function(b){var a=/[^ -~]/;return !a.test(b)};ifs.testPassword=function(c){if(!ifs.isPrintable(c)){return false}var a=0;var b=c.replace(/[a-z0-9]/ig,"");if(/[A-Za-z]/.test(c)){a++}if(/[0-9]/.test(c)){a++}if(b&&b.length>0&&ifs.isPrintable(b)){a++}return a>1};ifs.showMe=function(d,a,c){if(!c){c="block"}var b=Ext.getDom(d);if(b){b.style.display=a?c:"none"}};ifs.waitForAjax=function(c,d){var b={done:false,success:false,result:null};function a(){if(!b.done){setTimeout(a,1000);return}d(b.success,b.result)}Ext.Ajax.request({url:c.url,method:c.method,params:c.params,success:function(e,f){b.done=true;b.success=true;b.result=e;if(typeof c.success==="function"){c.success(e,f)}},failure:function(e,f){b.done=true;b.success=false;b.result=e;if(typeof c.failure==="function"){c.failure(e,f)}}});a()};if(typeof String.prototype.trim!=="function"){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}};