dojo.provide("js.stats.StatsController");var StatsController=new StatsController();function StatsController(){this.retrieveStats=A;this.retrieveNumberOfVisits=B;function A(){var C={statId:[StatsConstants.StatGlobalNumOnline,StatsConstants.StatGlobalNumReg],userId:userId};var D={content:C,load:dojo.hitch(this,function(F,E){var G=StatsData.loadStats(F,StatsData.statsResult);if(G==""){StatsView.populateGlobalStats(StatsData.statsResult)}else{StatsView.displayDefaultGlobalStats()}}),error:function(F,E){console.log("###Error Occured retrieving stats type: error.message: "+F.message+" ###");StatsView.displayDefaultGlobalStats()}};StatsService.requestStats(D)}function B(){var C={statId:StatsConstants.StatUserNumVis,userId:userId};var D={content:C,load:dojo.hitch(this,function(F,E){var G=StatsData.loadStats(F,StatsData.statsResult);if(G==""){StatsView.populateUserStats(StatsData.statsResult)}else{StatsView.displayDefaultUserStats()}}),error:function(F,E){console.log("###Error Occured retrieving stats type: error.message: "+F.message+" ###");StatsView.displayDefaultUserStats()}};StatsService.requestStats(D)}};