Programming javascript cookies
check if there are active cookies   promoter.htm   jolly.htm
<Script language=JavaScript>
<!-- Click this link ...and in 10 seconds time read the results here
function SetCookie(name, value, expiredays)
{var ExpireDate = new Date();
ExpireDate.setTime(ExpireDate.getTime()+(expiredays * 24 * 3600 * 1000)); document.cookie=name+"="+escape(value)+((expiredays==null)?"": "; expires="+ExpireDate.toGMTString());}
//-->
</Script>

<a href=javascript:SetCookie('id','Questo_Id',1/24/60/6)>SetCookie</a>
Resuming Syntax & Notes :
1) No Quotes here  ...1/24/60/6 ... see the link above
2) Dividing by 6 the last fraction ( minutes ) we set the cookie life to 10 seconds , by passing the above arguments , when calling the function by link , as it is done herein.
3) The Cookie-file may be expired or by-program-deleted and so disactivated , but still phisically-persisting into the Client's folder C:\WINDOWS\Cookies ( ... as in Windows98 SE  for example ) it depends by the Browser Settings & Type & Version.
. . . . . . . so use the function ( check if there are active cookies ) above to test results of your programming !