if not IsObject(session("cart")) then
Set session("cart")=CreateObject("Scripting.Dictionary")
end if
Set cart=session("cart")
bookid=request("bookid")
dim counts(1)
counts(0)=request("counts")
if request("bookid")<>"" then
if cart.Exists(bookid) then
cart.Remove(bookid)
end if
cart.add bookid,counts
end if
keys=cart.keys
items=cart.items
set session("cart")=cart
%>