//
//	Author	: Scott Bednar (scott.bednar@ps.boeing.com)
//	Name	: popUp.js
//	Date	: 04-27-00
//	Description:
//  To use this script, include into your .html file this line:
//  <script src="/path_to_this_script/popUp.js"></script>
//
//  Then set the "href" for the link to pop up the window to this:
//
//  <a href="javascript:popUp('path/file.html', 500, 500);">Link</a>
//                               |               |    | 
//  where:  path to file for display  window height, width 
//

var PUwin;

function popUp(help_item, h, w)
{
	var newwin = null;

	if(typeof(PUwin) == 'undefined' || PUwin.closed)
	{	// create new window and load with help_item
		newwin = window.open("","","width=" + w + ",height=" + h + ",status=no,resizable=yes,scrollbars=no,left=5,top=5");
		if(newwin != null)
		{
			if (newwin.opener == null)
				newwin.opener = self;
			newwin.location.href = help_item;
		}
		PUwin = newwin;
		PUwin.focus();
	} else {  // bring existing window to the top, load with help_item
		PUwin.location=help_item;
		PUwin.resizeTo(w,h);
		PUwin.focus();
	}
}
