// part of the code in this class is not written by me // Special thanks to WebCoder.com // http://www.webcoder.com // Heinle's getCookie function function getCookie(name) { var cname = name + "="; var dc = document.cookie; if (dc.length > 0) { begin = dc.indexOf(cname); if (begin != -1) { begin += cname.length; end = dc.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin, end)); } else { return null }; } else return null; } // Dorcht's setCookie function function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } // Dorcht's delCookie function function delCookie (name,path,domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; }; } // Chungsoft Cookies JavaScript Class // only below written by Chan Sze Chung, Chungsoft, chungsoft@iname.com // Last revised: Nov 29, 1997 function setSiteCookie(name,value) { // webmaster may personalize the Cookie setting // set cookie to expire 1000 days later var expiration = new Date(); expiration.setDate(expiration.getDate() + 1000); var secure = true, nonsecure = false; // $CSSTEP$ //////////////////////////////////////////////////// // ***** S T E P O N E ***** // If you don't know what to do here, go to the next step // Change the following variables for your website // This Interactive Guestbook saves client's input data and reinput for // the client when next time they sign up the guestbook. //////////////////////////////////////////////////////////////// path = "/~example"; // example only, pls change it with your page's path (no filenames) domain = "www.domainname.com"; // example only, pls change it with your page's domain name setCookie(name, value, expiration, path, domain, nonsecure); } function CookieCounter(name) { var buffer = getCookie(name); if (!(buffer)) buffer = 0; setSiteCookie(name, ++buffer); } // -->