/*
	RegisterPopup.js
	
	Copyright (C) 2002 NextPage, Inc.  All rights reserved
	An include file for a standardized "open a new window" capability.  This file is really named poorly,
	for historical reasons.
	
	rka 7-30-02 - added scrollable parameter to showPopup function
*/
function exists( obj) {
	return (typeof( obj) != "undefined");
}


// --------------------------------------------------------------
// showPopup()
//	URL and name are required - URL is the page to load in the popup window,
//		name is the name of the popup window; use this name to target the window
//		from other links
//	width and height are optional parameters.  
// --------------------------------------------------------------
function showPopup(url, name, width, height, toolbar, scrollable)
{
	if ( !exists( width) || (width == null) ) width = 590; 
	if ( !exists( height) || (height == null) ) height = 470;
	if ( !exists( toolbar) || (toolbar == null) ) toolbar = "no";
	if ( !exists( scrollable) || (scrollable == null) )	scrollable = "yes";
	var x = (screen.availWidth / 2) - (width / 2);
	var y = (screen.availHeight / 2) - (height / 2);
	var options = 'WIDTH=' + width + ',HEIGHT=' + height + ',left=' + x + ', top=' + y + ', screenX=' + x + ', screenY=' + y 
		+ ',alwaysraised=yes,status=no,toolbar=' + toolbar + ',menubar=no,scrollbars='+scrollable+',location=no,resizable=no';
	open(url, name, options);
	
	return true;
} // end showPopup()
