copy the bakecookie and eatcookie functions. When you want to store a cookie, you use:
the name is just like a variable name, given to the data you are make a cookie of. that will overwrite any previous with the same name (aka editing preferences)
to read the cookie, use
variable = EatCookie('name')
name is the name of the value you want to retrieve, and variable is where to retrieve the restored value.
Hope that this helps you (note that the two functions musts be copied, it might be three functions)