function cart(A){this.totalItems=0;this.totalPrice=0;this.items=new Array();this.userEmail=A;this.ItemColumns=["Image","Name","Price","Options","Quantity","Total"];this.initialize=function(){if(!readCookie("simpleCart")){this.totalItems=0;this.totalPrice=0}else{data=readCookie("simpleCart").split("&");this.totalItems=data[0]*1;this.totalPrice=data[1]*1;for(x=2;x<(data.length);x++){newItem=new item();itemData=data[x].split(",");i=0;for(i=0;i'}}if(this.ItemColumns[C]=="Name"){tempCell.innerHTML=tempItem.getValue("name")}else{if(this.ItemColumns[C]=="Price"){tempCell.innerHTML=this.returnFormattedPrice(tempItem.getValue("price"))}else{if(this.ItemColumns[C]=="Options"&&this.options()){tempCell.innerHTML=tempItem.optionList()}else{if(this.ItemColumns[C]=="Quantity"){tempCell.innerHTML=''}else{if(this.ItemColumns[C]=="Total"){tempCell.innerHTML=this.returnFormattedPrice(tempItem.getValue("quantity")*tempItem.getValue("price"))}}}}}newRow.appendChild(tempCell)}newRow.className="itemContainer";cartTable.appendChild(newRow)}newRow=document.createElement("div");tempCell=document.createElement("div");tempCell.innerHTML=String(this.totalItems);tempCell.className="totalItems";newRow.appendChild(tempCell);tempCell=document.createElement("div");tempCell.innerHTML=this.returnTotalPrice();tempCell.className="totalPrice";newRow.appendChild(tempCell);newRow.className="totalRow";cartTable.appendChild(newRow)}return false};this.returnTotalPrice=function(){return this.returnFormattedPrice(this.totalPrice)};this.returnFormattedPrice=function(B){temp=Math.round(B*100);change=String(temp%100);if(change.length==0){change="00"}else{if(change.length==1){change="0"+change}}temp=String(Math.floor(temp/100));return"$"+temp+"."+change};this.updateQuantity=function(){newItem=new item();x=0;for(x=0;x