<!--

/*
	*	File:		pop.js
	*	Name:		window management tools
	*	Date:		2002-02-25 (Revised by HK)
	*	Copyright:	(c) Ben Boyle 2000
	*	Author:		Ben Boyle 
	*	Email:		bsboyle@optusnet.com.au

	*	Platform:	all javascript browsers
*/

//	FUNCTION:			popup
//	DESCRIPTION:	Opens a pop-up window to load a specified url, using a specified width & height for the window						
// 	ARGUMENTS:		url of page to open (blank '' if using window.document.write() to create content)
//								name used to refer to window in HTML "Target", NOT JAVASCRIPT - blank ''
//								width of window	
//								height of window	
//	RETURNS:			the window.open function with specified values
function popup(url, name, width, height) {

	// window attributes
	width = width + 50;
	height = height + 60;
	var features = 'scrollbars=no, resizable=yes';

	// create window
	var w = window.open(url, name, "width=" +width+ ",height="+height+","+features);

	// navigator 2 bug
	if (!w.opener) {
		w.opener = window;
	}

	// resize required if window "name" already exists
	w.resizeTo(width, height);
	w.focus();

	// return window
	return w;
}

//	FUNCTION:			popup
//	DESCRIPTION:	Opens a pop-up window to load a specified url, width & height is the same for all windows (320x430)	
// 	ARGUMENTS:		url of page to open (blank '' if using window.document.write() to create content)
//								name used to refer to window in HTML "Target", NOT JAVASCRIPT - blank ''
//	RETURNS:			the window.open function with preset values
function fixed_popup(url, name) {
	
	// window attributes
	var width = 320;
	var height = 430;
	var features = 'scrollbars=yes, resizable=yes';
	
	// create window
	var w = window.open(url, name, "width=" +width+ ",height="+height+","+features);

	// navigator 2 bug
	if (!w.opener) {
		w.opener = window;
	}

	// resize required if window "name" already exists
	w.resizeTo(width, height);
	w.focus();

	// return window
	return w;
}


// -->
