Remembering information across different pages with JavaScript Cookies Example 2- Page 3

Remember 2 cookies across 3 pages: Remember several pages later what username you entered and _which_ image you clicked on the first page - 30 and 20 second expiry

Cookie remembering the user's name is named "theusersname" and expires in 30 seconds.
Cookie remembering which image was clicked last is named "whichimg" and expires in 20 seconds.

The cookie is checked when the page loads.
The page alerts "You touched it on that other page, and now you are here!" if it is all working successfully.
The page alerts "ERROR" if the image has not been touched (or if the cookie has expired).