<!--
// Copyright 1999 - 2002 by Ray Stott, Pop-up Windows Script ver 2.0
// OK to use if this copyright is included
// Script is available at http://www.crays.com/jsc          
//
// Modified by E. Zander 16DEC03
// Modifications included stripping down the functions/script.
// It is less useful the way I stripped it down but smaller and simpler.
//
// Don't forget to put the  onUnload="closePopWin()" in your body statement!!!

// Thanks Ray! :-)

var popWin = null    // use this when referring to pop-up window
var winCount = 0
var winName = "popWin"

function openPopWin(winURL, winWidth, winHeight){
  var d_winLeft = 40  // default, pixels from screen left to window left
  var d_winTop = 40   // default, pixels from screen top to window top
  winName = "popWin" + winCount++ //unique name for each pop-up window
  closePopWin()           // close any previously opened pop-up window

  winFeatures = ",toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no"
  popWin = window.open(winURL, winName, "width=" + winWidth 
           + ",height=" + winHeight + ",screenX=" + d_winLeft + ",screenY=" + d_winTop + winFeatures)
  }

function closePopWin(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popWin != null && !popWin.closed) popWin.close() 
  }

//-->