	function showShopcart(shopcartdata, readonly) {

		// Remove all old lines
		$('.shopitemtr').remove();

		if (shopcartdata.totalItemCount == 0) {
			$("#checkout-form-temp").hide();
			$("#link-continue-checkout").hide();
			$("#checkout-form").hide();
			$("#checkout-form-noitems").show();
			return;
		}

		$.each(shopcartdata.items, function(i, item) {
			addShopcartItem(item, readonly, shopcartdata.isMember);
		});

		$('.shopping-items tr.shopitemtr:last').after(addSubTotal(shopcartdata.subTotalPrice, shopcartdata.subTotalPriceDiscount,shopcartdata.isMember));
		$('.shopping-items tr.shopitemtr:last').after(addShippingCost(shopcartdata.shippingCost));
		$('.shopping-items tr.shopitemtr:last').after(addTotal(shopcartdata.totalPrice,shopcartdata.totalPriceDiscount,shopcartdata.isMember));

		if (shopcartdata.isMember != 'true' && shopcartdata.memberDiscount != '0,00') {
			$('#customer-discount-amount').html('&euro;' + shopcartdata.memberDiscount);
			$('#codes-discount').show();
		} else {
			$('#codes-discount').hide();
		}

		// Show the shopcart after loading...
		$("#checkout-form-temp").hide();
		$("#checkout-form").show();
	}

	function showShopcartSmall(shopcartdata) {
		// Remove all old lines
		$('.preview .item').remove();
		// Set total number of items
		$('#itemcounttext').html(shopcartdata.totalItemCountText);
		// Set total price
		$('#totalprice').html('&euro;' + shopcartdata.totalPrice);

		if (shopcartdata.totalItemCount > 0) {
			$(".button-action-small-white-blue").show();
		}
	}

	function addShopcartItemSmall(shopcartItem) {
		$('#shopping-cart .content #shopcartitems').html("<div class=\"item\">" +shopcartItem.description+ " ("+shopcartItem.itemCount+")</div>");
	}


	function addShopcartItem(shopcartItem, readonly, isMember) {
		$('.shopping-items tr:last').after("<tr class=\"shopitemtr\" id=\""+shopcartItem.identifier+"\">" +
			addImage(61, 61, 0, shopcartItem.image, shopcartItem.url) +
			addArticleName(shopcartItem.description, shopcartItem.subdescription,shopcartItem.itemPrice,shopcartItem.itemPriceDiscount,isMember,shopcartItem.url) +
			addQuantity(shopcartItem.itemCount, shopcartItem.maxItems, shopcartItem.identifier, readonly) +
			addDelivery(shopcartItem.deliveryDescription) +
			addSubPriceDiscount(shopcartItem.priceDiscount) +
			addSubPrice(shopcartItem.price) +
			addRemoveItem(shopcartItem.identifier,readonly) +
			"</tr>")
	}

	function addSubTotal(total, totalDiscount, isMember) {
		var strSubTotal = "";
		strSubTotal = strSubTotal + "<tr class=\"shopitemtr\">";
		strSubTotal = strSubTotal + "<td colspan=\"4\" class=\"td-total-description\">Subtotaal</td>";
		strSubTotal = strSubTotal + "<td class=\"td-total-abonnee\">&euro;"+totalDiscount+"</td>";
		strSubTotal = strSubTotal + "<td class=\"td-total\">&euro;"+total+"</td>";
		strSubTotal = strSubTotal + "<td class=\"td-noremove\">&nbsp;</td>";
		strSubTotal = strSubTotal + "</tr>";

		return strSubTotal
	}

  	function addShippingCost(shippingCost) {
		var strShipping = "";
		strShipping = strShipping + "<tr class=\"shopitemtr\">";
		strShipping = strShipping + "<td colspan=\"4\" class=\"td-costs-description\">Verzendkosten</td>";
		strShipping = strShipping + "<td class=\"td-costs-abonnee\">&euro;"+shippingCost+"</td>";
		strShipping = strShipping + "<td class=\"td-costs\">&euro;"+shippingCost+"</td>";
		strShipping = strShipping + "<td class=\"td-noremove\">&nbsp;</td>";
		strShipping = strShipping + "</tr>";

		return strShipping;
  	}

  	function addTotal(total, totalDiscount, isMember) {
		var strTotal = "";
		strTotal = strTotal + "<tr class=\"shopitemtr\">";
		strTotal = strTotal + "<td colspan=\"4\" class=\"td-total-description\">TOTAAL</td>";
		strTotal = strTotal + "<td class=\"td-total-abonnee\">&euro;"+totalDiscount+"</td>";
		strTotal = strTotal + "<td class=\"td-grand-total\">&euro;"+total+"</td>";
		strTotal = strTotal + "<td class=\"td-noremove\">&nbsp;</td>";
		strTotal = strTotal + "</tr>";

		return strTotal;
  	}

	function addImage(width, height, border, url, detailUrl) {
		var strImage = "<td class=\"image\"><a href=\""+detailUrl+"\"><img src=\""+url+"\" border=\""+border+"\" width=\""+width+"\" height=\""+height+"\" /></a></td>";
		return strImage;
	}

	function addArticleName(product, productVariant,itemPrice,itemPriceDiscount,isMember,detailUrl) {
		var strProduct = "<td class=\"item-description\"><a href=\""+detailUrl+"\">"+product+"</a>"+productVariant + "<br/><br/>";

		if (itemPrice == itemPriceDiscount) {
			strProduct = strProduct + "<br /><strong>";
			strProduct = strProduct + "Prijs: &euro;" +itemPrice;
			strProduct = strProduct + "</strong>";
		} else {
			if (isMember == 'true') {
				strProduct = strProduct + "<strong>";
			}
				strProduct = strProduct + "Prijs Abonnee: &euro;" +itemPriceDiscount+ "<br/>";
			if (isMember == 'true') {
				strProduct = strProduct + "</strong>";
			}
			if (isMember  == 'false') {
				strProduct = strProduct + "<strong>";
			}
			strProduct = strProduct + "Prijs Niet-Abonnee: &euro;" +itemPrice;
			if (isMember == 'false') {
				strProduct = strProduct + "</strong>";
			}
		}
		strProduct = strProduct + "</td>";
		return strProduct
	}

	function addQuantity(itemCount, maxItems, identifier, readonly) {
		var strQuantity = "<td class=\"td-deliverable\"><div class=\"field-wrap\">";

		if (!readonly) {
			strQuantity = strQuantity + "<select name=\"quantity\" id=\"quantity\" onchange=\"updateItem('"+identifier+"', this.value);\">";
			for (i=1 ; i<=maxItems; i++) {
				var selected = "";
				if (itemCount == i) {
					selected = "selected=\"selected\"";
				}
				strQuantity = strQuantity + "<option "+selected+" value=\""+i+"\">"+i+"</option>";
			}
			strQuantity = strQuantity + "</select></div></td>";
		} else {
			strQuantity = strQuantity + itemCount + "</div></td>";
		}
		return strQuantity;
	}

	function addDelivery(deliverydescription) {
		var strDelivery = "<td class=\"td-deliverable\">"+deliverydescription+"</td>";
		return strDelivery;
	}

	function addSubPriceDiscount(price) {
		var strPriceDiscount = "<td class=\"td-deliverable-abonnee\">&euro;"+price+"</td>";
		return strPriceDiscount;
	}

	function addSubPrice(price) {
		var strPriceDiscount = "<td class=\"td-deliverable\">&euro;"+price+"</td>";
		return strPriceDiscount;
	}

	function addRemoveItem(identifier, readonly) {
		var strRemoveItem = "";
		if (!readonly) {
			var strRemoveItem = "<td class=\"td-remove\"><a href=\"javascript:removeItem('"+identifier+"');\"><span class=\"tooltip\"><span class=\"tiptext\">Verwijderen</span></span></a></td>";
		}
		return strRemoveItem;
	}