function pageReadyHandler(){App.appBaseUrl=App.Utility.getAppUrlBase()}function initializeGeographyLevels(n){App.geographyLevels==null&&$.ajax({url:n,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",cache:!0,success:function(n){App.geographyLevels=n},error:function(n,t,i){trace("Map Geography Levels Error: {0}",i)}})}var App={};$(document).ready(function(){pageReadyHandler()});App.Query=function(){var n=[];return{init:function(){},putSelection:function(t,i){n[t]=i},getSelection:function(t){return n[t]},removeSelection:function(t){n[t]=null}}}();App.Utility=function(){return{getSelectedItems:function(n){for(var r=$("#"+n),t="",i=0;i<r[0].length;i++)r[0][i].selected==!0&&(t+=r[0][i].value+"_");return t=t.substring(0,t.length-1),t.length==0&&(t="-1"),t},fixScheme:function(n){return window.location.protocol==="https:"&&(n="https"+n.substring(4)),n},getAppUrlBase:function(){return window.location.protocol==="https:"?rootUrl:""},getFullUrl:function(n){var t="";return t=window.location.protocol==="https:"?rootUrl:window.location.pathname!=="/"?window.location.pathname:"",pathCombine(t,n,"/")},getReportFullUrl:function(n){var t="";return t=window.location.protocol==="https:"?reportRootUrl:window.location.pathname!=="/"?window.location.pathname:"",pathCombine(t,n,"/")},getCurrentUrl:function(){return location.protocol+"//"+location.host+location.pathname},htmlEncode:function(n){return $("<div/>").text(n).html()},htmlDecode:function(n){return $("<div/>").html(n).text()}}}();App.ResultCache=function(){function f(n){t.push(n)}function e(n){var i=[];t.forEach(function(t){t!==n&&i.push(t)});t=i}function l(){var r=i();t.forEach(function(t){n[t]=null;r&&sessionStorage.removeItem(t)});t=[]}function i(){var n=!1;return h&&typeof Storage!="undefined"&&(n=!0),n}function o(n){r.forEach(function(t){t.call(null,n)})}function s(n){u.forEach(function(t){t.call(null,n)})}function a(t,i){n[t]=i;f(t);o(t)}function v(n,t){sessionStorage[n]=JSON.stringify(t);f(n);o(n)}function y(t){var i=null;return n[t]!==undefined&&(i=n[t]),i}function p(n){var t=sessionStorage[n],i;return t&&(i=JSON.parse(t)),i}function w(t){n[t]!==undefined&&(n[t]=null,e(t),s(t))}function b(n){var t=sessionStorage.getItem(n);t&&(sessionStorage.removeItem(n),e(n),s(n))}var n=[],r=[],u=[],t=[],h=!1,c=!0;return{getQueryKeys:function(){return t},clearCache:function(){l()},hasCachedItems:function(t){var r=null;return r=i()?sessionStorage.getItem(t):n[t],r?!0:!1},putResult:function(n,t){i()?v(n,t):a(n,t)},getResult:function(n){return i()?p(n):y(n)},removeResult:function(n){i()?b(n):w(n)},onCachePut:function(n){while(r.length>0)r.pop();r.push(n)},onCacheRemoved:function(n){while(u.length>0)u.pop();u.push(n)}}}();App.QueryCache=function(){function f(n){t.indexOf(n)<=0&&t.push(n)}function e(n){var i=[];t.forEach(function(t){t!==n&&i.push(t)});t=i}function l(){var i=!0;t.forEach(function(t){n[t]=null;i&&(sessionStorage[t]=null)});t=[]}function a(){var n=!1;return h&&typeof Storage!="undefined"&&(n=!0),n}function o(n){i.forEach(function(t){t.call(null,n)})}function s(n){r.forEach(function(t){t.call(null,n)})}function v(n,t){sessionStorage[n]!==undefined&&(sessionStorage[n]=null);sessionStorage[n]=JSON.stringify(t);f(n);o(n)}function y(n){var t=sessionStorage[n],i;return t&&(i=JSON.parse(t)),i}function p(n){var t=sessionStorage[n];t&&(sessionStorage.removeItem(n),e(n),s(n))}var n=[],i=[],r=[],t=[],u=[],h=!0,c=!0;return{getQueryKeys:function(){return t},clearCache:function(){l()},hasCachedItems:function(t){var i=null;return i=a()?sessionStorage[t]:n[t],i?!0:!1},putResult:function(n,t){v(n,t)},getResult:function(n){return y(n)},removeResult:function(n){p(n)},putSelection:function(n,t){u[n]=t},getSelection:function(n){return u[n]},removeSelection:function(n){u[n]=null},onCachePut:function(n){while(i.length>0)i.pop();i.push(n)},onCacheRemoved:function(n){while(r.length>0)r.pop();r.push(n)}}}()