function ProductOrder(a){this.product=a;this.render();showPopup('page1')}ProductOrder.prototype={product:null,quantity:0,wording:null,customisation:null,addToCart:function(){CustomCards.Client.Data.AddToCart(this,function(a){renderCarts();hidePopup('');showPopup('cart')},handleError)},clear:function(){this.customisation=null;this.quantity=0;this.wording=null;$get('uploadedlogo').innerHTML='';$('#iupload').show('fast')},render:function(){$('.popup_cardnumber').text(this.product.cardnumber);$('.popup_description').text(this.product.description);$('.popup_price').text(this.product.price);$('.popup_size').text(this.product.width+' mm wide x '+this.product.height+' mm high');$('.popup_imgfront').attr('src',this.product.imagefront);$('.popup_imgfront').attr('alt',this.product.cardnumber);$('.popup_imgback').attr('src',this.product.imageback);$('.popup_imgback').attr('alt',this.product.cardnumber);$('#requestsample').attr('href','mailto:%73%75%65%40%63%75%73%74%6f%6d%63%61%72%64%73%2e%63%6f%2e%6e%7a?body=Hello,%0a%0aI%20would%20like%20a%20sample%20of%20the%20above%20card%20posted%20to%20me%20at%20the%20following%20address%0a%0a[Insert%20Address]%0a%0aThank%20you!&subject=Sample%20Request%20-%20Please%20post%20me%20a%20sample%20of%20'+this.product.cardnumber);var a=$('input[name="SelectWording"]:checked');if(a.val()=="Standard"){$('.popup_imgback').attr('src',this.product.imageback)}else{$('.popup_imgback').attr('src','/productimages/inside/'+this.product.orientation+'empty.gif')}}};