var newWindow = null;

function openWindow(contentURL,windowName,windowHeight,windowWidth){
  //if (newWindow != null){       |
  //  newWindow.close();          | REMOVED BECAUSE OF PROBLEMS ON MACS
  //  newWindow = null;           | (UNDER 'WINDOWS' THIS ENSURES THAT THERE
  //}                             | IS ONLY ONE SPAWNED WINDOW AT ANY ONE TIME)
  //self.status = 'This is the opener window';   //(temporary development aid)
  config = 'config=\' height=' + windowHeight + ',width = ' + windowWidth + ',scrollbars=yes,resizable=yes \'';    
  newWindow = window.open(contentURL,windowName,config);
  newWindow.focus();
}

function openChromedWindow(contentURL,windowName,windowHeight,windowWidth){
  //if (newWindow != null){       |
  //  newWindow.close();          | REMOVED BECAUSE OF PROBLEMS ON MACS
  //  newWindow = null;           | (UNDER 'WINDOWS' THIS ENSURES THAT THERE
  //}                             | IS ONLY ONE SPAWNED WINDOW AT ANY ONE TIME)
  config = 'config=\' height=' + windowHeight + ',width = ' + windowWidth + ',directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes \'';    
  newWindow = window.open(contentURL,windowName,config);
  newWindow.focus();
}

function closeWindow(){
  if (newWindow != null){
    newWindow.close();
    newWindow = null
  }
}
