var openSelectBox={filterId:"",refresh:function(a){this.filterId&&(a(this.filterId).trigger("chosen:open"),this.filterId="")}};function updateSelects_(a,d){a(".gzl-select-text").chosen(d);openSelectBox.refresh(a)}
function updateUrl(a){if(history.replaceState){a=document.getElementById(a).value;var d="",b=location.href.lastIndexOf("?");if(-1!=b){if(d=location.href.substring(b+1),d!=c){var c=location.href.substring(0,b+1)+a;history.replaceState({},document.title,c)}}else history.replaceState({},document.title,location.href+"?"+a)}}var longLoadingTimer=null,onAjaxStopFunctions=[],changedRichEditors=[],submittedFormForEditorCheck=null;function addAjaxStopFunction(a){onAjaxStopFunctions.push(a)}
function makeLongLoadingVisible(){resetStatusTimer();document.getElementById("longLoadingImage").className="loading-visible";document.getElementById("longLoadingBackground").className="loading-background"}function makeLongLoadingInvisible(){resetStatusTimer();document.getElementById("longLoadingImage").className="loading-invisible";document.getElementById("longLoadingBackground").className="loading-invisible"}
function gazelleStatusStart(){resetStatusTimer();document.body.style.cursor="progress";longLoadingTimer=setTimeout("makeLongLoadingVisible();",500)}function resetStatusTimer(){null!=longLoadingTimer&&(clearTimeout(longLoadingTimer),longLoadingTimer=null)}function callAjaxStopFunctions(){for(i=0;i<onAjaxStopFunctions.length;i++){var a=onAjaxStopFunctions[i];"function"==typeof a&&a()}}function gazelleStatusStopFuture(a){longLoadingTimer=setTimeout("gazelleStatusStop();",a)}
function gazelleStatusStop(){resetStatusTimer();document.body.style.cursor="default";makeLongLoadingInvisible();callAjaxStopFunctions()}function gazelleBodyOnLoad(a){gazelleStatusStop();A4J.AJAX.AddListener({onbeforeajax:function(a,b,c){submittedFormForEditorCheck=a+":"}})}
function gazelleOnBeforeUnload(a){a=!1;for(i=0;i<changedRichEditors.length;i++){var d=changedRichEditors[i];d&&d.getDoc()&&d.isDirty()&&(a=!0)}if(a)return gazelleStatusStop(),"The form has changed. Your changes will be lost if you press leave this page."}
function richEditorSaved(a,d,b){b=-1;if(null!=submittedFormForEditorCheck&&a.startsWith(submittedFormForEditorCheck))for(i=0;i<changedRichEditors.length;i++){var c=changedRichEditors[i];c&&c.editorId==a&&(b=i)}-1!=b&&changedRichEditors.splice(b,1);return d}function richEditorChanged(a){-1==changedRichEditors.indexOf(a)&&changedRichEditors.push(a)}function gazelleAddToBodyOnLoad(a){var d=window.onload;window.onload=function(b){b||(b=event);try{a(b)}catch(c){}if(d)return d(b)}}
function gazelleAddToBodyOnBeforeUnload(a){var d=window.onbeforeunload;window.onbeforeunload=function(b){b||(b=event);var c=null;try{if(c=a(b),null!=c)return c}catch(e){}if(d)return d(b)}}gazelleAddToBodyOnLoad(gazelleBodyOnLoad);gazelleAddToBodyOnBeforeUnload(gazelleOnBeforeUnload);var nextDeployDate=null,countdownTimer=null,warnTime=354E4,localServerTimeDiff;function padTwoChars(a){for(a=""+a;2>a.length;)a="0"+a;return a}
function updateCountdown(){if(null!=nextDeployDate){var a=(new Date).getTime()-localServerTimeDiff,d=(nextDeployDate.getTime()-a)/1E3;0<d?(a=padTwoChars(Math.floor(d/60)),d=padTwoChars(Math.floor(d-60*a)),a=a+":"+d,document.getElementById("deployCountdown").innerHTML=a,setTimeout("updateCountdown();",1E3)):(document.getElementById("deployScheduled").className="schedule-invisible",document.getElementById("deployExecuted").className="schedule-visible gzl-alert gzl-alert-red")}}
function startCountDown(a,d){localServerTimeDiff=(new Date).getTime()-d;var b=a-d;if(0<b&&b<warnTime){if(null==nextDeployDate||nextDeployDate.getTime()!=a)nextDeployDate=new Date,nextDeployDate.setTime(a);updateCountdown();setTimeout("updateCountdown();",1E3);document.getElementById("deployScheduled").className="schedule-visible gzl-alert gzl-alert-red"}else stopCountDown()}function stopCountDown(){nextDeployDate=null;document.getElementById("deployScheduled").className="schedule-invisible"}
var nextLogoutDate=null,countdownLogoutTimer=null,warnTimeTimer=6E5,localServerTimeDiffDeploy;function padTwoCharsDeploy(a){for(a=""+a;2>a.length;)a="0"+a;return a}
function updateCountdownLogout(){if(null!=nextLogoutDate){var a=(new Date).getTime()-localServerTimeDiffDeploy,d=(nextLogoutDate.getTime()-a)/1E3;0<d?(a=padTwoCharsDeploy(Math.floor(d/60)),d=padTwoCharsDeploy(Math.floor(d-60*a)),a=a+":"+d,document.getElementById("lougoutCountdown").innerHTML=a,setTimeout("updateCountdownLogout();",1E3)):(document.getElementById("logoutScheduled").className="schedule-invisible",document.getElementById("logoutExecuted").className="schedule-visible gzl-alert gzl-alert-red")}}
function startCountDownLogOut(a,d){localServerTimeDiffDeploy=(new Date).getTime()-d;var b=a-d;if(0<b&&b<warnTimeTimer){if(null==nextLogoutDate||nextLogoutDate.getTime()!=a)nextLogoutDate=new Date,nextLogoutDate.setTime(a);updateCountdownLogout();setTimeout("updateCountdownLogout();",1E3);document.getElementById("logoutScheduled").className="schedule-visible gzl-alert gzl-alert-red"}else stopCountDownLogout()}
function stopCountDownLogout(){nextLogoutDate=null;document.getElementById("logoutScheduled").className="schedule-invisible"}var hexcase=0,b64pad="",chrsz=8;function hex_md5(a){return binl2hex(core_md5(str2binl(a),a.length*chrsz))}function b64_md5(a){return binl2b64(core_md5(str2binl(a),a.length*chrsz))}function str_md5(a){return binl2str(core_md5(str2binl(a),a.length*chrsz))}function hex_hmac_md5(a,d){return binl2hex(core_hmac_md5(a,d))}
function b64_hmac_md5(a,d){return binl2b64(core_hmac_md5(a,d))}function str_hmac_md5(a,d){return binl2str(core_hmac_md5(a,d))}function md5_vm_test(){return"900150983cd24fb0d6963f7d28e17f72"==hex_md5("abc")}
function core_md5(a,d){a[d>>5]|=128<<d%32;a[(d+64>>>9<<4)+14]=d;for(var b=1732584193,c=-271733879,e=-1732584194,f=271733878,g=0;g<a.length;g+=16)var h=b,k=c,l=e,m=f,b=md5_ff(b,c,e,f,a[g+0],7,-680876936),f=md5_ff(f,b,c,e,a[g+1],12,-389564586),e=md5_ff(e,f,b,c,a[g+2],17,606105819),c=md5_ff(c,e,f,b,a[g+3],22,-1044525330),b=md5_ff(b,c,e,f,a[g+4],7,-176418897),f=md5_ff(f,b,c,e,a[g+5],12,1200080426),e=md5_ff(e,f,b,c,a[g+6],17,-1473231341),c=md5_ff(c,e,f,b,a[g+7],22,-45705983),b=md5_ff(b,c,e,f,a[g+8],7,
1770035416),f=md5_ff(f,b,c,e,a[g+9],12,-1958414417),e=md5_ff(e,f,b,c,a[g+10],17,-42063),c=md5_ff(c,e,f,b,a[g+11],22,-1990404162),b=md5_ff(b,c,e,f,a[g+12],7,1804603682),f=md5_ff(f,b,c,e,a[g+13],12,-40341101),e=md5_ff(e,f,b,c,a[g+14],17,-1502002290),c=md5_ff(c,e,f,b,a[g+15],22,1236535329),b=md5_gg(b,c,e,f,a[g+1],5,-165796510),f=md5_gg(f,b,c,e,a[g+6],9,-1069501632),e=md5_gg(e,f,b,c,a[g+11],14,643717713),c=md5_gg(c,e,f,b,a[g+0],20,-373897302),b=md5_gg(b,c,e,f,a[g+5],5,-701558691),f=md5_gg(f,b,c,e,a[g+
10],9,38016083),e=md5_gg(e,f,b,c,a[g+15],14,-660478335),c=md5_gg(c,e,f,b,a[g+4],20,-405537848),b=md5_gg(b,c,e,f,a[g+9],5,568446438),f=md5_gg(f,b,c,e,a[g+14],9,-1019803690),e=md5_gg(e,f,b,c,a[g+3],14,-187363961),c=md5_gg(c,e,f,b,a[g+8],20,1163531501),b=md5_gg(b,c,e,f,a[g+13],5,-1444681467),f=md5_gg(f,b,c,e,a[g+2],9,-51403784),e=md5_gg(e,f,b,c,a[g+7],14,1735328473),c=md5_gg(c,e,f,b,a[g+12],20,-1926607734),b=md5_hh(b,c,e,f,a[g+5],4,-378558),f=md5_hh(f,b,c,e,a[g+8],11,-2022574463),e=md5_hh(e,f,b,c,a[g+
11],16,1839030562),c=md5_hh(c,e,f,b,a[g+14],23,-35309556),b=md5_hh(b,c,e,f,a[g+1],4,-1530992060),f=md5_hh(f,b,c,e,a[g+4],11,1272893353),e=md5_hh(e,f,b,c,a[g+7],16,-155497632),c=md5_hh(c,e,f,b,a[g+10],23,-1094730640),b=md5_hh(b,c,e,f,a[g+13],4,681279174),f=md5_hh(f,b,c,e,a[g+0],11,-358537222),e=md5_hh(e,f,b,c,a[g+3],16,-722521979),c=md5_hh(c,e,f,b,a[g+6],23,76029189),b=md5_hh(b,c,e,f,a[g+9],4,-640364487),f=md5_hh(f,b,c,e,a[g+12],11,-421815835),e=md5_hh(e,f,b,c,a[g+15],16,530742520),c=md5_hh(c,e,f,
b,a[g+2],23,-995338651),b=md5_ii(b,c,e,f,a[g+0],6,-198630844),f=md5_ii(f,b,c,e,a[g+7],10,1126891415),e=md5_ii(e,f,b,c,a[g+14],15,-1416354905),c=md5_ii(c,e,f,b,a[g+5],21,-57434055),b=md5_ii(b,c,e,f,a[g+12],6,1700485571),f=md5_ii(f,b,c,e,a[g+3],10,-1894986606),e=md5_ii(e,f,b,c,a[g+10],15,-1051523),c=md5_ii(c,e,f,b,a[g+1],21,-2054922799),b=md5_ii(b,c,e,f,a[g+8],6,1873313359),f=md5_ii(f,b,c,e,a[g+15],10,-30611744),e=md5_ii(e,f,b,c,a[g+6],15,-1560198380),c=md5_ii(c,e,f,b,a[g+13],21,1309151649),b=md5_ii(b,
c,e,f,a[g+4],6,-145523070),f=md5_ii(f,b,c,e,a[g+11],10,-1120210379),e=md5_ii(e,f,b,c,a[g+2],15,718787259),c=md5_ii(c,e,f,b,a[g+9],21,-343485551),b=safe_add(b,h),c=safe_add(c,k),e=safe_add(e,l),f=safe_add(f,m);return[b,c,e,f]}function md5_cmn(a,d,b,c,e,f){return safe_add(bit_rol(safe_add(safe_add(d,a),safe_add(c,f)),e),b)}function md5_ff(a,d,b,c,e,f,g){return md5_cmn(d&b|~d&c,a,d,e,f,g)}function md5_gg(a,d,b,c,e,f,g){return md5_cmn(d&c|b&~c,a,d,e,f,g)}
function md5_hh(a,d,b,c,e,f,g){return md5_cmn(d^b^c,a,d,e,f,g)}function md5_ii(a,d,b,c,e,f,g){return md5_cmn(b^(d|~c),a,d,e,f,g)}function core_hmac_md5(a,d){var b=str2binl(a);16<b.length&&(b=core_md5(b,a.length*chrsz));for(var c=Array(16),e=Array(16),f=0;16>f;f++)c[f]=b[f]^909522486,e[f]=b[f]^1549556828;b=core_md5(c.concat(str2binl(d)),512+d.length*chrsz);return core_md5(e.concat(b),640)}function safe_add(a,d){var b=(a&65535)+(d&65535);return(a>>16)+(d>>16)+(b>>16)<<16|b&65535}
function bit_rol(a,d){return a<<d|a>>>32-d}function str2binl(a){for(var d=[],b=(1<<chrsz)-1,c=0;c<a.length*chrsz;c+=chrsz)d[c>>5]|=(a.charCodeAt(c/chrsz)&b)<<c%32;return d}function binl2str(a){for(var d="",b=(1<<chrsz)-1,c=0;c<32*a.length;c+=chrsz)d+=String.fromCharCode(a[c>>5]>>>c%32&b);return d}function binl2hex(a){for(var d=hexcase?"0123456789ABCDEF":"0123456789abcdef",b="",c=0;c<4*a.length;c++)b+=d.charAt(a[c>>2]>>c%4*8+4&15)+d.charAt(a[c>>2]>>c%4*8&15);return b}
function binl2b64(a){for(var d="",b=0;b<4*a.length;b+=3)for(var c=(a[b>>2]>>b%4*8&255)<<16|(a[b+1>>2]>>(b+1)%4*8&255)<<8|a[b+2>>2]>>(b+2)%4*8&255,e=0;4>e;e++)d=8*b+6*e>32*a.length?d+b64pad:d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c>>6*(3-e)&63);return d}
function savePasswordLocal(){if(localStorage){var a=document.getElementById("login:rememberMe");a&&a.checked&&(localStorage.gazelleUsername=document.getElementById("login:username").value,localStorage.gazellePassword=document.getElementById("login:passwordNotHashed").value)}}
function loadPasswordLocal(){if(localStorage){var a=document.getElementById("login:rememberMe");a&&a.checked&&(document.getElementById("login:username").value=localStorage.gazelleUsername,document.getElementById("login:passwordNotHashed").value=localStorage.gazellePassword)}}gazelleAddToBodyOnLoad(loadPasswordLocal);function getFakePassword(a){for(var d="",b=0;b<a.length;b++)d+="a";return d}
function hashGazelleAuthentication(){var a=document.getElementById("loginPanel1:login:passwordField:passwordNotHashed").value,d=hex_md5(a);document.getElementById("loginPanel1:login:password").value=d;document.getElementById("loginPanel1:login:passwordField:passwordNotHashed").value=getFakePassword(a)}
function hashGazelleAuthenticationTop(){var a=document.getElementById("mbf:passwordNotHashed").value,d=hex_md5(a);document.getElementById("mbf:password").value=d;document.getElementById("mbf:passwordNotHashed").value=getFakePassword(a)}
function hashGazelleRegistration(){var a=document.getElementById("register:passwordDecoration:userPasswordNotHashed").value,d=document.getElementById("register:passwordConfirmationDecoration:userPasswordConfirmationNotHashed").value,b=hex_md5(a),c=hex_md5(d);document.getElementById("register:passwordDecoration:userPassword").value=b;document.getElementById("register:passwordConfirmationDecoration:userPasswordConfirmation").value=c;document.getElementById("register:passwordDecoration:userPasswordNotHashed").value=
getFakePassword(a);document.getElementById("register:passwordConfirmationDecoration:userPasswordConfirmationNotHashed").value=getFakePassword(d)}
function hashGazelleChangeUserPassword(a,d){a=document.getElementById("changeUserPasswordForm:passwordDecoration:passwordInputNotHashed").value;d=document.getElementById("changeUserPasswordForm:passwordConfirmationDecoration:passwordConfirmationInputNotHashed").value;var b=hex_md5(a),c=hex_md5(d);document.getElementById("changeUserPasswordForm:passwordDecoration:passwordInput").value=b;document.getElementById("changeUserPasswordForm:passwordConfirmationDecoration:passwordConfirmationInput").value=
c;document.getElementById("changeUserPasswordForm:passwordDecoration:passwordInputNotHashed").value=getFakePassword(a);document.getElementById("changeUserPasswordForm:passwordConfirmationDecoration:passwordConfirmationInputNotHashed").value=getFakePassword(d)}
function hashGazelleChangeCurrentLoggedUserPassword(){var a=document.getElementById("register:currentPasswordDecoration:oldPasswordInputNotHashed").value,d=document.getElementById("register:passwordDecoration:passwordInputNotHashed").value,b=document.getElementById("register:passwordConfirmationDecoration:passwordConfirmationInputNotHashed").value,c=hex_md5(a),e=hex_md5(d),f=hex_md5(b);document.getElementById("register:currentPasswordDecoration:oldPasswordInput").value=c;document.getElementById("register:passwordDecoration:passwordInput").value=
e;document.getElementById("register:passwordConfirmationDecoration:passwordConfirmationInput").value=f;document.getElementById("register:currentPasswordDecoration:oldPasswordInputNotHashed").value=getFakePassword(a);document.getElementById("register:passwordDecoration:passwordInputNotHashed").value=getFakePassword(d);document.getElementById("register:passwordConfirmationDecoration:passwordConfirmationInputNotHashed").value=getFakePassword(b)}var notificationMap={};
function hideMessage(a){notificationMap[a]&&notificationMap[a].cancel()}function checkNewMessages(a){a=window.atob(a);a=window.eval(a);for(var d=0;d<a.length;d++){var b=a[d];if(window.webkitNotifications){var c=window.webkitNotifications.createNotification(b[4],b[0],b[1]);c.onclick=function(a){window.open(b[2]);this.cancel()};c.show();notificationMap[b[3]]=c;setTimeout("hideMessage('"+b[3]+"')",1E4)}}}
function openMessages(){window.webkitNotifications&&1==window.webkitNotifications.checkPermission()&&window.webkitNotifications.requestPermission();RichFaces.showModalPanel("lastMessagesModalPanel");document.getElementById("mbf:messageCounterButton").value="0"}function autofocus(a){a=jQuery(":input:not(:button):visible:enabled:first","#"+a);null!=a&&a.focus().select()}var ActiveModal=new function(){this.activeModalPanel=null;this.setActiveModalPanel=function(a){this.activeModalPanel=a}};