function openWindow1() { 
popupWin = window.open('spotlight.html', 'remote', 'width=800,height=600,left=0,top=0,scrollbars=yes') 
 }
 
popUpWin = "nowin";
function openWin(winName, file, width, height) {
  var h=height;
  var w=width;
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status,toolbar,menubar,location';
  popUpWin = window.open( file , winName, winprops );
  popUpWin.focus();
}

function popWin(name, file, width, height, status, resizable, scrollable) {
  var h=height;
  var w=width;
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status='+status+',resizable='+resizable+',scrollbars='+scrollable;
  popUpWin = window.open( file , name, winprops );
  popUpWin.focus();
}

function closePopUp() {
  if( popUpWin != "nowin" )
    if( !popUpWin.closed )
      popUpWin.close();
}