js-cookiefunctions.

Textarea's  for  YOUR  test-values.
(
 
 ,  ,   )
(
 
 )  
(
 
 )    
Results.

function createCookie( name, value, daysalive )
{ var expires = "", days=parseInt(daysalive);
   if (days>0)
  { var date = new Date();
    date.setTime( date.getTime() + (days*24*60*60*1000) );
    var expires = "; expires="+date.toGMTString();
  }
  document.cookie = name+"="+value+expires+"; path=/";
}