
function popup_window(url){
  popup_window_with_name(url, 'PopUp');
}

// This pops up a new window with the given URL.
var new_window;
function popup_window_with_name(url, window_name) {
  if (!new_window || new_window.closed) {
    new_window = window.open(url, window_name, 'scrollbars=yes,height=500,width=700');
  }
  else if (new_window.focus) {
    new_window.focus();
  }
}

// This causes the message to be displayed with an ok/cancel box,
// that then sends the user to the URL, if OK.
function popup_link_confirm(url, message){
  var response = confirm(message, url);
  if(response){
    window.location = url;
  }
}

