function doClick(imName,img_url,imWidth,imHeight,imScroll) {
  var maxWinWidth  = screen.width -150;
  var maxWinHeight = screen.height-150;
  var winWidth  = 0;
  var winHeight = 0;
  var imageWidth = imWidth;
  var imageHeight = imHeight;
  var imageScroll = imScroll;
  if ((screen.width < 874) && (imWidth > 650)) imageScroll = "yes";
  if ((screen.height < 618) && (imHeight > 450)) imageScroll = "yes";
  winWidth  = (imWidth  < maxWinWidth)  ? imWidth  : maxWinWidth;
  winHeight = (imHeight < maxWinHeight) ? imHeight : maxWinHeight;
  var LeftPosition = (screen.width)  ? (screen.width -winWidth )/2 : 0;
  var TopPosition  = (screen.height) ? (screen.height-winHeight)/2 : 0;
  if (imageScroll == "yes") winWidth = winWidth * 1+20;
  var pWin = window.open("showpic.html?"+img_url+"&"+imageWidth+"&"+imageHeight+"&"+imName,"","width="+winWidth+",height="+winHeight+",left="+LeftPosition+",top="+TopPosition+",menubar=no,toolbar=no,statusbar=no,scrollbars="+imageScroll);
 }