dojo.require("wc.render.common");dojo.require("wc.widget.RefreshArea");dojo.require("dojo.parser");StoreLocatorControllersDeclarationJS={langId:"-1",storeId:"",catalogId:"",orderId:"",fromPage:"StoreLocator",setCommonParameters:function(e,b,d,a,c){this.langId=e;this.storeId=b;this.catalogId=d;this.orderId=a;this.fromPage=c},setControllerURL:function(b,a){wc.render.getRefreshControllerById(b).url=a}};wc.render.declareRefreshController({id:"provinceSelectionsController",renderContext:wc.render.getContextById("provinceSelectionsContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext},renderContextChangedHandler:function(c,d){var a=this;var b=this.renderContext;cursor_wait();d.refresh(b.properties)},postRefreshHandler:function(c){var a=this;var b=this.renderContext;storeLocatorJS.refreshCities();cursor_clear()}}),wc.render.declareRefreshController({id:"citySelectionsController",renderContext:wc.render.getContextById("citySelectionsContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext},renderContextChangedHandler:function(c,d){var a=this;var b=this.renderContext;cursor_wait();d.refresh(b.properties)},postRefreshHandler:function(c){var a=this;var b=this.renderContext;alert("contorller");storeLocatorJS.refreshSearchResults(StoreLocatorControllersDeclarationJS.fromPage);cursor_clear()}}),wc.render.declareRefreshController({id:"storeLocatorResultsController",renderContext:wc.render.getContextById("storeLocatorResultsContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext},renderContextChangedHandler:function(c,d){var a=this;var b=this.renderContext;cursor_wait();d.refresh(b.properties)},postRefreshHandler:function(g){var a=this;var b=this.renderContext;storeLocatorJS.saveResults(b);var f={};f.geoCodeLatitude=b.properties.geoCodeLatitude;f.geoCodeLongitude=b.properties.geoCodeLongitude;f.fromPage=b.properties.fromPage;f.searchTerm=b.properties.searchTerm;f.notFound=b.properties.noGeoCode;var e=b.properties.noGeoCode;if(e=="false"){dojo.xhrPost({url:"AjaxStoreLocatorMapView",handleAs:"json",content:f,service:this,load:storeLocatorJS.displayMap,error:function(i,h){}})}var c=dojo.byId("bopis_table");if(c!=null&&c!="undefined"){c.focus()}var d=dojo.byId("no_store_message");if(d!=null&&d!="undefined"){d.focus()}cursor_clear()}}),wc.render.declareRefreshController({id:"selectedStoreListController",renderContext:wc.render.getContextById("selectedStoreListContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext},renderContextChangedHandler:function(c,d){var a=this;var b=this.renderContext;cursor_wait();d.refresh(b.properties)},postRefreshHandler:function(d){var a=this;var b=this.renderContext;var c=dojo.byId("bopis_table");if(c!=null&&c!="undefined"){c.focus()}cursor_clear()}});
