function alterError(value) {
		if (value<=0.99) {
			newPounds = '0';
		} else {
			newPounds = parseInt(value);
		}
		newPence = parseInt((value+.0008 - newPounds)* 100);
		if (eval(newPence) <= 9) newPence='0'+newPence;
		newString = newPounds + '.' + newPence;
		return (newString);
	}

	//  add item to the shoppingbasket

        function addItem(newItem, newPrice, newWeight, newMaat, newOpt, newKleur, newQuantity, newNumber, newImg) {
		if (newQuantity >= 1000) {
			rc = alert('<?php echo $txt_wrong_quantity ?>');
		} else {
                if (newQuantity >= 0) {
				window.alert('Het product is aan uw winkelwagen toegevoegd!');
                        index = document.cookie.indexOf("TheBasket");
                        countbegin = (document.cookie.indexOf("=", index) + 1);
                        countend = document.cookie.indexOf(";", index);
                        if (countend == -1) {
                        countend = document.cookie.length;
                        }
		                document.cookie="TheBasket="+document.cookie.substring(countbegin, countend) +"["+newItem+"|"+newPrice+"|"+newNumber+"|"+newWeight+"|"+newMaat+"|"+newOpt+"|"+newKleur+"|"+newImg+"|"+newQuantity+"]";
			}
		}
	}

	function resetShoppingBasket() {
		index = document.cookie.indexOf("TheBasket");
		document.cookie="TheBasket=.";
	}