/**************************************************************************
File Name:		openWin.js
Descriptions:	Open pop-up window scripts
**************************************************************************/

/***********************************************************************************
The following function opens a pop up window with name called popup.
Input parameters: 
	page - to load the document page that is passed-in, for now, it could either be popFrame or popGroupFrame.
*************************************************************************************/
function openWin(page) {
	popup = window.open(page, 'popup', 'width=380,height=300,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,windowLeft=yes');
	popup.focus();
}

/***********************************************************************************
The following function opens a popup window with different sizes depending on the browser type.
Input parameters: 
	page - to load the document page that is passed-in, for now, it could either be popFrame or popGroupFrame.
*************************************************************************************/
function openWin2(page) {
	var isNS4, isIE4;
		//check for browser name and version
		if (navigator.appVersion.charAt(0) >=4) {
			if (navigator.appName == "Netscape")
				isNS4 = true;
				else if (navigator.appVersion.indexOf("MSIE") != -1) 
				isIE4 = true;
		}
	
	// open a different size pop up window for ie and ns	
	if (isIE4)
		popup = window.open(page, 'popup', 'width=400,height=305,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
	else if (isNS4)
		popup = window.open(page, 'popup', 'width=420,height=330,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes');
	popup.focus();
}	






