function doPopup(imagePath, theWidth, theHeight, theScrollbars) {
 theScrollbars = 'no';
 if (theWidth > (screen.width-20)) {
  theWidth = screen.width-20;
  theScrollbars = 'yes';
 }
 if (theHeight > (screen.height-20)) {
  theHeight = screen.height-20;
  theScrollbars = 'yes';
 }
 theFeatures = 'top=0,left=0,width=' + theWidth + ',height=' + theHeight + ',scrollbars=' + theScrollbars;
 popup=window.open(imagePath,'popup',theFeatures);
 popup.focus();
 popup.resizeTo(theWidth,theHeight);
 return;
}
