
	var i = 0;
	var c = 0;
	if(GetCookie('cart') !=null){

		
		var cartstring = GetCookie("cart");
		var cartobj = new String(cartstring);
		var items = cartstring.split("&");
		var total = new Number();
		for(i = 1; i<items.length; i=i+4){
			total =total + (parseFloat(items[i])*items[i+1]);
		}
				
		
		total = format(total,2);
		

		document.write("<table border = '0'><tr>");
		document.write(" <td width = '129' valign = 'top'><a HREF= 'cart_display.asp'><img src = 'checkout.jpg'></a></td></tr>");


		for(i = 0; i< items.length; i=i+4){
			c = c + 1
			
			document.write("<td width = '129'><img src ='pimages/"+items[i+3]+".jpg'  width = '26'><br>"+items[i+2]+" X <font color = 'red'>$"+items[i+1]+"</font><br><a href='detail.asp?query="+items[i]+"' class = product>"+items[i]+"</a>");
			document.write("<a href = 'javascript:Remove("+items[i]+","+i+");window.location.reload()'><img src ='images/del.jpg' alt = 'Remove Item'></a><br></td>");

			if(c==1)document.write("</tr><tr>");		
			if(c==1)c=0;		

			
		}

		document.write("<tr><td width = '129'><font>SubTotal $"+total+"</td>");

		document.write("</tr></table>");
		document.write("<a href = 'javascript:DeleteCart();window.location.reload()'><img src = 'empty.gif'></a>");
		

	}
	else document.write("Your cart is empty<br></TD></TR></table>")

