var pic1 = new Image()

function openPic(pts) {
  pic = pts
  pic1.src = pts
  timer = setTimeout("picLoaded(pic)", 1000); 
} 

function picLoaded(pic)  {   
  xposition=0; yposition=0;
  var width = 200
  var height = 200
  var center = 1
  var winName = "image"
    
  width = pic1.width + 30
  height = pic1.height + 30
    
  if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
     xposition = (screen.width - width) / 2;
     yposition = (screen.height - height) / 2;
  }
    
  var args = "width=" + width + ","
  + "height=" + height + ","
  + "location=0,"
  + "menubar=0,"
  + "resizable=1,"
  + "scrollbars=0,"
  + "status=0,"
  + "titlebar=0,"
  + "toolbar=0,"
  + "hotkeys=0,"
  + "screenx=" + xposition + ","  //NN Only
  + "screeny=" + yposition + ","  //NN Only
  + "left=" + xposition + ","     //IE Only
  + "top=" + yposition;           //IE Only

  window.open(pic, winName, args);
}

