function openPic(pic, w, h, dl)
{
  window.open('gallery.php?pic=' + pic + (dl?'&dl=1':''), '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=' + Math.max(300, (w-(-100))) +',height=' +h);
  return false;
}

