// JavaScript Document
// screenshot.js
// functions for pop-up screenshots

var sPOPUP = "popup";
var oPopup = null;

function showPopupImage(sImage, iWidth, iHeight) {
  //initialize parameters
  if (sImage == null) { return -1; }
  if (iWidth < 1) { return -1; }
  if (iHeight < 1) { return -1; }
  
  //close previous window if open
  if (oPopup != null) {
    oPopup.close();
	oPopup = null;
  }
  
  //open new window
  oPopup = window.open(sImage, sPOPUP, "width=" + iWidth + ",height=" + iHeight + ",resizable=yes");
  
  return 0;
}

function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}
