title: create a cookie with javascript in greasemonkey
body: <p>i'm trying to create a cookie with greasemonkey in order to stop a window from popping up (after the windows pops up a cookie is created the the window won't popup to many times...
  this is the code</p>
  
  <pre><code>function setCookie(c_name, value, expiredays) {
      var exdate = new Date();
      exdate.setDate(exdate.getDate()+expiredays);
      document.cookie = c_name + "=" + escape(value) + ((expiredays==null) ?
          "" :
          ";expires="+exdate.toUTCString());
  }
  
  var cookie_names = [
      'showDrushimPopUnderUserClick',
      'showDrushimPopUnder308'
  ];
  
  for (var i in cookie_names) {
      setCookie(cookie_names[i], 1, 0);
  }
  </code></pre>
  
  <p>but no cookie is been created....</p>