dojo.require("wc.render.common");CommonControllersDeclarationJS={langId:"",storeId:"",catalogId:"",ajaxCheckOut:true,plcParams:[],analyticalCodeArray:[],promoCodeShortDesc:null,promoCodeLongDesc:null,expandExpressOrderForm:null,showDialog:false,shopListNameForLB:null,setCommonParameters:function(c,a,b){this.langId=c;this.storeId=a;this.catalogId=b},setControllerURL:function(b,a){if(b!=null){wc.render.getRefreshControllerById(b).url=a}}};wc.render.declareRefreshController({id:"MiniShoppingCartController",renderContext:wc.render.getContextById("MiniShoppingCartContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;if(c.actionId in order_updated){var e=[];e.displayDelete=true;e.catalogId=this.catalogId;e.storeId=this.storeId;e.langId=this.langId;if(dojo.byId("miniCart_displaydelete")!=null){e.displayDelete=dojo.byId("miniCart_displaydelete").value}if(c.actionId=="AjaxPrepareOrder"||c.actionId=="AjaxDeleteOrderItem"||c.actionId=="AjaxRFQPrepareOrder"||(c.actionId=="AjaxUpdateOrderItem"&&isNaN(c.orderItemId))){d.refresh(e)}}},renderContextChangedHandler:function(a,b){if(this.renderContext.properties.actionId=="AjaxUpdateOrderItemsAddressId"){var c=[];c.displayDelete=true;c.catalogId=this.catalogId;c.storeId=this.storeId;c.langId=this.langId;if(dojo.byId("miniCart_displaydelete")!=null){c.displayDelete=dojo.byId("miniCart_displaydelete").value}b.refresh(c)}},postRefreshHandler:function(a){}}),wc.render.declareRefreshController({id:"SubstituteProductsController",renderContext:wc.render.getContextById("SubstituteProductsContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;a.properties.catalogId=CommonControllersDeclarationJS.catalogId;a.properties.storeId=CommonControllersDeclarationJS.storeId;a.properties.langId=CommonControllersDeclarationJS.langId;c.refresh(a.properties)},postRefreshHandler:function(a){if(dojo.byId("substitute_Products_Dialog")!=null){dijit.byId("substitute_Products_Dialog").closeButtonNode.style.display="none";dijit.byId("substitute_Products_Dialog").show()}}}),wc.render.declareRefreshController({id:"ProductAddShoppingListController",renderContext:wc.render.getContextById("ProductAddShoppingListContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;a.properties.catalogId=CommonControllersDeclarationJS.catalogId;c.refresh(a.properties);if(dojo.byId("ProductAddShoppingListDialog")!=null){dijit.byId("ProductAddShoppingListDialog").closeButtonNode.style.display="none";dijit.byId("ProductAddShoppingListDialog").show();setTimeout(dojo.hitch("ProductAddShoppingListDialog",function(){dijit.focus(dojo.query("a","ProductAddShoppingListDialog")[0])}),75)}else{if(dojo.byId("OrderAddShoppingListDialog")!=null){dijit.byId("OrderAddShoppingListDialog").closeButtonNode.style.display="none";dijit.byId("OrderAddShoppingListDialog").show();setTimeout(dojo.hitch("OrderAddShoppingListDialog",function(){dijit.focus(dojo.query("a","OrderAddShoppingListDialog")[0])}),75)}}}}),wc.render.declareRefreshController({id:"MIMiniRFQDisplayListController",renderContext:wc.render.getContextById("MIMiniRFQDisplayListContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;if(c.actionId=="AjaxMIRFQCreate"||c.actionId=="AjaxMIRFQItemAdd"){d.refresh({quantity:c.quantity,offeringId:c.offering_id,catalogId:c.catalogId});if((undefined!=c.plc_1)&&(c.plc_1[0]=="SUBSTITUTE"||c.plc_1[0]=="DISCONTINUED")){CommonControllersDeclarationJS.showDialog=false;scroll(0,0)}else{if((c.operationForLeafletCode!=undefined||c.operationForLeafletCode!=null)&&c.operationForLeafletCode=="AddbyLeafletCode"){CommonControllersDeclarationJS.showDialog=false}else{CommonControllersDeclarationJS.showDialog=true;if(c.actionId=="AjaxMIRFQItemAdd"){if(undefined!=c.plc_1&&c.plc_1[0]=="REPLACEMENT"){wc.render.updateContext("ConfirmationQuotationDialogContext",{offeringId:c.offering_id,catentryId:c.catentryid,catalogId:c.catalogId,quantity:c.quantity,requestFromPage:dojo.byId("requestFromPage").value,oldLeafletCode:c.plc_1[2],storeId:c.storeId})}else{wc.render.updateContext("ConfirmationQuotationDialogContext",{offeringId:c.offering_id,catentryId:c.catentryid,catalogId:c.catalogId,quantity:c.quantity,requestFromPage:dojo.byId("requestFromPage").value,leafletCode:c.req_customfield3,oldLeafletCode:"",storeId:c.storeId,multiItem:c.multiItem!=null})}}else{if(c.actionId=="AjaxMIRFQCreate"){wc.render.updateContext("ConfirmationQuotationDialogContext",{offeringId:c.offering_id,catalogId:c.catalogId,requestFromPage:dojo.byId("requestFromPage").value,storeId:c.storeId,multiItem:c.multiItem!=null})}}}}}else{if(c.actionId=="AjaxMIRFQItemRemove"){CommonControllersDeclarationJS.showDialog=false;d.refresh({catentryId:c.catentryid,quantity:c.quantity,offeringId:c.offering_id,catalogId:c.catalogId})}else{if(c.actionId=="AjaxMIRFQItemUpdate"){CommonControllersDeclarationJS.showDialog=false;d.refresh({catentryId:c.catentryid,quantity:c.quantity,offeringId:c.offering_id,catalogId:c.catalogId})}}}},postRefreshHandler:function(a){openRFQWindow()}}),wc.render.declareRefreshController({id:"MIRFQAttachmentAddDisplayController",renderContext:wc.render.getContextById("MIRFQAttachmentAddDisplayContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;if(c.actionId=="AjaxMIRFQAttachmentUpload"||c.actionId=="AjaxMIRFQAttachmentDelete"){d.refresh({offering_id:c.offering_id,catalogId:c.catalogId})}},renderContextChangedHandler:function(b,c){var a=this.renderContext;c.refresh(a.properties)}}),wc.render.declareRefreshController({id:"RFQDisplayProductController",renderContext:wc.render.getContextById("RFQDisplayProductControllerContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;if(c.actionId=="AjaxMIRFQCreate"||c.actionId=="AjaxMIRFQItemRemove"||c.actionId=="AjaxMIRFQItemUpdate"||c.actionId=="AjaxMIRFQItemAdd"){d.refresh({offering_id:c.offering_id,catalogId:c.catalogId,plc_1:c.plc_1})}if(c.actionId=="AjaxMIRFQItemRemove"){}else{if(c.actionId=="AjaxMIRFQItemUpdate"){}}}}),wc.render.declareRefreshController({id:"ConfirmationQuotationDialogController",renderContext:wc.render.getContextById("ConfirmationQuotationDialogContext"),url:"",formId:"",renderContextChangedHandler:function(c,d){var a=this.renderContext;if(a.properties.requestFromPage=="orderDisplay"||a.properties.requestFromPage=="checkoutDisplay"||a.properties.requestFromPage=="paymentDisplay"){d.refresh({offeringId:a.properties.offeringId,catentryId:a.properties.catentryId,catalogId:a.properties.catalogId,quantity:a.properties.quantity,requestFromPage:a.properties.requestFromPage,leafletCode:a.properties.leafletCode,oldLeafletCode:a.properties.oldLeafletCode,storeId:a.properties.storeId})}else{var e=dojo.fromJson(dojo.cookie("prdVariationObject"));dojo.cookie("prdVariationObject",null,{expires:-1});dojo.cookie("prdVariationCurrency",null,{expires:-1});if(e!=null){a.properties.dataVarLength=e.length;for(var b=0;b<e.length;b++){a.properties["catentryId_"+(b+1)]=e[b][0];a.properties["quantity_"+(b+1)]=e[b][1];a.properties["leafletCode_"+(b+1)]=e[b][2]}d.refresh(a.properties)}}},postRefreshHandler:function(b){var a=this.renderContext;if(a.properties.requestFromPage=="orderDisplay"||a.properties.requestFromPage=="checkoutDisplay"||a.properties.requestFromPage=="paymentDisplay"){categoryDisplayJS.removeItemsFromBasket()}if(dijit.byId("ConfirmationRFQDialog")!=null||dijit.byId("ConfirmationRFQDialog")!=undefined){dijit.byId("ConfirmationRFQDialog").closeButtonNode.style.display="none";dijit.byId("ConfirmationRFQDialog").show();setTimeout(dojo.hitch("ConfirmationRFQDialog",function(){dijit.focus(dojo.query("a","ConfirmationRFQDialog")[0])}),75)}}}),wc.render.declareRefreshController({id:"RFQDisplayRefreshAreaController",renderContext:wc.render.getContextById("RFQDisplayRefreshAreaContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;c.refresh(a.properties);dojo.byId("RFQListDisplayRefreshArea").style.display="block";dojo.byId("rfqListDisplayDiv").style.display="none";dojo.byId("RFQDisplayRefreshArea").style.display="block";dojo.byId("quotationName").style.display="block";var d=a.properties.qname;dojo.byId("quotationName").innerHTML="&gt;"+dojo.byId(d).innerHTML},modelChangedHandler:function(a,b){if(a.actionId=="AjaxMIRFQCancel"){wc.render.updateContext("RFQDisplayRefreshAreaContext",{rfqId:a.offering_id,status:"Cancelled",catalogId:a.catalogId})}},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}}),wc.render.declareRefreshController({id:"RFQListDisplayRefreshAreaController",renderContext:wc.render.getContextById("RFQListDisplayRefreshAreaContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties);dojo.byId("RFQListDisplayRefreshArea").style.display="block"},postRefreshHandler:function(a){dojo.byId("MyAccountDisplay_QuotationHistory_Title").style.display="block";dojo.byId("quotationName").style.display="none";if(document.getElementById("rfqListTable")!=null){MI.tableSort(document.getElementById("rfqListTable"),0,true,-1,true)}MI.toggleLoadProgress(false)}}),wc.render.declareRefreshController({id:"RFQResponseDisplayRefreshAreaController",renderContext:wc.render.getContextById("RFQResponseDisplayRefreshAreaContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties);if(dojo.byId("RFQDisplayRefreshArea")!=null){dojo.byId("RFQListDisplayRefreshArea").style.display="block";dojo.byId("RFQDisplayRefreshArea").style.display="none";dojo.byId("RFQResponseDisplayRefreshArea").style.display="block"}},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}}),wc.render.declareRefreshController({id:"ConfirmationPopupController",renderContext:wc.render.getContextById("ConfirmationPopupContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;var e=[];if(c.actionId=="AjaxAddOrderItem"||c.actionId=="AjaxUpdateOrderItem"){e.prevOrderItems=dojo.byId("catentry_ids").value;e.catalogId=this.catalogId;e.storeId=this.storeId;e.langId=this.langId;e.orderId=c.orderId;if(typeof c.orderItemId!="undefined"&&showDropdown){d.refresh(e)}}},postRefreshHandler:function(d){var a=this;var b=this.renderContext;if(showDropdown){showDropdown=false;var c=dijit.byId("variation_popup");if(c!=null){c.closeButtonNode.style.display="none";c.hide()}dijit.byId("ConfirmationPopupDialog").closeButtonNode.style.display="none";dijit.byId("ConfirmationPopupDialog").show();setTimeout(dojo.hitch("ConfirmationPopupDialog",function(){dijit.focus(dojo.query("a","ConfirmationPopupDialog")[0])}),75)}MI.toggleLoadProgress(false)}}),wc.render.declareRefreshController({id:"ConfirmationShopListPopupController",renderContext:wc.render.getContextById("ConfirmationShopListPopupContext"),url:"",formId:"",modelChangedHandler:function(l,f){var g=this;var c=this.renderContext;var b=[];if((l.actionId=="AjaxMIRequisitionListItemAdd"||l.actionId=="AjaxMIRequisitionListItemUpdate")&&showDropdown){if(typeof l.orderItemId!="undefined"){b.requisitionListId=l.requisitionListId;b.catalogId=CommonControllersDeclarationJS.catalogId;b.storeId=CommonControllersDeclarationJS.storeId;var h=l.orderItemId;b.orderItemId=h;var m="";if(l.itemsLength!=undefined){m=l.itemsLength}else{m=h.length}var j=[];var a=[];var d=0;for(var e=1;e<=m;e++){j[d]=l["catEntryId_"+e];a[d]=l["quantity_"+e];d++}b.catEntryId=j;b.quantity=a;b.orderStatus="Y";if(typeof l.shoppingListName!="undefined"){b.shoppingListName=l.shoppingListName;CommonControllersDeclarationJS.shopListNameForLB=l.shoppingListName}else{b.shoppingListName=l.orderDesc;CommonControllersDeclarationJS.shopListNameForLB=l.orderDesc}if((typeof l.plc_1!="undefined")&&(l.plc_1[0].match("REPLACEMENT"))){b.plcReplacedItem=l.plc_1[2];b.plcAddedLeaflet=l.leafletCode_1}f.refresh(b)}}else{if(l.actionId=="AjaxMIRequisitionListCopy"){b.requisitionListId=l.requisitionListId;if(typeof l.shoppingListName!="undefined"){b.shoppingListName=l.shoppingListName;CommonControllersDeclarationJS.shopListNameForLB=l.shoppingListName}else{b.shoppingListName=l.orderDesc;CommonControllersDeclarationJS.shopListNameForLB=l.orderDesc}b.orderStatus="Y";b.catalogId=CommonControllersDeclarationJS.catalogId;b.storeId=CommonControllersDeclarationJS.storeId;f.refresh(b)}}},postRefreshHandler:function(d){var a=this;var b=this.renderContext;if(showDropdown){showDropdown=false;var c=dijit.byId("variation_popup");if(c!=null){c.closeButtonNode.style.display="none";c.hide()}dijit.byId("ConfirmationShopListPopupDialog").closeButtonNode.style.display="none";dijit.byId("ConfirmationShopListPopupDialog").show();dojo.cookie("variationItemsToShopList",null);dojo.byId("captionForDialog").innerHTML=MessageHelper.messages.ADD_TO_SHOP_LIST_MESSAGE+' "'+CommonControllersDeclarationJS.shopListNameForLB+'"';setTimeout(dojo.hitch("ConfirmationShopListPopupDialog",function(){dijit.focus(dojo.query("a","ConfirmationShopListPopupDialog")[0])}),75)}}}),wc.render.declareRefreshController({id:"ShopCartDisplayController",renderContext:wc.render.getContextById("ShopCartPaginationDisplay_Context"),url:"",formId:"",modelChangedHandler:function(n,e){var f=this;if(n.actionId=="AjaxPromotionCodeManage"){isAjaxPromotionCodeManage=true;CommonControllersDeclarationJS.promoCodeShortDesc=null;CommonControllersDeclarationJS.promoCodeLongDesc=null;CommonControllersDeclarationJS.expandExpressOrderForm=n.display;if(typeof n.shortDesc!="undefined"){CommonControllersDeclarationJS.promoCodeShortDesc=n.shortDesc}if(typeof n.longDesc!="undefined"){CommonControllersDeclarationJS.promoCodeLongDesc=n.longDesc}}if(n.actionId=="AjaxPrepareOrder"){if(dojo.byId("addMoreProducts").style.display=="none"){CommonControllersDeclarationJS.expandExpressOrderForm="none"}if(dojo.byId("addMoreProducts").style.display=="block"){CommonControllersDeclarationJS.expandExpressOrderForm="block"}isAjaxPrepareOrder=true}if(n.actionId=="AjaxDeleteOrderItem"||n.actionId=="AjaxAddOrderItem"||n.actionId=="AjaxUpdateOrderItem"){CommonControllersDeclarationJS.plcParams=[]}var b=false;var c=this.renderContext;if(n.actionId=="AjaxAddOrderItem"){if(typeof n.orderItemId=="undefined"){showDropdown=false}CommonControllersDeclarationJS.plcParams.catalogId=CommonControllersDeclarationJS.catalogId;CommonControllersDeclarationJS.plcParams.storeId=CommonControllersDeclarationJS.storeId;CommonControllersDeclarationJS.plcParams.orderId=n.orderId;var a=0;for(var g in n){if(g.match("plc_")){b=true;a++;CommonControllersDeclarationJS.plcParams["plc_"+a]=n[g]}}if(b){e.refresh(CommonControllersDeclarationJS.plcParams)}}else{if(n.actionId=="AjaxPrepareOrder"||(n.actionId=="AjaxDeleteOrderItem")||(n.actionId=="AjaxUpdateOrderItem"&&isNaN(n.orderItemId))){var k=dojo.byId("orderItemDetail_ItemLength");var m=0;if(k!=null){m=k.value}CommonControllersDeclarationJS.analyticalCodeArray=[];for(var d=1;d<=m;d++){var j=dojo.byId("orderItemDetail_ItemId_"+d).value;var h=dojo.byId("OrderItemDetail_Analyticalcodevalue_TextBox_"+d);if(h!=null&&(dojo.byId(h).value!=""||dojo.byId(h).value!=""||dojo.byId(h).value!=null)){var l=dojo.byId(h).value;categoryDisplayJS.updateParamObject(CommonControllersDeclarationJS.analyticalCodeArray,j,l,false,null)}}CommonControllersDeclarationJS.plcParams.catalogId=CommonControllersDeclarationJS.catalogId;CommonControllersDeclarationJS.plcParams.storeId=CommonControllersDeclarationJS.storeId;CommonControllersDeclarationJS.plcParams.orderId=n.orderId;e.refresh(CommonControllersDeclarationJS.plcParams)}}},renderContextChangedHandler:function(a,b){b.refresh(this.renderContext.properties)},postRefreshHandler:function(e){var a=this;var h=dojo.byId("orderItemDetail_ItemLength");var c=0;if(checkoutStatus==true){showCheckoutLogonPopup(categoryDisplayJS.userType,CommonControllersDeclarationJS.storeId,CommonControllersDeclarationJS.catalogId,CommonControllersDeclarationJS.langId);checkoutStatus=false}if(h!=null){c=h.value}for(var b=1;b<=c;b++){var g=dojo.byId("orderItemDetail_ItemId_"+b).value;var d=dojo.byId("OrderItemDetail_Analyticalcodevalue_TextBox_"+b);var f=CommonControllersDeclarationJS.analyticalCodeArray[g];if(d!=null&&typeof f!="undefined"){dojo.byId("OrderItemDetail_Analyticalcodevalue_TextBox_"+b).value=f}}if(isAjaxPrepareOrder&&isAjaxPromotionCodeManage){isAjaxPrepareOrder=false;isAjaxPromotionCodeManage=false;dojo.byId("promotionLabel").innerHTML=dojo.byId("PromotionCodeDisplay_CouponCode").value;if(dojo.byId("promocdlightbox_display_indicator")!=null&&dojo.byId("promocdlightbox_display_indicator").value=="1"){if(CommonControllersDeclarationJS.promoCodeShortDesc!=null){dojo.byId("promotionLightBox_Discount_shortDesc").innerHTML=CommonControllersDeclarationJS.promoCodeShortDesc}else{dojo.byId("promotionLightBox_Discount_shortDesc").innerHTML=""}if(CommonControllersDeclarationJS.promoCodeLongDesc!=null){dojo.byId("promotionLightBox_Discount_longDesc").innerHTML=CommonControllersDeclarationJS.promoCodeLongDesc}else{dojo.byId("promotionLightBox_Discount_longDesc").innerHTML=""}dijit.byId("CouponDialog").closeButtonNode.style.display="none";dijit.byId("CouponDialog").show();setTimeout(dojo.hitch("CouponDialog",function(){dijit.focus(dojo.query("a","CouponDialog")[0])}),75)}}if(CommonControllersDeclarationJS.expandExpressOrderForm=="none"){dojo.byId("addMoreProducts").style.display="none"}if(CommonControllersDeclarationJS.expandExpressOrderForm=="block"){dojo.byId("addMoreProducts").style.display="block"}cursor_clear();MI.toggleLoadProgress(false)}}),wc.render.declareRefreshController({id:"MIResetPasswordRefreshController",renderContext:wc.render.getContextById("MIResetPasswordRefreshContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;if(c.actionId=="AjaxPersonChangeServicePasswordReset"){d.refresh({userId:c.resetLogonId})}},postRefreshHandler:function(a){dojo.byId("MIResetPasswordLightBox_div_main").style.display="none";dojo.byId("MIResetPasswordLightBox_Success").style.display="block"}}),wc.render.declareRefreshController({id:"ImportShoppingListDisplayController",renderContext:wc.render.getContextById("ImportShoppingListDisplayRefreshContext"),url:"",formId:"",renderContextChangedHandler:function(c,d){var a=this;var b=this.renderContext;var e=[];e.catalogId=CommonControllersDeclarationJS.catalogId;e.storeId=b.properties.storeId;d.refresh(e)},modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;d.refresh()}}),wc.render.declareRefreshController({id:"MISubmitclaimController",renderContext:wc.render.getContextById("MISubmitclaimControllerContext"),url:"",formId:"",modelChangedHandler:function(c,d){var a=this;var b=this.renderContext;var e=[];if(c.actionId=="AjaxMISubmitclaim"){dojo.byId("MISubmitclaimRefreshArea_Main").style.display="none";dojo.byId("MISubmitclaimRefreshArea").style.display="block";d.refresh({messageId:c.messageId,toEmail:c.toEmail,orderRef:c.orderRef,leafletcode:c.leafletcode,claim:c.claim,invoiceNo:c.invoiceNo,noc:c.claimdropdown})}}}),wc.render.declareRefreshController({id:"MISubmitClaimMainController",renderContext:wc.render.getContextById("MISubmitClaimMainContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;var d=[];d.catalogId=CommonControllersDeclarationJS.catalogId;d.storeId=a.properties.storeId;d.langId=a.properties.langId;c.refresh(d)}}),wc.render.declareRefreshController({id:"LongonDialogDisplayRefreshController",renderContext:wc.render.getContextById("LongonDialogDisplayRefreshContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;a.properties.catalogId=CommonControllersDeclarationJS.catalogId;c.refresh({namevaluepair:a.properties.namevaluepairlist,catalogId:CommonControllersDeclarationJS.catalogId,storeId:a.properties.storeId})},postRefreshHandler:function(b){if(MI.IE){var a=document.createEventObject();document.getElementById("signin").fireEvent("onclick",a)}else{var a=document.createEvent("MouseEvent");a.initMouseEvent("click",true,true,window,1,0,0,0,0,false,false,false,false,0,null);document.getElementById("signin").dispatchEvent(a)}}}),wc.render.declareRefreshController({id:"SearchDisplayController",renderContext:wc.render.getContextById("SearchDisplayContext"),url:"AutoSuggestForm",formId:"CatalogSearchForm",renderContextChangedHandler:function(c,d){var b=this.renderContext;d.refresh(b.properties);var a=dojo.byId("autosuggestTextArea");a.style.display="inline"}}),wc.render.declareRefreshController({id:"PurchaseCardDisplayController",renderContext:wc.render.getContextById("purchaseCardPaymentContext"),url:"VisaSnippetView",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;if(a.properties.paymentMethod=="Purchase Card"){dojo.byId("PurchaseCardDisplay").style.display="block";c.refresh(a.properties)}else{dojo.byId("PurchaseCardDisplay").style.display="none"}}});wc.render.declareRefreshController({id:"updateDeliveryInfoController",renderContext:wc.render.getContextById("updateDeliveryInfoContext"),url:"UpdateDeliveryInfoView",formId:"",renderContextChangedHandler:function(b,c){var a=this.renderContext;c.refresh(a.properties)}});wc.render.declareRefreshController({id:"organizationRegistrationPostalCodeController",renderContext:wc.render.getContextById("organizationRegistrationPostalCodeContext"),url:"MICompanySearchListView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(b){MI.toggleLoadProgress(false);dojo.byId("organizationRegistrationAddForm_PostalCode_RefreshArea").style.display="block";var a=this.renderContext.properties.isCheckout;if(a!=undefined&&a!=null&&a==true){checkOrganizationDetails("organizationRegistrationAddForm_OrgSection_RefreshArea","organizationCheckoutRegistrationOrgSectionContext","Organization")}else{checkOrganizationDetails("organizationRegistrationAddForm_OrgSection_RefreshArea","organizationRegistrationOrgSectionContext","Organization")}cursor_clear()}});wc.render.declareRefreshController({id:"organizationRegistrationOrgSectionController",renderContext:wc.render.getContextById("organizationRegistrationOrgSectionContext"),url:"OrganizationEntryFormDisplayView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}});wc.render.declareRefreshController({id:"organizationCheckoutRegistrationOrgSectionController",renderContext:wc.render.getContextById("organizationCheckoutRegistrationOrgSectionContext"),url:"OrganizationCheckoutRegistrationView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}});wc.render.declareRefreshController({id:"organizationRegistrationShpSectionController",renderContext:wc.render.getContextById("organizationRegistrationShpSectionContext"),url:"ShippingRegistrationDisplayView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}});wc.render.declareRefreshController({id:"organizationRegistrationBilSectionController",renderContext:wc.render.getContextById("organizationRegistrationBilSectionContext"),url:"BillingRegistrationDisplayView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}});wc.render.declareRefreshController({id:"organizationRegistrationPostalCodeDeliveryController",renderContext:wc.render.getContextById("organizationRegistrationPostalCodeDeliveryContext"),url:"MICompanySearchListDeliveryView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false);dojo.byId("organizationRegistrationAddForm_PostalCodeDelivery_RefreshArea").style.display="block";checkOrganizationDetails("organizationRegistrationAddForm_ShpSection_RefreshArea","organizationRegistrationShpSectionContext","Delivery")}});wc.render.declareRefreshController({id:"organizationRegistrationPostalCodeBillingController",renderContext:wc.render.getContextById("organizationRegistrationPostalCodeBillingContext"),url:"MICompanySearchListBillingView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false);dojo.byId("organizationRegistrationAddForm_PostalCodeBilling_RefreshArea").style.display="block";checkOrganizationDetails("organizationRegistrationAddForm_BilSection_RefreshArea","organizationRegistrationBilSectionContext","Billing")}});wc.render.declareRefreshController({id:"miPaperCatalogPostalCodeController",renderContext:wc.render.getContextById("miPaperCatalogPostalCodeContext"),url:"MICompanySearchListView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false);dojo.byId("miPaperCatalog_PostalCode_RefreshArea").style.display="block";checkOrganizationDetails("miPaperCatalog_OrgSection_RefreshArea","miPaperCatalogOrgSectionContext");cursor_clear()}});wc.render.declareRefreshController({id:"miPaperCatalogRequestOrgSectionController",renderContext:wc.render.getContextById("miPaperCatalogRequestOrgSectionContext"),url:"MIPaperCatalogOrganizationDisplayView",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false)}});wc.render.declareRefreshController({id:"MyProfileDisplayController",renderContext:wc.render.getContextById("MyProfileDisplayContext"),url:"",formId:"",renderContextChangedHandler:function(b,c){MI.toggleLoadProgress(true);var a=this.renderContext;c.refresh(a.properties)},postRefreshHandler:function(a){MI.toggleLoadProgress(false);if(this.renderContext.properties.action=="view-profile"){dojo.byId("MyAccountDisplay_AddressInfo_Span").innerHTML="";scroll(0,0)}else{if(this.renderContext.properties.action=="edit-uName"){if(dojo.byId("MyAccountDisplay_AddressInfo_Span")!=null){dojo.byId("MyAccountDisplay_AddressInfo_Span").innerHTML=MessageHelper.getMessage("UserNameUpdated_Text");scroll(0,0)}}}}});
