dojo.require("wc.render.common"),dojo.require("wc.widget.RefreshArea"),dojo.require("dojo.parser"),StoreLocatorControllersDeclarationJS={langId:"-1",storeId:"",catalogId:"",orderId:"",fromPage:"StoreLocator",setCommonParameters:function(a,b,c,d,e){this.langId=a,this.storeId=b,this.catalogId=c,this.orderId=d,this.fromPage=e},setControllerURL:function(a,b){wc.render.getRefreshControllerById(a).url=b}},wc.render.declareRefreshController({id:"provinceSelectionsController",renderContext:wc.render.getContextById("provinceSelectionsContext"),url:"",formId:"",modelChangedHandler:function(a,b){this.renderContext},renderContextChangedHandler:function(a,b){var c=this.renderContext;cursor_wait(),b.refresh(c.properties)},postRefreshHandler:function(a){this.renderContext;storeLocatorJS.refreshCities(),cursor_clear()}}),wc.render.declareRefreshController({id:"citySelectionsController",renderContext:wc.render.getContextById("citySelectionsContext"),url:"",formId:"",modelChangedHandler:function(a,b){this.renderContext},renderContextChangedHandler:function(a,b){var c=this.renderContext;cursor_wait(),b.refresh(c.properties)},postRefreshHandler:function(a){this.renderContext;storeLocatorJS.refreshSearchResults(StoreLocatorControllersDeclarationJS.fromPage),cursor_clear()}}),wc.render.declareRefreshController({id:"storeLocatorResultsController",renderContext:wc.render.getContextById("storeLocatorResultsContext"),url:"",formId:"",modelChangedHandler:function(a,b){this.renderContext},renderContextChangedHandler:function(a,b){var c=this.renderContext;cursor_wait(),b.refresh(c.properties)},refresh:RefreshAreaJS.util.controllerRefreshWithXhrGet,postRefreshHandler:function(a){var b=this.renderContext;storeLocatorJS.saveResults(b);var c={};c.geoCodeLatitude=b.properties.geoCodeLatitude,c.geoCodeLongitude=b.properties.geoCodeLongitude,c.cityId=b.properties.cityId,c.storeSearch=b.properties.storeSearch,dojo.xhrPost({url:getAbsoluteURL()+"AjaxStoreLocatorMapResultsView",handleAs:"json-comment-optional",content:c,service:this,load:storeLocatorJS.displayMap,error:function(a,b){console.log("Store Locator Controller JS - postRefreshHandler: "+a.toString())}});var d=dojo.byId("bopis_table"),e=dojo.byId("no_store_message"),f=dojo.byId("mapImpl");null!=e&&"undefined"!=e?e.focus():null!=f&&"undefined"!=f?f.focus():null!=d&&"undefined"!=d&&d.focus(),1==storeLocatorJS.hideResultDiv&&(document.getElementById("WC_StoreLocator_div_t").style.display="none"),cursor_clear()}}),wc.render.declareRefreshController({id:"selectedStoreListController",renderContext:wc.render.getContextById("selectedStoreListContext"),url:"",formId:"",modelChangedHandler:function(a,b){this.renderContext},renderContextChangedHandler:function(a,b){var c=this.renderContext;cursor_wait(),b.refresh(c.properties)},postRefreshHandler:function(a){var b=(this.renderContext,dojo.byId("bopis_table"));null!=b&&"undefined"!=b&&b.focus(),cursor_clear()}});