function showPopupImage( sImageType, sImgPath, nWidth, nHeight ) {
	var bScroll = 'no';
	var nTop = 0, nLeft = 0;

	if( nWidth > screen.width-10 || nHeight > screen.height-28 ) {
		bScroll = 'yes';
	}

	if( nHeight < screen.height-28 ) {
		nTop = Math.floor( (screen.height - nHeight)/2-14 );
	}
	if( nWidth < screen.width-10 ) {
		nLeft = Math.floor( (screen.width - nWidth)/2 );
	}

	nWidth = Math.min( nWidth, screen.width-10 );
	nHeight = Math.min( nHeight, screen.height-28 );

	window.open(sSiteAbsUrl+'images.php?image_type='+sImageType+'&image_file='+sImgPath,'','scrollbars='+bScroll+',resizable=yes,width='+nWidth+',height='+nHeight+',left='+nLeft+',top='+nTop);
}

function showPopupPrint( sImageType, sImgPath, nWidth, nHeight ) {
	var bScroll = 'no';
	var nTop = 0, nLeft = 0;

	if( nWidth > screen.width-10 || nHeight > screen.height-28 ) {
		bScroll = 'yes';
	}

	if( nHeight < screen.height-28 ) {
		nTop = Math.floor( (screen.height - nHeight)/2-14 );
	}
	if( nWidth < screen.width-10 ) {
		nLeft = Math.floor( (screen.width - nWidth)/2 );
	}

	nWidth = Math.min( nWidth, screen.width-10 );
	nHeight = Math.min( nHeight, screen.height-28 );

	window.open(sSiteAbsUrl+'print.php?image_type='+sImageType+'&image_file='+sImgPath,'','scrollbars='+bScroll+',resizable=yes,width='+nWidth+',height='+nHeight+',left='+nLeft+',top='+nTop);
}
