

/* open popup window for an image */
function openPopup (strURL, intWidth, intHeight) 
{
	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 {
		intScreenHeight = intHeight;
        alert( 'Can\'t detect screen resolution' );        
		// return;
	}
	//	adjust dimensions if necessary
	if (intHeight > intScreenHeight) {
		intHeight = intScreenHeight - 10;
	}
    // create 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();

//    openPopup.focus();
	return;
}
