<!--
/* Author: Andy Knapp */
/* Date: 27/12/2006 */

    function changeImage(pr_Icon, pr_Target, pr_Summary ) {
    
        var thisTarget = document.getElementById( pr_Target );
        var thisIcon = document.getElementById( pr_Icon );

        var thisSummary = null;
        if(  pr_Summary != null ) {
            thisSummary = document.getElementById( pr_Summary );
        }

        var wasHidden = -1;
        var i;
        var iconIndex = -1;

        for( i = 0; i < hiddenIcons.length; i++ ) {

            if( hiddenIcons[i].id == pr_Icon ) {
            
                wasHidden = hiddenIcons[i].state;
                
                // Hidden -> Visible
                if( wasHidden == 1 ) {
                    hiddenIcons[i].state = 0;
                } else {    // Visible -> Hidden
                    hiddenIcons[i].state = 1;
                }
                iconIndex = i;
            }
        }
        
        if( wasHidden == -1 ) {
            alert( "No State for " + pr_Icon );
        }

        // Visible -> Hidden
        if( wasHidden == 0 ) {
            thisTarget.style.display="none";

            thisIcon.innerHTML = "+";
            if( thisSummary != null ) {
                thisSummary.style.display="block"; 
            }

        } else { // Hidden -> Visible.
            thisTarget.style.display="block"; 

            thisIcon.innerHTML = "-";
            if( thisSummary != null ) {
                thisSummary.style.display="none"; 
            }
        }
    }

    function openPopup( strURL, intWidth, intHeight, blnNewWindow ) {

	var intScreenHeight = 0;
	var intScreenWidth = 0;
        var leftPos = 0;
        var topPos = 0;

	//	get screen height
	if( parseInt( navigator.appVersion ) > 3 ) {
            intScreenHeight = screen.availHeight;
            intScreenWidth = screen.availWidth;
            if( !intScreenHeight ) {
                intScreenHeight = screen.height;
            }
            if( !intScreenWidth ) {
                intScreenWidth = screen.width;
            }
//            alert(" n3 h:" + intScreenHeight + " w: " + intScreenWidth );
	} else if( ( navigator.appName == "Netscape" ) && 
                   ( parseInt( navigator.appVersion ) == 3 ) && 
                   ( navigator.javaEnabled() ) ) {

            var jToolkit = java.awt.Toolkit.getDefaultToolkit();
            var jScreenSize = jToolkit.getScreenSize();
            intScreenHeight = jScreenSize.height;
            intScreenWidth  = jScreenSize.width;
//            alert(" net3 h:" + intScreenHeight + " w: " + intScreenWidth );
	} else {
            alert( 'Can\'t detect screen resolution' );
            return;
	}
	//	adjust dimensions if necessary
	if( intHeight > intScreenHeight ) {
            intHeight = intScreenHeight - 10;
	}
        
        if( intHeight < intScreenHeight - 10 ) {
            topPos = ( intScreenHeight - intHeight ) / 2 + 5;
        }
        if( intWidth < intScreenWidth ) {
            leftPos = ( intScreenWidth - intWidth ) / 2;
        }
//        alert(" used h:" + intHeight + " w: " + intWidth + " t:" + topPos + " l: " + leftPos);

	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
                                            + ',left=' + leftPos 
                                            + ',top=' + topPos );
            openPopup.focus();
	} else {
            //	same window
            window.resizeTo( intWidth, intHeight );
	}
	return;
}
-->
