/////////////////////////////////////////////////////////////////////////
// Function: newBrowserWindow(linkingURL, w, h)
// Arguments:	linkingURL:	URL to open
//				w: 			width of the browser window
//				h:			height of the browser window
// NOTE:		- If width and height are not specified or if w = h = 0, 
//				a full browser window will open WITH the navigation bottons
//				- If width or height are supplied, new browser window will 
//				open WITHOUT navigation buttons or location bar 
	//with proper size and no browser navigation.
/////////////////////////////////////////////////////////////////////////
function newBrowserWindow(linkingURL, w, h)
{
	if (w != 0 && h != 0 && !isNaN(w) && !isNaN(h))
	{
		settings = 'width='+w+',height='+h+',titlebar=yes,toolbar=yes,' + 
			'resizable=yes,status=yes,menubar=yes,location=yes,scrollbars=yes';
	}
	else
	{
		settings = 'titlebar=yes,toolbar=yes,resizable=yes,status=yes,' + 
			'menubar=yes,location=yes,scrollbars=yes';
	}
	var newwin;
	var winName = "NBSWCPopUp";
	if (window.name == "NBSWCPopUp")
		winName = "newPopUp";
	newwin = window.open (linkingURL, winName, settings);
}

/////////////////////////////////////////////////////////////////////////
// Function: FlexPopup(strPopup,w,h)
// Arguments:	strPopup: 	filePath or URL to open
//				w: 			width of the browser window
//				h:			height of the browser window
// NOTE:		If no width and height is specified or if w = h = 0, 
//				a full browser window will open with the navigation bottons
/////////////////////////////////////////////////////////////////////////
function flexPopup(strPopup, w, h)
{
	//if width or height were sent, open the browser 
	//with proper size and no browser navigation.
	if (w != 0 && h != 0 && !isNaN(w) && !isNaN(h))
		settings = 'width='+w+',height='+h+',toolbar=no,menubar=no,' + 
			'scrollbars=yes,resizable=yes,location=no,directories=no,status=no';
	else
		settings = 'toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,' + 
			'location=yes,directories=no,status=no';
	var newwin;
	var winName = "NBSWCPopUp";
	if (window.name == "NBSWCPopUp")
		winName = "newPopUp";
	newwin = window.open(strPopup, winName, settings);
}

