var aspdnsf=new function(){};aspdnsf.StringResource={initialize:function(){this.strings=new Hash()},registerString:function(A,B){this.strings[A]=B},getString:function(A){if(this.strings[A]){return this.strings[A]}else{return A}}};aspdnsf.StringResource.initialize();aspdnsf.CurrencyFormatter={initialize:function(){this.symbol="";this.decimalDigits=2},setSymbol:function(A){this.symbol=A},setDecimalDigits:function(A){this.decimalDigits=A},format:function(B){var A=new NumberFormat();A.setCurrencyValue(this.symbol);A.setPlaces(this.decimalDigits,false);A.setInputDecimal(".");A.setCurrency(true);A.setCurrencyPosition(A.LEFT_OUTSIDE);A.setNegativeFormat(A.LEFT_DASH);A.setNegativeRed(false);A.setSeparators(true,",",",");A.setNumber(B);return A.toFormatted()}};aspdnsf.CurrencyFormatter.initialize();aspdnsf.Errors=new Object();aspdnsf.Errors.ValidateError=new Object();aspdnsf.Errors.ValidateError.MissingRequiredItem=1;aspdnsf.Errors.ValidateError.EmptyTextItem=1;aspdnsf.Controls=new function(){};aspdnsf.Controls.PriceDeltaControl=Class.create();aspdnsf.Controls.PriceDeltaControl.prototype={initialize:function(B,A){this.id=B;this.ctrl=$(A)},setControl:function(A){if(A){A.addDeltaPriceChangedEventHandler(this.controlDeltaPriceChangedEventHandler.bind(this))}},controlDeltaPriceChangedEventHandler:function(B){if(B.getIsIncluded()){this.ctrl.innerHTML=aspdnsf.StringResource.getString("product.kit2product.xml.config.10")}else{var C=B.getDeltaPrice();var A="";if(C>=0){A=aspdnsf.StringResource.getString("showproduct.aspx.14")+" "+aspdnsf.CurrencyFormatter.format(C)}else{A=aspdnsf.StringResource.getString("showproduct.aspx.15")+" "+aspdnsf.CurrencyFormatter.format(Math.abs(C))}if(B.getIsVatEnabled()){if(B.getIsVatInclusive()){A+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.6")}else{A+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.7")}}this.ctrl.innerHTML=A}}};aspdnsf.Controls.KitController={initialize:function(){this.controls=new Hash();this.observers=new Array()},registerControl:function(A){if(A){this.controls[A.getId()]=A;this.notifyObservers(A);return A}},getControl:function(A){return this.controls[A]},addObserver:function(A){if(A){this.observers[this.observers.length]=A}},notifyObservers:function(B){for(var A=0;A<this.observers.length;A++){this.observers[A].notify(B)}}};aspdnsf.Controls.KitController.initialize();aspdnsf.Controls.KitControl=Class.create();aspdnsf.Controls.KitControl.prototype={initialize:function(C,B,A){this.id=C;this.basePrice=B;this.regBasePrice=A;this.isOnSale=(this.basePrice<this.regBasePrice);this.groups=new Array();this.compositionChangedEventHandlers=new Array();this.tax=1;this.discount=0;this.groupCompositionCompleteEventHandlers=new Array();this.form=null},getId:function(){return this.id},getGroups:function(){return this.groups},registerGroup:function(A){if(A){this.groups.push(A);A.addSelectionChangedEventHandler(this.groupSelectionChangedEventHandler.bind(this));A.kitControl=this}},getBasePrice:function(){return this.basePrice*this.tax},getIsOnSale:function(){return this.isOnSale},getRegularBasePrice:function(){return this.regBasePrice},getCustomizedPrice:function(B){var E=0;for(var C=0;C<this.groups.length;C++){var D=this.groups[C];E+=D.getDeltaPrice(B)}var A=this.getBasePrice();if(arguments.length===0||!B){A*=(1-(this.discount/100))}return A+E},setTax:function(A){this.tax=A},setDiscount:function(A){this.discount=A},addCompositionChangedEventHandler:function(A){this.compositionChangedEventHandlers.push(A)},setGroupCompositionComplete:function(){this.onGroupCompositionComplete()},addGroupCompositionCompleteEventHandler:function(A){this.groupCompositionCompleteEventHandlers.push(A)},onGroupCompositionComplete:function(){for(var B=0;B<this.groupCompositionCompleteEventHandlers.length;B++){var A=this.groupCompositionCompleteEventHandlers[B];A(this)}},groupSelectionChangedEventHandler:function(A){this.persistComposition();this.onCompositionChanged()},getComposition:function(){var F=new Array();for(var D=0;D<this.groups.length;D++){var E=this.groups[D];var B=E.getSelectedItems();for(var A=0;A<B.length;A++){var C=B[A];F.push(E.getId()+"+"+C.getId())}}return F},persistComposition:function(){var B=this.getComposition();var A=$$(".KitItems");A.each(function(D,C){D.value=B})},onCompositionChanged:function(){for(var B=0;B<this.compositionChangedEventHandlers.length;B++){var A=this.compositionChangedEventHandlers[B];A(this)}},getPersistCompositionHandler:function(){var A=this.persistComposition.bind(this);return A},chainHandler:function(A){var B=this.persistComposition.bind(this);return function(){B();if(A){return A()}return true}},setForm:function(E){var D=$(E);if(D){this.form=D;var B=D.onsubmit;var A=this.onFormSubmit.bind(this);var C=function(){return A()&&(B&&B())};D.onsubmit=C}},onFormSubmit:function(){if(!this.validate()){return false}this.persistComposition();this.attachOtherTypes();return true},validate:function(){this.hideError();var C=new Array();for(var A=0;A<this.groups.length;A++){var B=this.groups[A];if(!B.validate()){this.showError(B.lastError);return false}}return true},showAddToCart:function(){var A=$("KitAddToCartForm");if(A){A.show()}},hideAddToCart:function(){var A=$("KitAddToCartForm");if(A){A.hide()}},showError:function(B){var A=$("KitError");var C=$("lblKitError");if(A&&C){A.show();if(B){C.innerHTML=B}else{C.innerHTML=aspdnsf.StringResource.getString("product.kit2product.xml.config.16")}}},hideError:function(){var A=$("KitError");var B=$("lblKitError");if(A&&B){A.hide();B.innerHTML=""}},attachOtherTypes:function(){var D=this.form;var A=$(D.id+"_KitFormContainer");if(A){try{var C=document.getElementsByClassName("KitItemTextOption");C.each(function(G,F){A.appendChild(G)});var B=document.getElementsByClassName("KitItemFileUpload");B.each(function(G,F){A.appendChild(G)})}catch(E){alert(E)}}}};aspdnsf.Controls.KitDropDownGroupControl=Class.create();aspdnsf.Controls.KitDropDownGroupControl.prototype={initialize:function(B,A){this.kitControl=null;this.id=B;this.ctrl=$(A);this.ctrl.onchange=this.onOptionChanged.bind(this);this.lastValidationError=null;this.controls=new Array();this.selectionChangedEventHandlers=new Array();this.selectedControl=null;this.required=false},getId:function(){return this.id},getIsRequired:function(){return this.required},setIsRequired:function(A){this.required=A},getSelectedItems:function(){return[this.selectedControl]},getDeltaPrice:function(A){return this.selectedControl.getPrice(A)},addSelectionChangedEventHandler:function(A){this.selectionChangedEventHandlers.push(A)},registerControl:function(A){if(A){this.controls.push(A);if(A.getIsIncluded()){this.selectedControl=A}A.groupControl=this}},onOptionChanged:function(){var A=this.ctrl.selectedIndex;if(A<this.controls.length){this.selectedControl=this.controls[A];this.selectedControl.setIsIncluded(true)}for(var C=0;C<this.controls.length;C++){var B=this.controls[C];if(B!=this.selectedControl){B.setIsIncluded(false)}}this.refreshView();this.onSelectionChanged()},refreshView:function(){if(this.controls.length===0){return }if(this.selectedControl){this.ctrl.options.length=0;var C=0;for(var E=0;E<this.controls.length;E++){var D=this.controls[E];D.compareWith(this.selectedControl);var B="longDescriptionRow_"+this.id+"_"+D.id;var A;if(D==this.selectedControl){C=E;A=$(B);if(A){A.show()}}else{A=$(B);if(A){A.hide()}}this.ctrl.options[E]=new Option(D.getDisplay(),D.getId())}this.ctrl.selectedIndex=C}else{this.selectedControl=this.controls[0];this.refreshView()}if(this.selectedControl.extraScriptOnSelection){this.selectedControl.extraScriptOnSelection()}},onSelectionChanged:function(){for(var B=0;B<this.selectionChangedEventHandlers.length;B++){var A=this.selectionChangedEventHandlers[B];A(this)}},validate:function(){if(this.getIsRequired()===true){return this.getSelectedItems().length>0}return true}};aspdnsf.Controls.KitDropDownOptionControl=Class.create();aspdnsf.Controls.KitDropDownOptionControl.prototype={initialize:function(C,B,A){this.groupControl=null;this.id=C;this.price=B;this.deltaPrice=0;this.name=A;this.longDescription="";this.isIncluded=false;this.shouldDisplayPriceDelta=true;this.shouldDisplayInKitSummary=true;this.summaryName="";this.summaryDescription="";this.tax=1;this.discount=0;this.vatEnabled=false;this.vatInclusive=false;this.lastValidationError=null},getId:function(){return this.id},getName:function(){return this.name},getSummaryName:function(){if(this.summaryName===null||this.summaryName===""){return this.summaryName}else{return name}},getPrice:function(A){if(arguments.length===0||!A){return this.price*this.tax*(1-(this.discount/100))}return this.price*this.tax},getDeltaPrice:function(){return this.deltaPrice},getIsIncluded:function(){return this.isIncluded},getIsVatEnabled:function(){return this.vatEnabled},setIsVatEnabled:function(A){this.vatEnabled=A},getIsVatInclusive:function(){return this.vatInclusive},setIsVatInclusive:function(A){this.vatInclusive=A},setTax:function(A){this.tax=A},setDiscount:function(A){this.discount=A},setIsIncluded:function(A){this.isIncluded=A},setShouldDisplayPriceDelta:function(A){this.shouldDisplayPriceDelta=A},setShouldDisplayInKitSummary:function(A){this.shouldDisplayInKitSummary=A},compareWith:function(A){var B=0;if(A==this){B=0}else{B=this.getPrice()-A.getPrice()}this.deltaPrice=B},getDisplay:function(){if(this.shouldDisplayPriceDelta){if(this.isIncluded){return this.name}else{var A="";if(this.deltaPrice>=0){A=this.name+", "+aspdnsf.StringResource.getString("showproduct.aspx.14")+" "+aspdnsf.CurrencyFormatter.format(this.deltaPrice)}else{A=this.name+", "+aspdnsf.StringResource.getString("showproduct.aspx.15")+" "+aspdnsf.CurrencyFormatter.format(Math.abs(this.deltaPrice))}if(this.getIsVatEnabled()){if(this.getIsVatInclusive()){A+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.6")}else{A+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.7")}}return A}}else{return this.name}}};aspdnsf.Controls.KitRadioGroupControl=Class.create();aspdnsf.Controls.KitRadioGroupControl.prototype={initialize:function(A){this.id=A;this.controls=new Array();this.selectionChangedEventHandlers=new Array();this.selectedControl=null;this.required=false},getId:function(){return this.id},getIsRequired:function(){return this.required},setIsRequired:function(A){this.required=A},getSelectedItems:function(){return[this.selectedControl]},getDeltaPrice:function(A){return this.selectedControl.getPrice(A)},addSelectionChangedEventHandler:function(A){this.selectionChangedEventHandlers.push(A)},registerControl:function(A){if(A){this.controls.push(A);if(A.getIsIncluded()){this.selectedControl=A}A.addSelectedEventHandler(this.onControlSelected.bind(this))}},onControlSelected:function(C){C.setIsIncluded(true);for(var B=0;B<this.controls.length;B++){var A=this.controls[B];if(A!=C){A.setIsIncluded(false)}}this.selectedControl=C;this.refreshView();this.onSelectionChanged()},refreshView:function(){if(this.selectedControl){for(var B=0;B<this.controls.length;B++){var A=this.controls[B];A.compareWith(this.selectedControl)}}},onSelectionChanged:function(){for(var B=0;B<this.selectionChangedEventHandlers.length;B++){var A=this.selectionChangedEventHandlers[B];A(this)}},validate:function(){if(this.getIsRequired()===true){return this.getSelectedItems().length>0}return true}};aspdnsf.Controls.KitItemRadioControl=Class.create();aspdnsf.Controls.KitItemRadioControl.prototype={initialize:function(D,A,C,B){this.id=D;this.name=B;this.ctrl=$(A);this.ctrl.onclick=this.onSelected.bind(this);this.price=C;this.isIncluded=false;this.deltaPrice=0;this.selectedEventHandlers=new Array();this.deltaPriceChangedEventHandlers=new Array();this.tax=1;this.discount=0;this.vatEnabled=false;this.vatInclusive=false},getId:function(){return this.id},getName:function(){return this.name},getPrice:function(A){if(arguments.length===0||!A){return this.price*this.tax*(1-(this.discount/100))}return this.price*this.tax},getDeltaPrice:function(){return this.deltaPrice},setTax:function(A){this.tax=A},setDiscount:function(A){this.discount=A},getIsVatEnabled:function(){return this.vatEnabled},setIsVatEnabled:function(A){this.vatEnabled=A},getIsVatInclusive:function(){return this.vatInclusive},setIsVatInclusive:function(A){this.vatInclusive=A},compareWith:function(A){var B=0;if(A==this){B=0}else{B=this.getPrice()-A.getPrice()}this.setDeltaPrice(B)},setDeltaPrice:function(A){this.deltaPrice=A;this.onDeltaPriceChanged()},getIsIncluded:function(){return this.isIncluded},setIsIncluded:function(A){this.isIncluded=A},addSelectedEventHandler:function(A){this.selectedEventHandlers.push(A)},onSelected:function(){for(var B=0;B<this.selectedEventHandlers.length;B++){var A=this.selectedEventHandlers[B];A(this)}},addDeltaPriceChangedEventHandler:function(A){this.deltaPriceChangedEventHandlers.push(A)},onDeltaPriceChanged:function(){for(var B=0;B<this.deltaPriceChangedEventHandlers.length;B++){var A=this.deltaPriceChangedEventHandlers[B];A(this)}}};aspdnsf.Controls.KitCheckBoxGroupControl=Class.create();aspdnsf.Controls.KitCheckBoxGroupControl.prototype={initialize:function(A){this.id=A;this.controls=new Array();this.selectionChangedEventHandlers=new Array();this.selectedControls=new Array();this.required=false},getId:function(){return this.id},getIsRequired:function(){return this.required},setIsRequired:function(A){this.required=A},getSelectedItems:function(){return this.selectedControls},getDeltaPrice:function(A){var D=0;for(var C=0;C<this.selectedControls.length;C++){var B=this.selectedControls[C];D+=B.getPrice(A)}return D},addSelectionChangedEventHandler:function(A){this.selectionChangedEventHandlers.push(A)},registerControl:function(A){if(A){this.controls.push(A);if(A.getIsIncluded()){this.selectedControls.push(A)}A.addSelectedEventHandler(this.onControlSelected.bind(this));A.addUnSelectedEventHandler(this.onControlUnSelected.bind(this))}},onControlSelected:function(A){A.setIsIncluded(true);this.selectedControls.push(A);this.refreshView();this.onSelectionChanged()},onControlUnSelected:function(D){D.setIsIncluded(false);var A=new Array();for(var C=0;C<this.selectedControls.length;C++){var B=this.selectedControls[C];if(B!=D){A.push(B)}}this.selectedControls=A;this.refreshView();this.onSelectionChanged()},refreshView:function(){if(this.selectedControls){for(var B=0;B<this.controls.length;B++){var A=this.controls[B];A.setDeltaPrice(A.getPrice())}}},onSelectionChanged:function(){for(var B=0;B<this.selectionChangedEventHandlers.length;B++){var A=this.selectionChangedEventHandlers[B];A(this)}},validate:function(){if(this.getIsRequired()===true){return this.getSelectedItems().length>0}return true}};aspdnsf.Controls.KitItemCheckBoxControl=Class.create();aspdnsf.Controls.KitItemCheckBoxControl.prototype={initialize:function(D,A,C,B){this.id=D;this.name=B;this.ctrl=$(A);this.ctrl.onclick=this.onControlCheckChanged.bind(this);this.price=C;this.isIncluded=false;this.deltaPrice=0;this.selectedEventHandlers=new Array();this.unSelectedEventHandlers=new Array();this.deltaPriceChangedEventHandlers=new Array();this.tax=1;this.discount=0;this.vatEnabled=false;this.vatInclusive=false},getId:function(){return this.id},getName:function(){return this.name},getPrice:function(A){if(arguments.length===0||!A){return this.price*this.tax*(1-(this.discount/100))}return this.price*this.tax},getDeltaPrice:function(){return this.deltaPrice},getIsVatEnabled:function(){return this.vatEnabled},setIsVatEnabled:function(A){this.vatEnabled=A},getIsVatInclusive:function(){return this.vatInclusive},setIsVatInclusive:function(A){this.vatInclusive=A},setTax:function(A){this.tax=A},setDiscount:function(A){this.discount=A},setDeltaPrice:function(A){this.deltaPrice=A;this.onDeltaPriceChanged()},getIsIncluded:function(){return this.isIncluded},setIsIncluded:function(A){this.isIncluded=A},addSelectedEventHandler:function(A){this.selectedEventHandlers.push(A)},addUnSelectedEventHandler:function(A){this.unSelectedEventHandlers.push(A)},onControlCheckChanged:function(){if(this.ctrl.checked){this.onSelected()}else{this.onUnSelected()}},onSelected:function(){for(var B=0;B<this.selectedEventHandlers.length;B++){var A=this.selectedEventHandlers[B];A(this)}},onUnSelected:function(){for(var B=0;B<this.unSelectedEventHandlers.length;B++){var A=this.unSelectedEventHandlers[B];A(this)}},addDeltaPriceChangedEventHandler:function(A){this.deltaPriceChangedEventHandlers.push(A)},onDeltaPriceChanged:function(){for(var B=0;B<this.deltaPriceChangedEventHandlers.length;B++){var A=this.deltaPriceChangedEventHandlers[B];A(this)}}};aspdnsf.Controls.Highlight=Class.create();aspdnsf.Controls.Highlight.prototype={initialize:function(A){this.elem=$(A);this.ctr=0;this.doHighLight()},colors:["#A9FFFE","#B1FFFE","#BBFFFE","#C3FFFE","#CDFFFE","#D7FFFE","#E3FFFE","#EFFFFE","#FFFFE1"],doHighLight:function(A){if(this.elem){if(this.ctr<this.colors.length){this.elem.style.backgroundColor=this.colors[this.ctr];this.ctr+=1;new PeriodicalExecuter(this.doHighLight.bind(this),0.1)}else{A.stop()}}}};aspdnsf.Controls.KitPriceControl=Class.create();aspdnsf.Controls.KitPriceControl.prototype={initialize:function(B,A){this.id=B;this.ctrl=$(A);this.kitControl=null;this.lblRegularBasePrice=$(A+"_RegularBasePrice");this.lblBasePrice=$(A+"_BasePrice");this.lblCustomizedPrice=$(A+"_CustomizedPrice");this.lblLevelPrice=$(A+"_LevelPrice");this.customerHasLevel=false;this.customerLevel="";this.vatEnabled=false;this.vatInclusive=false;this.displayEventHandlers=new Array()},setCustomerLevel:function(A){this.customerHasLevel=true;this.customerLevel=A},getIsVatEnabled:function(){return this.vatEnabled},setIsVatEnabled:function(A){this.vatEnabled=A},getIsVatInclusive:function(){return this.vatInclusive},setIsVatInclusive:function(A){this.vatInclusive=A},setKitControl:function(A){if(A){this.kitControl=A;this.kitControl.addGroupCompositionCompleteEventHandler(this.kitGroupCompositionCompleteEventHandler.bind(this));this.kitControl.addCompositionChangedEventHandler(this.kitCompositionChangedEventHandler.bind(this));this.buildDisplay()}else{aspdnsf.Controls.KitController.addObserver(this)}},notify:function(A){this.setKitControl(A)},kitGroupCompositionCompleteEventHandler:function(){this.buildDisplay()},kitCompositionChangedEventHandler:function(){this.buildDisplay()},addDisplayEventHandler:function(A){this.displayEventHandlers.push(A)},buildDisplay:function(){if(this.kitControl.getIsOnSale()){this.lblRegularBasePrice.innerHTML=aspdnsf.StringResource.getString("product.kit2product.xml.config.17")+aspdnsf.CurrencyFormatter.format(this.kitControl.getRegularBasePrice());this.lblBasePrice.className="KitBasePriceOnSale";this.lblCustomizedPrice.className="KitCustomizedPriceOnSale";this.lblLevelPrice.className="KitLevelPriceOnSale"}this.lblBasePrice.innerHTML=aspdnsf.StringResource.getString("showproduct.aspx.kitBasePrice")+" "+aspdnsf.CurrencyFormatter.format(this.kitControl.getBasePrice());if(this.getIsVatEnabled()){if(this.getIsVatInclusive()){this.lblBasePrice.innerHTML+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.6")}else{this.lblBasePrice.innerHTML+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.7")}}this.lblCustomizedPrice.innerHTML=aspdnsf.StringResource.getString("showproduct.aspx.kitCustomizedPrice")+" "+aspdnsf.CurrencyFormatter.format(this.kitControl.getCustomizedPrice(true));if(this.getIsVatEnabled()){if(this.getIsVatInclusive()){this.lblCustomizedPrice.innerHTML+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.6")}else{this.lblCustomizedPrice.innerHTML+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.7")}}if(this.customerHasLevel){this.lblLevelPrice.style.display="";this.lblLevelPrice.innerHTML=this.customerLevel+" "+aspdnsf.StringResource.getString("showproduct.aspx.kitCustomizedPrice")+" "+aspdnsf.CurrencyFormatter.format(this.kitControl.getCustomizedPrice(false));if(this.getIsVatEnabled()){if(this.getIsVatInclusive()){this.lblLevelPrice.innerHTML+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.6")}else{this.lblLevelPrice.innerHTML+=" "+aspdnsf.StringResource.getString("setvatsetting.aspx.7")}}this.lblBasePrice.style.textDecoration="line-through";this.lblCustomizedPrice.style.textDecoration="line-through";this.lblCustomizedPrice.innerHTML="";this.lblCustomizedPrice.style.display="none"}this.lblBasePrice.innerHTML="";this.lblBasePrice.style.display="none";this.onDisplay()},onDisplay:function(){for(var B=0;B<this.displayEventHandlers.length;B++){var A=this.displayEventHandlers[B];A(this)}}};aspdnsf.Controls.KitSummaryControl=Class.create();aspdnsf.Controls.KitSummaryControl.prototype={initialize:function(A){this.id=A;this.lnkHeader=$("lnkKitSummaryHeader_"+A);this.lnkHeader.onclick=this.onHeaderLinkClicked.bind(this);this.shouldDisplaySummary=false;this.pnlSummary=$("pnlKitSummary_"+A);this.kitControl=null},setKitControl:function(A){this.kitControl=A;this.kitControl.addCompositionChangedEventHandler(this.kitCompositionChangedEventHandler.bind(this));this.buildDisplay()},onHeaderLinkClicked:function(){if(this.pnlSummary.style.display===""){this.lnkHeader.innerHTML=aspdnsf.StringResource.getString("showproduct.aspx.showKitSummary");this.pnlSummary.style.display="none"}else{this.lnkHeader.innerHTML=aspdnsf.StringResource.getString("showproduct.aspx.hideKitSummary");this.pnlSummary.style.display=""}},kitCompositionChangedEventHandler:function(){this.buildDisplay()},buildDisplay:function(){if(this.shouldDisplaySummary){this.pnlSummary.innerHTML="";var C=document.createElement("ul");this.pnlSummary.appendChild(C);var F=false;var G=this.kitControl.getGroups();for(var A=0;A<G.length;A++){var J=G[A];var D=J.getSelectedItems();for(var H=0;H<D.length;H++){var K=D[H];if(K.shouldDisplayInKitSummary){var I=document.createElement("li");I.innerHTML=K.getName();C.appendChild(I);F=true;if(K.summaryDescription!==null&&K.summaryDescription!==""){var B=document.createElement("ul");var E=document.createElement("li");E.innerHTML=K.summaryDescription;B.appendChild(E);I.appendChild(B)}}}}if(!F){this.lnkHeader.style.display="none";this.pnlSummary.innerHTML=""}else{this.lnkHeader.style.display="";if(this.pnlSummary.style.display===""){this.lnkHeader.innerHTML=aspdnsf.StringResource.getString("showproduct.aspx.hideKitSummary")}else{this.lnkHeader.innerHTML=aspdnsf.StringResource.getString("showproduct.aspx.showKitSummary")}}}else{this.lnkHeader.style.display="none";this.lnkHeader.innerHTML="";this.pnlSummary.style.display="none";this.pnlSummary.innerHTML=""}}};aspdnsf.Controls.KitTextBoxGroupControl=Class.create();aspdnsf.Controls.KitTextBoxGroupControl.prototype={initialize:function(A){this.id=A;this.controls=new Array();this.selectionChangedEventHandlers=new Array();this.selectedControls=new Array();this.required=false},getId:function(){return this.id},getIsRequired:function(){return this.required},setIsRequired:function(A){this.required=A},getSelectedItems:function(){return this.selectedControls},getDeltaPrice:function(A){var D=0;for(var C=0;C<this.selectedControls.length;C++){var B=this.selectedControls[C];D+=B.getPrice(A)}return D},addSelectionChangedEventHandler:function(A){this.selectionChangedEventHandlers.push(A)},registerControl:function(A){if(A){this.controls.push(A);if(A.getIsIncluded()){this.selectedControls.push(A)}A.addSelectedEventHandler(this.onControlSelected.bind(this));A.addUnSelectedEventHandler(this.onControlUnSelected.bind(this))}},onControlSelected:function(A){A.setIsIncluded(true);this.selectedControls.push(A);this.refreshView();this.onSelectionChanged()},onControlUnSelected:function(D){D.setIsIncluded(false);var A=new Array();for(var C=0;C<this.selectedControls.length;C++){var B=this.selectedControls[C];if(B!=D){A.push(B)}}this.selectedControls=A;this.refreshView();this.onSelectionChanged()},refreshView:function(){if(this.selectedControls){for(var B=0;B<this.controls.length;B++){var A=this.controls[B];A.setDeltaPrice(A.getPrice())}}},onSelectionChanged:function(){for(var B=0;B<this.selectionChangedEventHandlers.length;B++){var A=this.selectionChangedEventHandlers[B];A(this)}},validate:function(){var A=this.getSelectedItems();if(this.getIsRequired()===true){if(A.length===0){return false}}if(A.length>0){for(var B=0;B<A.length;B++){if(A[B].valueIsValid()===false){return false}}}return true}};aspdnsf.Controls.KitTextBoxControl=Class.create();aspdnsf.Controls.KitTextBoxControl.prototype={initialize:function(D,A,C,B){this.id=D;this.name=B;this.ctrl=$(A);this.ctrl.onkeyup=this.onControlTextChanged.bind(this);this.price=C;this.isIncluded=false;this.deltaPrice=0;this.selectedEventHandlers=new Array();this.unSelectedEventHandlers=new Array();this.deltaPriceChangedEventHandlers=new Array();this.tax=1;this.discount=0;this.vatEnabled=false;this.vatInclusive=false},getId:function(){return this.id},getName:function(){return this.name},getPrice:function(A){if(arguments.length===0||!A){return this.price*this.tax*(1-(this.discount/100))}return this.price*this.tax},getDeltaPrice:function(){return this.deltaPrice},getIsVatEnabled:function(){return this.vatEnabled},setIsVatEnabled:function(A){this.vatEnabled=A},getIsVatInclusive:function(){return this.vatInclusive},setIsVatInclusive:function(A){this.vatInclusive=A},setTax:function(A){this.tax=A},setDiscount:function(A){this.discount=A},setDeltaPrice:function(A){this.deltaPrice=A;this.onDeltaPriceChanged()},getIsIncluded:function(){return this.isIncluded},setIsIncluded:function(A){this.isIncluded=A},addSelectedEventHandler:function(A){this.selectedEventHandlers.push(A)},addUnSelectedEventHandler:function(A){this.unSelectedEventHandlers.push(A)},valueIsValid:function(){return this.ctrl.value!==""},onControlTextChanged:function(){if(this.ctrl.value!==""&&!this.getIsIncluded()){this.onSelected()}else{if(this.ctrl.value===""&&this.getIsIncluded()===true){this.onUnSelected()}}},onSelected:function(){for(var B=0;B<this.selectedEventHandlers.length;B++){var A=this.selectedEventHandlers[B];A(this)}},onUnSelected:function(){for(var B=0;B<this.unSelectedEventHandlers.length;B++){var A=this.unSelectedEventHandlers[B];A(this)}},addDeltaPriceChangedEventHandler:function(A){this.deltaPriceChangedEventHandlers.push(A)},onDeltaPriceChanged:function(){for(var B=0;B<this.deltaPriceChangedEventHandlers.length;B++){var A=this.deltaPriceChangedEventHandlers[B];A(this)}}};aspdnsf.Controls.KitItemFileUploadControl=Class.create();aspdnsf.Controls.KitItemFileUploadControl.prototype={initialize:function(D,A,C,B){this.id=D;this.name=B;this.ctrl=$(A);this.ctrl.onclick=this.onControlCheckChanged.bind(this);this.price=C;this.isIncluded=false;this.deltaPrice=0;this.selectedEventHandlers=new Array();this.unSelectedEventHandlers=new Array();this.deltaPriceChangedEventHandlers=new Array();this.tax=1;this.discount=0;this.vatEnabled=false;this.vatInclusive=false},getId:function(){return this.id},getName:function(){return this.name},getPrice:function(A){if(arguments.length===0||!A){return this.price*this.tax*(1-(this.discount/100))}return this.price*this.tax},getDeltaPrice:function(){return this.deltaPrice},getIsVatEnabled:function(){return this.vatEnabled},setIsVatEnabled:function(A){this.vatEnabled=A},getIsVatInclusive:function(){return this.vatInclusive},setIsVatInclusive:function(A){this.vatInclusive=A},setTax:function(A){this.tax=A},setDiscount:function(A){this.discount=A},setDeltaPrice:function(A){this.deltaPrice=A;this.onDeltaPriceChanged()},getIsIncluded:function(){return this.isIncluded},setIsIncluded:function(A){this.isIncluded=A},addSelectedEventHandler:function(A){this.selectedEventHandlers.push(A)},addUnSelectedEventHandler:function(A){this.unSelectedEventHandlers.push(A)},onControlCheckChanged:function(){if(this.ctrl.checked){this.onSelected();this.showUploadControl()}else{if(!this.removeUpload()){return false}this.onUnSelected()}},valueIsValid:function(){var A=$("KitItemFileUpload_"+this.id);if(A){return A.value!==""}return true},showUploadControl:function(){var C=$("ItemFileUploadRow_"+this.id);var A=$("ItemFileUploadContentArea_"+this.id);if(C&&A){var B=document.createElement("input");B.type="file";B.id="KitItemFileUpload_"+this.id;B.name="KitItemFileUpload_"+this.id;B.className="KitItemFileUpload";A.appendChild(B);C.show()}},removeUpload:function(){var B=$("ItemFileUploadImage_"+this.id);if(B){var C=aspdnsf.StringResource.getString("product.kit2product.xml.config.15");if(!confirm(C)){return false}}var A=$("ItemFileUploadContentArea_"+this.id);A.innerHTML="";var D=$("ItemFileUploadRow_"+this.id);D.hide();return true},onSelected:function(){for(var B=0;B<this.selectedEventHandlers.length;B++){var A=this.selectedEventHandlers[B];A(this)}},onUnSelected:function(){for(var B=0;B<this.unSelectedEventHandlers.length;B++){var A=this.unSelectedEventHandlers[B];A(this)}},addDeltaPriceChangedEventHandler:function(A){this.deltaPriceChangedEventHandlers.push(A)},onDeltaPriceChanged:function(){for(var B=0;B<this.deltaPriceChangedEventHandlers.length;B++){var A=this.deltaPriceChangedEventHandlers[B];A(this)}}};aspdnsf.Controls.KitItemFileUploadGroupControl=Class.create();aspdnsf.Controls.KitItemFileUploadGroupControl.prototype={initialize:function(A){this.id=A;this.controls=new Array();this.selectionChangedEventHandlers=new Array();this.selectedControls=new Array();this.required=false},getId:function(){return this.id},getIsRequired:function(){return this.required},setIsRequired:function(A){this.required=A},getSelectedItems:function(){return this.selectedControls},getDeltaPrice:function(A){var D=0;for(var C=0;C<this.selectedControls.length;C++){var B=this.selectedControls[C];D+=B.getPrice(A)}return D},addSelectionChangedEventHandler:function(A){this.selectionChangedEventHandlers.push(A)},registerControl:function(A){if(A){this.controls.push(A);if(A.getIsIncluded()){this.selectedControls.push(A)}A.addSelectedEventHandler(this.onControlSelected.bind(this));A.addUnSelectedEventHandler(this.onControlUnSelected.bind(this))}},onControlSelected:function(A){A.setIsIncluded(true);this.selectedControls.push(A);this.refreshView();this.onSelectionChanged()},onControlUnSelected:function(D){D.setIsIncluded(false);var A=new Array();for(var C=0;C<this.selectedControls.length;C++){var B=this.selectedControls[C];if(B!=D){A.push(B)}}this.selectedControls=A;this.refreshView();this.onSelectionChanged()},refreshView:function(){if(this.selectedControls){for(var B=0;B<this.controls.length;B++){var A=this.controls[B];A.setDeltaPrice(A.getPrice())}}},onSelectionChanged:function(){for(var B=0;B<this.selectionChangedEventHandlers.length;B++){var A=this.selectionChangedEventHandlers[B];A(this)}},validate:function(){var A=this.getSelectedItems();if(this.getIsRequired()===true){if(A.length===0){return false}}if(A.length>0){for(var B=0;B<A.length;B++){if(A[B].valueIsValid()===false){return false}}}return true}};