your SetCookie isn't completely correct.
function SetCookie(total1, inVal)
{
var inVal = form.amount.value
document.cookie = total1 + "=" + escape(newValue)
}
you're passing in inVal but then having another local variable called inVal. Get rid of inVal in your parameter list.
also, you're setting your cookie with total1 and newValue. where is newValue coming from? what's the point of inVal if you don't use it?
When you set your cookie onSubmit you didn't pass it a cookie name. you'll want that to retrieve the cookie later.
Here's some code for retrieving your cookie..
Code:
function getCookie(cookie_name) {
if(document.cookie){
index = document.cookie.indexOf(cookie_name);
if (index != -1){
namestart = (document.cookie.indexOf("=", index) + 1);
nameend = document.cookie.indexOf(";", index);
if (nameend == -1) {
nameend = document.cookie.length;
}
YouWrote = document.cookie.substring(namestart, nameend);
return YouWrote;
}
}
}