/* These cookie functions were adapted from public domain code that Steven Estrella of Temple University states was created in the mid-1990's by Bill Dortch of hIdaho designs. IMPORTANT NOTES: These modified routines set relatively permanent cookies that expire at a fixed date of Dec 31, 2999 If you copy this code, make sure that you do the File-Save As when looking at the source code in Notepad. Don't do it with the browser. Also, make sure that you save it as cookietools.js, not cookietools.txt or cookietools.js.txt or cookietoolsjs[1].txt or anything else */ function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset) if (endstr == -1) endstr = document.cookie.length return unescape(document.cookie.substring(offset, endstr)) } function AddCookie(name, value) { expires=new Date() expires.setTime(Date.parse("Dec 31, 2999 18:59:59")) document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() } function GetCookie(name) { var arg = name + "=" var alen = arg.length var clen = document.cookie.length var i = 0 while (i < clen) { var j = i + alen if (document.cookie.substring(i,j ) == arg) return getCookieVal (j) i = document.cookie.indexOf(" ", i) + 1 if (i == 0) break } return null } function DeleteCookie(name) { var exp = new Date() exp.setTime (exp.getTime() - 1) var cval = GetCookie (name) document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString() }