This should work. Change NameOfCookie to the name of the cookie with the name. <script>
function getCookie(NameOfCookie)
{
if(document.cookie.length > 0)
{
begin = document.cookie.indexOf(NameOfCookie+"=");
if(begin!= -1)
{
begin += NameOfCookie.length + 1;
end = document.cookie.indexOf(";",begin);
if(end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin,end));
}
}
return null;
}
function delCookie(NameOfCookie)
{
if(getCookie(NameOfCookie)){
document.cookie = NameOfCookie +"=" +
";expires= Thu, 01-Jan-70 00:00:01 GMT";
}
}
</script>
Document.write("If you are not " + getCookie() + " then <a href='javascript:delCookie()'>click here</a>");
My js cookie ablities are quite rusty. You can find the original tutorial I changed here:
[scriptbreaker.com...]