//Detects whether a window is a normal window, a pop-up, or a pop-up with a closed parent.
//In Netscape 7, normal windows and pop-ups with closed parents are treated the same.
var parent_info, popup_message
popup_message = "popup"
function link_back(link_location) {
  try {parent_info = window.opener.location.toString()}
  catch(e) {popup_message = "parent closed";}
  if (popup_message == "parent closed") {
    try {parent_info = window.opener.location}
	catch(e) {popup_message = "regular window";}
  }

  switch (popup_message) {
    case "popup":
	  window.opener.location = link_location;
	  close();
	  break;
	case "parent closed":
	  window.open(link_location);
	  close();
	  break;
	default:
	  location = link_location;
	  break;
  }
}

