
//	popup

function openPopup( strURL, intWidth, intHeight, blnNewWindow ) { //zubin
	var intScreenHeight = 0;
	//	get screen height
	if( parseInt( navigator.appVersion ) > 3 ) {
		intScreenHeight = screen.availHeight;
		if( !intScreenHeight ) {
			intScreenHeight = screen.height;
		}
	} else if(
		navigator.appName == "Netscape" && 
		parseInt( navigator.appVersion ) == 3 && 
		navigator.javaEnabled()
	) {
		var jToolkit = java.awt.Toolkit.getDefaultToolkit();
		var jScreenSize = jToolkit.getScreenSize();
		intScreenHeight = jScreenSize.height;
	} else {
		alert( 'Can\'t detect screen resolution' );
		return;
	}
	//	adjust dimensions if necessary
	if( intHeight > intScreenHeight ) {
		intHeight = intScreenHeight - 10;
	}
	if( blnNewWindow ) {
		//	new window
		var openPopup = window.open( strURL,'popup','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' + intWidth + ',height=' + intHeight );
		openPopup.focus();
	} else {
		//	same window
		window.resizeTo( intWidth, intHeight );
	}
	return;
}
