function productClass(J,N,K,O,T,Y,D,G,E,C,Q,X,c,Z,I,U,L,S,W,M,R,b,A,V,a,B,F,H,P){this.productPKey=J;this.productCode=N;this.productName=K;this.productPrice=O;this.productReducedPrice=T;this.productWeight=Y;this.productInsertionTimeStamp=P;this.variantL1PKey=D;this.variantL1Code=G;this.variantL1Name=E;this.variantL1DeltaPrice=C;this.variantL1DeltaWeight=Q;this.variantL2PKey=X;this.variantL2Code=c;this.variantL2Name=Z;this.variantL2DeltaPrice=I;this.variantL2DeltaWeight=U;this.productPriceElementId=L;this.urlproductPriceFragment=S;this.productImageElementId=W;this.urlProductImageFragment=M;this.variantL1TableId=R;this.variantL1BaseNameLogoSelectorId=b;this.variantL2TableId=A;this.variantL2BaseNameLogoSelectorId=V;this.cascadeVariantL2ElementId=a;this.urlCascadeVariantL2Fragment=B;this.variantL1ComboId=F;this.variantL2ComboId=H}productClass.prototype.updatePrice=function(){if($(this.productPriceElementId)!=null){new Ajax.Updater(this.productPriceElementId,wsUrl+this.urlproductPriceFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{productPriceParam:product.productPrice,productReducedPriceParam:product.productReducedPrice,variantL1DeltaPriceParam:product.variantL1DeltaPrice,variantL2DeltaPriceParam:product.variantL2DeltaPrice},evalScripts:true})}};productClass.prototype.onClickLogoVariantL1=function(H,D,K,C,E,G,A,J){product.variantL1Code=D;product.variantL1PKey=K;product.variantL1DeltaPrice=C;product.variantL1Name=E;product.variantL1DeltaWeight=G;var I=$(product.variantL1TableId);var B=I.getElementsByTagName("img");for(var F=0;F<B.length;F++){if(B[F].id.indexOf(product.variantL1BaseNameLogoSelectorId)!=-1){B[F].style.display="none"}}$(H).style.display="block";if(A){if($(product.cascadeVariantL2ElementId)!=null){new Ajax.Updater(product.cascadeVariantL2ElementId,wsUrl+product.urlCascadeVariantL2Fragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{variantViewType2Param:J,productCodeParam:product.productCode,variantL1CodeParam:product.variantL1Code},evalScripts:true})}else{product.updatePrice()}}else{product.updatePrice()}if($(product.productImageElementId)!=null){new Ajax.Updater(product.productImageElementId,wsUrl+product.urlProductImageFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{variantL1PKeyParam:product.variantL1PKey,productPKeyParam:product.productPKey},evalScripts:true})}};productClass.prototype.onChangeComboVariantL1=function(E,F,C,G,D,B,A){product.variantL1Code=$(product.variantL1ComboId)[E].value;product.variantL1DeltaPrice=C[E];product.variantL1PKey=F[E];product.variantL1Name=G[E];product.variantL1DeltaWeight=D[E];if(B){if($(product.cascadeVariantL2ElementId)!=null){new Ajax.Updater(product.cascadeVariantL2ElementId,wsUrl+product.urlCascadeVariantL2Fragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{variantViewType2Param:A,productCodeParam:product.productCode,variantL1CodeParam:product.variantL1Code},evalScripts:true})}else{product.updatePrice()}}else{product.updatePrice()}if($(product.productImageElementId)!=null){new Ajax.Updater(product.productImageElementId,wsUrl+product.urlProductImageFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{variantL1PKeyParam:product.variantL1PKey,productPKeyParam:product.productPKey},evalScripts:true})}};productClass.prototype.onClickLogoVariantL2=function(E,F,C,B,I,H){product.variantL2PKey=C;product.variantL2Code=F;product.variantL2DeltaPrice=B;product.variantL2Name=I;product.variantL2DeltaWeight=H;var G=$(product.variantL2TableId);var A=G.getElementsByTagName("img");for(var D=0;D<A.length;D++){if(A[D].id.indexOf(product.variantL2BaseNameLogoSelectorId)!=-1){A[D].style.display="none"}}$(E).style.display="block";product.updatePrice()};productClass.prototype.onChangeComboVariantL2=function(C,D,A,E,B){product.variantL2PKey=D[C];product.variantL2Code=$(product.variantL2ComboId)[C].value;product.variantL2DeltaPrice=A[C];product.variantL2Name=E[C];product.variantL2DeltaWeight=B[C];product.updatePrice()};var product=new productClass(-1,"","",0,0,0,-1,"","",0,0,-1,"","",0,0,"productPriceDiv","includes/productPrice.jspf","imageProductDiv","includes/productImage.jspf","variantL1Table","logoSelector_L1","variantL2Table","logoSelector_L2","cascadeVariantL2Div","includes/cascadeVariantL2.jspf","variantL1Combo","variantL2Combo","");var cart={cartItemsElementId:"cartItemsDiv",urlCartItemsFragment:"includes/cart.jspf",cartCheckListElementId:"cartProductListDiv",urlCartCheckListFragment:"includes/cartCheckList.jspf",cartCheckListWrongFieldsId:"checkListWrongFields",cartCheckListErrorFieldsId:"checkListErrorFields",refresh:function(){if($(this.cartItemsElementId)!=null){new Ajax.Updater(this.cartItemsElementId,wsUrl+this.urlCartItemsFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{action:"refresh"},evalScripts:true})}},removeItem:function(B,C,A){if($(this.cartItemsElementId)!=null){new Ajax.Updater(this.cartItemsElementId,wsUrl+this.urlCartItemsFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{action:"removeItem",productPKeyParam:B,variantL1PKeyParam:C,variantL2PKeyParam:A},evalScripts:true})}},emptyCart:function(){if($(this.cartItemsElementId)!=null){new Ajax.Updater(this.cartItemsElementId,wsUrl+this.urlCartItemsFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{action:"emptyCart"},evalScripts:true})}},addItem:function(C,F,E,J,I,D,G,A,H,B){if($(this.cartItemsElementId)!=null){new Ajax.Updater(this.cartItemsElementId,wsUrl+this.urlCartItemsFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{action:"addItem",productPKeyParam:C,variantL1PKeyParam:F,variantL2PKeyParam:E,productAmountParam:J,productTotalPriceParam:I,productTotalWeightParam:D,productNameParam:G,variantL1NameParam:A,variantL2NameParam:H,productInsertionTimeStampParam:B},evalScripts:true})}},checklistRefresh:function(){if($(this.cartCheckListElementId)!=null){new Ajax.Updater(this.cartCheckListElementId,wsUrl+this.urlCartCheckListFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,evalScripts:true})}},checkListRemoveItem:function(B,C,A){if($(this.cartCheckListElementId)!=null){new Ajax.Updater(this.cartCheckListElementId,wsUrl+this.urlCartCheckListFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{productPKeyParam:B,variantL1PKeyParam:C,variantL2PKeyParam:A,removeParam:true},evalScripts:true})}},checkListChangeAmountItem:function(C,D,B,A){A=parseInt(A);if(isNaN(A)||(A<=0)){this.checklistRefresh()}else{if($(this.cartCheckListElementId)!=null){new Ajax.Updater(this.cartCheckListElementId,wsUrl+this.urlCartCheckListFragment+addJSessionId(),{method:"post",onFailure:failureAjaxUpdater,parameters:{productPKeyParam:C,variantL1PKeyParam:D,variantL2PKeyParam:B,amountParam:A},evalScripts:true})}}},checkOut:function(B,A){if(isNaN(B)||(B<=0)){if($(this.cartCheckListWrongFieldsId)!=null){$(this.cartCheckListWrongFieldsId).style.display="inLine"}}else{location.href=A}}};