function ShowPicture(picid) {
 LinkWindow = window.open('showpicture.php?PicID='+picid,'showpicture', 'width=50,height=50,toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=1')
}

function adjust_popup() {
 var w, h, fixedW, fixedH, diffW, diffH;
 if (document.all) {
  fixedW = document.body.clientWidth;
  fixedH = document.body.clientHeight;
  window.resizeTo(fixedW, fixedH);
  diffW = fixedW - document.body.clientWidth;
  diffH = fixedH - document.body.clientHeight;
 } else {
  fixedW = window.innerWidth;
  fixedH = window.innerHeight;
  window.resizeTo(fixedW, fixedH);
  diffW = fixedW - window.innerWidth;
  diffH = fixedH - window.innerHeight;
 }
 w = fixedW + diffW;
 h = fixedH + diffH;
 if (h >= screen.availHeight) w += 16;
 if (w >= screen.availWidth)  h += 16;
 w = Math.min(w,screen.availWidth);
 h = Math.min(h,screen.availHeight);
 window.resizeTo(w,h);
 window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}