function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
};

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
   if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
};
 
aantal = getCookie("popuplastminute");
aantal++;
writeCookie("popuplastminute",aantal,100000);

function popupOpen() {
if (aantal < 1000) {
leftscreen = 1500;
topscreen = 800;

//window.open('lastminute/lastminute.php','','height=350,width=220,top='+topscreen+',left='+leftscreen+',resize=no');
};
};

