function ecrire_cookie(nom, valeur, expires) {
  document.cookie=nom+"="+escape(valeur)+
  ((expires==null) ? "" : ("; expires="+expires.toGMTString()));
}

function arguments_cookie(offset){
  var endstr=document.cookie.indexOf (";", offset);
  if (endstr==-1) endstr=document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr)); 
}

function lire_cookie(nom) {
  var arg=nom+"=";
  var alen=arg.length;
  var clen=document.cookie.length;
  var i=0;
  while (i<clen){
    var j=i+alen;
    if (document.cookie.substring(i, j)==arg)
       return arguments_cookie(j);
    i=document.cookie.indexOf(" ",i)+1;
    if (i==0) break;
  }
  return null; 
}
function openwindows()
{
    window.open("voeux.html", "",
		"width=800,height=600,scrollbars=0,left=" +
		((screen.width - 800)/2) + ",top=" + ((screen.height - 600)/2) )
}
  date=new Date;
  date.setMonth(date.getMonth()+1); // expire dans un mois
  
  function test() {
  voeux = lire_cookie("voeux");
  if (voeux != '1') { openwindows(); ecrire_cookie("voeux", "1", date);}
  }