
<!-- REQUEST ID: TIME=1223377337699:NODE=c2a4404:THREAD=50 -->


 (function(){ function tagWrap(className, innerContent, tagName) { tagName = tagName || 'div'; return '<'+tagName+' class="'+className+'">'+innerContent+'</'+tagName+'>'; } function getSwitchOutput(jsonData) { var output = ''; for (var contentName in jsonData) { if (contentName != 'productID') { var data = jsonData[contentName], piece = ''; switch (contentName) { case 'buyLink' : piece = tagWrap('dr_siteButton', '<a href="'+data.href+'">'+data.text+'</a>'); break; case 'price' : productPrice = ''; if (data.discounted) { productPrice += tagWrap('dr_regularPriceLabel', "Regular Price:", 'span'); var discPrice = '<span style="text-decoration:line-through">'; if (data.displayPriceEnabled) { discPrice += data.displayPriceEnabled.priceListPrice; if (data.displayPriceWithVatEnabled) { discPrice += '/'; } } if (data.displayPriceWithVatEnabled) { discPrice += data.displayPriceWithVatEnabled.priceListPriceWithVat; } productPrice += tagWrap('dr_strikePrice', discPrice + '</span>', 'span'); if (data.displayPriceWithVatEnabled) { productPrice += tagWrap('lightgray', "incl. VAT", 'span'); } productPrice += '<br/>' + tagWrap('dr_promoPriceLabel', "Promo Price:", 'span'); } var actualPrice = ''; if (data.displayPriceEnabled) { actualPrice += data.displayPriceEnabled.yourPrice; if (data.displayPriceWithVatEnabled) { actualPrice += '/'; } } if (data.displayPriceWithVatEnabled) { actualPrice += data.displayPriceWithVatEnabled.yourPriceWithVat; } productPrice += tagWrap('dr_actualPrice', actualPrice, 'span'); if (data.displayPriceWithVatEnabled) { productPrice += tagWrap('lightgray', "incl. VAT", 'span'); } piece = tagWrap('dr_productPrice', productPrice); break; default : piece = '<!--'+data+'-->'; } output += piece; } } return output; } var jsonContent = [{error:"Product data is unavailable. Please accept our apologies for this inconvenience."}]; for (var i=0;i<jsonContent.length;i++) { if (jsonContent[i].error) { document.write(tagWrap('dr_error', jsonContent[i].error, 'span')); } else { document.write(tagWrap('dr_productInfoProduct', getSwitchOutput(jsonContent[i]))); } } })(); 


