// ------------------------------------------------ FUNCTIONS

/*
 * Open a new browser window and display the 
 * given resource at the given URL. You may 
 * overload this method and optionally include 
 * a name for the new window and/or a list of 
 * features attributes to give to the window. This 
 * function could be written as: 
 *
 * openWindow(theURL[, theName[, features]])
 *
 * theURL: URL of the resource to display [required]
 * theName: name assigned to the window [optional]
 * features: comma delimited list of window features [optional]
 */
function openWindow(theURL)
{
	var DEFAULT_WIDTH	= 720;
	var DEFAULT_HEIGHT	= 540;
	var DEFAULT_NAME	= '';
	var DEFAULT_FEATURES = 'width='+DEFAULT_WIDTH+',height='+DEFAULT_HEIGHT+'scrollbars,resizable,status,toolbar,location,menubar,directories';

	var _URL = theURL;
	var _name = DEFAULT_NAME;
	var _features = DEFAULT_FEATURES;
	
	for (var i = 1; i < openWindow.arguments.length; i++)
	{
		if (1 == i && openWindow.arguments[i]) _name = openWindow.arguments[i];
		if (2 == i && openWindow.arguments[i]) _features = openWindow.arguments[i];
	}

	window.open(_URL, _name, _features);
}
