function showItems() {
                var tablerowcolor = '#EBECED';
                index = document.cookie.indexOf("RCAcarrinho");
		countbegin = (document.cookie.indexOf("=", index) + 1);
        	countend = document.cookie.indexOf(";", index);
        	if (countend == -1) {
            		countend = document.cookie.length;
        	}
		fulllist = document.cookie.substring(countbegin, countend);
		totprice = 0;
		document.writeln('<FORM NAME="updateform">');
		document.writeln('<div align="left">');
		document.writeln('<TABLE WIDTH=750 BORDER=0 CELLPADDING="3">');
document.writeln('<TR BGCOLOR="#F9F9F9"><TD div align=center><font face=arial size=1 color=#696969 style=text-decoration:none;>PRODUTO</FONT></b></TD><TD align="center"><font face=arial size=1 color=#696969 style=text-decoration:none;>QUANTIDADE</FONT></b></TD><TD align="center"><font face=arial size=1 color=#696969 style=text-decoration:none;>VALOR POR UNIDADE</TD><td align="center"><font face=arial size=1 color=#696969 style=text-decoration:none;>VALOR TOTAL</TD><TD>&nbsp;</TD></TR>');
// Nun die horizontale Linie:
document.writeln('<TR BGCOLOR="#ffffff"><TD colspan="0"></TD></TR>');

		itemlist = 0;
		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[') {
				itemstart = i+1;
				thisitem = 1;
			} else if (fulllist.substring(i,i+1) == ']') {
				itemend = i;
				thequantity = fulllist.substring(itemstart, itemend);
				itemtotal = 0;
				itemtotal = (eval(theprice*thequantity));
				temptotal = itemtotal * 100;
				totprice = totprice + itemtotal;
				itemlist=itemlist+1;
				document.write('<tr valign="top"BGCOLOR="'+tablerowcolor+'"><td><font face=arial size=1 color=#696969 style=text-decoration:none;>'+theitem+'</FONT></td>');

				document.write('<td valign="top" align="right"><INPUT TYPE=TEXT NAME="quant'+itemlist+'" VALUE="'+thequantity+'" SIZE=1 style="font-family: verdana, arial, tahoma; font-size: 8 pt; color: #006699; font-weight: bold; border-style: inset; border-width: 2"></td><td valign="top" align="right"><FONT FACE="Verdana,Arial,Helvetica" SIZE=-1>'+theprice+'</FONT></td><td valign="top" align="right"><FONT FACE="Verdana,Arial,Helvetica" SIZE=-1>'+top.menu.alterError(itemtotal)+'</FONT></td><td  align="center" valign="top"><a href="javascript:removeItem('+itemlist+')"><font face=arial size=1 color=#696969 style=text-decoration:none; title="remover produto da lista">{ remover }</a>&nbsp;<a href="javascript:amendItem('+itemlist+',document.updateform.quant'+itemlist+'.value)"><font face=arial size=1 color=#696969 style=text-decoration:none; title="atualizar a quantidade">{ atualizar }</a></td></tr>');

  									if (tablerowcolor == '#ffffff') {
                                  tablerowcolor = "#EBECED";
                                } else {
                                  tablerowcolor = "#ffffff";
                                }




			} else if (fulllist.substring(i,i+1) == '|') {
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) theprice = fulllist.substring(itemstart, i);
				thisitem++;
				itemstart=i+1;
			}



		}

                document.writeln('<TR BGCOLOR="ffffff"><TD colspan="0"></TD></TR>');
		document.writeln('<tr BGCOLOR="#f9f9f9"><td colspan=3><font face=arial size=1 color=#696969 style=text-decoration:none;>valor total das compras</td><td align=right><font face=arial size=1 color=#696969 style=text-decoration:none;>R$ '+top.menu.alterError(totprice)+'</FONT></b></td><td>&nbsp;</td></tr>');
		document.writeln('</TABLE><cr>');
		document.writeln('</div>');
		document.writeln('</FORM>');
	}

	function amendItem(itemno, newquant) {
		newItemList = null;
		itemlist = 0;
		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[') {
				thisitem = 1;
				itemstart = i+1;
				fullstart = i+1;
			} else if (fulllist.substring(i,i+1) == ']') {
				itemend = i;
				itemlist=itemlist+1;
				if (itemlist != itemno) {
					newItemList = newItemList+'['+fulllist.substring(fullstart, itemend)+']';
				} else {
					newItemList = newItemList + '['+theitem+'|'+theprice+'|'+newquant+']';
				}
			} else if (fulllist.substring(i,i+1) == '|') {
				if (thisitem==1) theitem = fulllist.substring(itemstart, i);
				if (thisitem==2) theprice = fulllist.substring(itemstart, i);
				thisitem++;
				itemstart=i+1;
			}
		}
		index = document.cookie.indexOf("RCAcarrinho");
		document.cookie="RCAcarrinho="+newItemList;
		self.location = "carrinho.html";

	}

	function removeItem(itemno) {
		newItemList = null;
		itemlist = 0;
		for (var i = 0; i <= fulllist.length; i++) {
			if (fulllist.substring(i,i+1) == '[') {
				itemstart = i+1;
			} else if (fulllist.substring(i,i+1) == ']') {
				itemend = i;
				theitem = fulllist.substring(itemstart, itemend);
				itemlist=itemlist+1;
				if (itemlist != itemno) {
					newItemList = newItemList+'['+fulllist.substring(itemstart, itemend)+']';
				}
			}
		}
		index = document.cookie.indexOf("RCAcarrinho");
		document.cookie="RCAcarrinho="+newItemList;
		self.location = "carrinho.html";
	}

	// clearBasket() - removes all items from the basket
	function clearBasket() {
		if (confirm('Tem certeza que deseja limpar o seu carrinho de compras?')) {
			index = document.cookie.indexOf("RCAcarrinho");
			document.cookie="RCAcarrinho=.";
			self.location = "carrinho.html";
		}
	}