<!---------- JavaScript
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);
}

//function producComp() {
function producComp(textProduc,textCantid,textPrix,textImport,textSubtot,textValue) {
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;
//bgcolor="#E1FFE1"
document.writeln('<center><table border="0" cellspacing="0" width="500" class="descrip_8_b">');
document.writeln('<tr><td style="background-color:#E1FFE1;" class="menu_tex_s" width="345"><b>'+textProduc+'</b></td><td  style="background-color:#E1FFE1;" class="menu_tex_s"  width="57" align="right"><b>'+textCantid+'</b></td><td  style="background-color:#E1FFE1;" class="menu_tex_s" width="66" align="right"><b>'+textPrix+'</b></td><td  style="background-color:#E1FFE1;" class="menu_tex_s" width="83" align="right"><b>'+textImport+'</b></tr>');
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;
			thequantity = fulllist.substring(itemstart, itemend);
			itemtotal = 0;
			itemtotal = (eval(theprice*thequantity));
			temptotal = itemtotal * 100;
			var tax = itemtotal / 100 * (0 - 0);
   			tax = Math.floor(tax * 100)/100
			totprice = totprice + itemtotal + tax;
			itemlist=itemlist+1;
			document.writeln('<tr><td class="text_9" align="left">'+theitem+'</td><td class="text_9" align="center">'+thequantity+'</td><td class="text_9" align="right">'+cadena(theprice)+'</td><td class="text_9" align="right">'+cadena(alterError(itemtotal))+'</td></tr>');
		} else if (fulllist.substring(i,i+1) == ',') {
			theitem = fulllist.substring(itemstart, i);
			itemstart = i+1;
		} else if (fulllist.substring(i,i+1) == '#') {
			theprice = alterError(fulllist.substring(itemstart, i)*1);
			itemstart = i+1;
		}
	}
//document.writeln('<tr><td class="text_9" align="right" colspan=3><b>'+textSubtot+'</b>&nbsp;&nbsp;</td><td class="text_9" align="right"><b>'+cadena(alterError(totprice))+'</b></td></tr>');
																																							document.writeln('</table></center>');
}

function ImportComp() {
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;
	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;
			thequantity = fulllist.substring(itemstart, itemend);
			itemtotal = 0;
			itemtotal = (eval(theprice*thequantity));
			temptotal = itemtotal * 100;
			var tax = itemtotal / 100 * (0 - 0);
 			tax = Math.floor(tax * 100)/100
			totprice = totprice + itemtotal + tax;
		} else if (fulllist.substring(i,i+1) == ',') {
			theitem = fulllist.substring(itemstart, i);
			itemstart = i+1;
		} else if (fulllist.substring(i,i+1) == '#') {
			theprice = alterError(fulllist.substring(itemstart, i)*1);
			itemstart = i+1;
		}
	}
return (alterError(totprice))
}
// JavaScript fin ---------->