<SCRIPT>
function makeCookie() {
yourname=prompt("What's your name?","")
document.cookie="username="+yourname+";expires=Sun Dec 31 23:59:59 GMT 2000"
alert(yourname+", your cookie has been created!")
}
function readCookie() {
yourname=document.cookie
if(yourname.length>0) {
yourname=yourname.substring(yourname.indexOf("username=")+9,yourname.length)
alert(yourname+ ", welcome back!")
} else {
alert("Create a cookie first!")
}
}
function clearCookie() {
document.cookie="username=;expires=Sun Apr 16 00:00:01 GMT 2000"
alert("Your cookie has been deleted!")
}
</SCRIPT>