



<!--hide



	// alterError - fixes a rounding bug in Netscape 2



	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);



	}







	// showItems () - creates a table of items in the basket and



	// creates the start of a form which sets information for



	// basket items.



	function showItems() {



		index = document.cookie.indexOf("TheBasket");



		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 method="POST" action="senderformat5.cfm" onSubmit="return validateForm(this)">');

		



		document.writeln('<TABLE BORDER=2 bgcolor="#E4E4E4">');







		document.writeln('<TR><TD><b><FONT SIZE=2 FACE="ARIAL,HELEVTICA" color=#FF6666>Item</font></b></TD><TD><b><FONT SIZE=2 FACE="ARIAL,HELEVTICA" color=#FF6666>Quantity</font></b></TD><TD><b><FONT SIZE=2 FACE="ARIAL,HELEVTICA" color=#FF6666>Cost Each</font></b></TD><td><b><font FACE="ARIAL,HELEVTICA" size=2 color=#FF6666>Total Cost</font></b></td></TR>');



		itemlist = 0;



		for (var i = 0; i <= fulllist.length; i++) {



			if (fulllist.substring(i,i+1) == '[') {



				thisitem = 1;



				itemstart = i+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><td>'+theitem+'</td>');



				document.writeln('<td align=right>'+thequantity+'</td><td align=right>'+theprice+'</td><td align=right>'+alterError(itemtotal)+'</td></tr>');


<!--document.writeln('<INPUT TYPE="hidden" NAME="item'+itemlist+'" VALUE="'+theitem+'" SIZE="40">');-->

				document.writeln('<INPUT TYPE="hidden" NAME="item" VALUE="'+theitem+'" SIZE="40">');



				document.writeln('<INPUT TYPE="hidden" NAME="quantity" VALUE="'+thequantity+'" SIZE="40">');



				document.writeln('<INPUT TYPE="hidden" NAME="priceeach" VALUE="'+theprice+'" SIZE="40">');



				document.writeln('<INPUT TYPE="hidden" NAME="total cost'+itemlist+'" VALUE="'+alterError(itemtotal)+'" SIZE="40">');



			} 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><td colspan=3><b><FONT SIZE=2 COLOR="666699" FACE="ARIAL,HELEVTICA">**Total</FONT></b></td><td align=right>'+alterError(totprice)+'</td></tr>');



		document.writeln('<INPUT TYPE="hidden" NAME="GoodsTotal" VALUE="'+alterError(totprice)+'" SIZE="40">');



		document.writeln('</TABLE>');







	}



<!-- done hiding from old browsers 


// -->



