function navbarResized(){$("body").css("padding-top",$("#topnavbar").height())}function clearLocalStorage(n){var i=0,t;for(n=n+"_",t=localStorage.length-1;t>=0;t--)localStorage.key(t).indexOf(n)>-1&&(localStorage.removeItem(localStorage.key(t)),i++);__localstoragecount=0;typeof __donCode!="undefined"?(displayLSInfo(),__debugMode&&console.log("[Local Storage]     Clear items ["+n+"]: deleted "+i.toString()+" keys.")):console.log("[Local Storage]     Clear items ["+n+"] deleted "+i.toString()+" keys.")}function scrollableTableSetHeaderWidth(n){var t=$(n),r=t.find("tbody tr:first").children(),i;i=r.map(function(){return $(this).width()}).get();t.find("thead tr").children().each(function(n,t){$(t).width(i[n])})}function resizeCommunicationLog(){$("#communicationlog tbody").attr("style","max-height: "+($("#ns-info-details").height()+$("#ns-info-focal-points").height()-71.8)+"px")}function resizeTableHeaders(n){var r=$("#"+n),u=null,e,t=[],o=!1,f,s,i;if(r.find("th").each(function(n,i){var f,r=$(i);(f=r.attr("fixsize"))?t[n]={type:"fix",w:parseFloat(f)}:(e=r.attr("fillsize"))?(t[n]={type:"fill",cw:$("#"+e).width()},u=n):t[n]={type:"var",w:r.outerWidth()};o=!0}),o){if(r.find("td").each(function(n,i){if(n>=t.length)return!1;if(t[n].type==="var"){var r=$(i).outerWidth();r>t[n].w&&(t[n].w=r)}}),u!==null){for(f=0,i=0;i<t.length;i++)t[i].type==="fill"?s=t[i].cw:f+=t[i].w;t[u].w=s-f}console.log(t);r.find("th").each(function(n,i){$(i).outerWidth(t[n].w+"px")});r.find("td").each(function(n,i){n=n%t.length;$(i).outerWidth(t[n].w+"px")})}}function formatDate(n){var t=n.getHours(),i=n.getMinutes(),u=t>=12?"pm":"am",r;return t=t%12,t=t?t:12,i=i<10?"0"+i:i,r=t+":"+i+" "+u,n.getMonth()+1+"/"+n.getDate()+"/"+n.getFullYear()+"  "+r}function initDateTimePicker(n){$(function(){$("#"+n).datepicker({format:"DD/MM/YYYY"})})}function showLocalTime(n){$("#localtime").show();$("#iflocaltime").prop("src","https://www.bing.com/search?q=Local+Time+"+n)}function hideLocalTime(){$("#localtime").hide();$("#iflocaltime").prop("src","")}function addDonCodeToUrl(n){var i=n,t=window.location.href;t.indexOf("#")>-1&&(t=t.substr(0,t.indexOf("#")));window.location.href=t+"#"+i}function redirectToPageWithDonCode(n,t){console.log("redirectToPageWithDonCode");console.log(n);console.log(t);t===""&&window.location.href.indexOf("#")>-1&&(console.log(window.location.href.indexOf("#"),window.location.href.length),t=window.location.href.substring(window.location.href.indexOf("#")+1));window.location.href=t!=""?n+"?DonCode="+t:n}$(document).ready(function(){console.log("ready!");navbarResized();$(window).resize(navbarResized)});var databank=databank||{};databank.core=function(){var n=function(n){var r="",t=window.location.pathname.toLowerCase(),u=window.location.pathname.split("/"),i;if(t.indexOf("/en/")>-1||t.indexOf("/ar/")>-1||t.indexOf("/es/")>-1||t.indexOf("/fr/")>-1||t.endsWith("/en")||t.endsWith("/ar")||t.endsWith("/es")||t.endsWith("/fr")){if(u.length>2&&u[2]!="")for(i=2;i<u.length;i++)r+="/"+u[i]}else for(i=1;i<u.length;i++)r+="/"+u[i];while(r.endsWith("/"))r=r.substring(0,r.length-1);window.location.href=window.location.origin+"/"+n+r+window.location.search};return{changeLanguage:n}}()