function getContCookie(key) { cokAllVal = " " + document.cookie + ";"; fst = last = 0; len = cokAllVal.length; while (fst < len) { last = cokAllVal.indexOf(";", fst); strVal = cokAllVal.substring(fst + 1, last); eqLine = strVal.indexOf("="); if (strVal.substring(0, eqLine) == key) { return(unescape(strVal.substring(eqLine + 1, last - fst - 1))); } fst = last + 1; } return(""); } function delContCookie(key) { thisDelDate = new Date(); thisDelDate.setYear(thisDelDate.getYear()-1); delTmp = key+"=;"; delTmp += "expires="+thisDelDate.toGMTString() + "; path=/"; document.cookie = delTmp; } function setContCookie(key, val) { thisDate = new Date(); thisDate.setDate(thisDate.getDate()+1); tmp = key + "=" + encodeURI(val) + "; "; tmp += "expires="+thisDate.toGMTString() + "; path=/"; document.cookie = tmp; }