theLHSWidth = max(
	zstring_width( zstring: '$$$/Dialogs/EDC_PolicyEdit/Name' ),
	zstring_width( zstring: '$$$/Dialogs/EDC_PolicyEdit/Comments' ) );

theRHSWidth = max(
	zstring_width( zstring: '$$$/Dialogs/EDC_PolicyEdit/Max50Chars' ),
	zstring_width( zstring: '$$$/Dialogs/EDC_PolicyEdit/Max250Chars' ) );

gEncryptionTextWidth = 30 * max_char_width();

gEncryptionTextHeight = gStaticTextHeight * 2;

dialog(margin_height: 0, margin_width: 0)
{
	view(alignment: align_fill, align_children: align_left)	
	{
		gap(height: gGap);
		
		static_text(item_id: 'note', font_id: 5, alignment: align_fill);
		
		gap(height: gGap);

  		radio( item_id: 'save', group_id: 'grp1', name: '$$$/Dialogs/PKI_General/SavePolicy');
  		radio( item_id: 'temp', group_id: 'grp1', name: '$$$/Dialogs/PKI_General/Discard');
  		
  		gap(height: gGap);
  		
		view(alignment: align_fill, align_children: align_row)	
		{
			view(width: theLHSWidth, align_children: align_right)
			{
				static_text(name: '$$$/Dialogs/EDC_PolicyEdit/Name');
			}
	        
			edit_text(item_id: 'name', alignment: align_fill);
	        
			view(width: theRHSWidth, align_children: align_left)
			{
				static_text(name: '$$$/Dialogs/EDC_PolicyEdit/Max50Chars');
			}
		}
		
		
		view(alignment: align_fill, align_children: align_top)	
		{
			view(width: theLHSWidth, align_children: align_right)
			{
				static_text(name: '$$$/Dialogs/EDC_PolicyEdit/Comments');
			}
	        
			edit_text(item_id: 'cmnt', height: gStaticTextHeight * 6, alignment: align_fill, multiline: true);
	        
			view(width: theRHSWidth, align_children: align_left)
			{
				static_text(name: '$$$/Dialogs/EDC_PolicyEdit/Max250Chars');
			}
		}
	
		gap(height: gGap);
		
		cluster(name: '$$$/Dialogs/Encryption/ClusterLabel', align_children: align_row)
		{
			group()
			{
				radio( item_id: 'eDoc', group_id: 'encp', name: '$$$/Dialogs/Encryption/WholeDocument');
				radio( item_id: 'eMet', group_id: 'encp', name: '$$$/Dialogs/Encryption/NotMetadata');
				radio( item_id: 'eAtt', group_id: 'encp', name: '$$$/Dialogs/Encryption/JustAttachments');

				view(align_children: align_row)
				{
					gap();
					picture(item_id: 'eIcn', width: 16, height: 16);
					static_text(item_id: 'eTxt', width: gEncryptionTextWidth, height: gEncryptionTextHeight);
				}
			
			}
		}
		
		gap(height: gGap);
		
		check_box(item_id: 'reqR', name: '$$$/Dialogs/PKI_General/AskForRecipients');
		
		view(alignment: align_fill, align_children: align_row)
		{
		    static_text( name: '$$$IDS_EncryptionAlgLabel' );
		    popup( item_id: 'Algo', alignment: align_fill );
		}

                gap();
	}
}
