function newWin(picture) { 
//--- open a new window
  var myImage = new Image();
  myImage.src = picture;
  var maxWidth  = screen.availWidth  - 40;
  var maxHeight = screen.availHeight - 60;
  var myWidth  = myImage.width  + 37;
  var myHeight = myImage.height + 37;
  if (myHeight > maxHeight) {
      myHeight = maxHeight};
  if (myWidth> maxWidth) {
      myWidth = maxWidth};
  var myWidth  = screen.availWidth  - 40;
  var myHeight = screen.availHeight - 60;
  oNavWin = window.open([picture], "pictureWindow", "top=20,left=20,height="+myHeight+",width="+myWidth+",resizable,scrollbars");
  oNavWin.focus();
}
 
