function setCookie (cookieName, cookieValue, nDays) {
  var today   = new Date();
  var expire  = new Date();
  if (nDays == null || nDays == 0) nDays = 1;
  expire.setTime(today.getTime() + 3600000 * 24 * nDays);
  document.cookie = cookieName + "=" + escape(cookieValue)
                  + ";expires=" + expire.toGMTString();
}


function pop(img, w, h) {
  p = escape(img.src.replace(/_[0-9]+\./,"_large."));
  pic = window.open('/zoom.php?pic='+p, 'pic', 'width='+(w+40)+', height='+(h+55)+', resizable=1, scrollbars=1');
  pic.document.focus();
}

function popup (uri, w, h) {
  var win = window.open(uri, 'win', 'width=' + w + ',height=' + h + ', scrollbars=1');
  win.document.focus();
}


function writeMlx() {
  document.write ('<a href="javascript:mlx();">inf'
                + 'o&#6'
                + '4;candy'
                + 'froggie.c'
                + 'om</a>');
}

function mlx() {
  window.location.href = 'mai'
                       + 'lt'
                       + 'o:'
                       + 'in'
                       + 'fo'
                       + '@'
                       + 'candy'
                       + 'froggie'
                       + '.c'
                       + 'om';
}


function writeYear() {
  document.write (new Date().getFullYear());
}
