// Written by: Bill Dortch, hIdaho Design <bdortch@netw.com>
// The following functions are released to the public domain.
function getCookieVal (offset) {
         var endstr = document.cookie.indexOf (";", offset);
            if (endstr == -1)
            endstr = document.cookie.length;
         return unescape(document.cookie.substring(offset, endstr));
         }

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;
     }
// End cookie code

function prefill () {
 var namevalue = GetCookie('postername');
 var emailvalue = GetCookie('posteremail');
 if (namevalue) { if (document.msg.yourname) { document.msg.yourname.value = namevalue; } }
 if (emailvalue) { if (document.msg.email) { document.msg.email.value = emailvalue; } }
}

