gMaxTopStaticWidth = max( 
	zstring_width(zstring: '$$$/Dialogs/Cert/IssuedTo') + 10,
	zstring_width(zstring: '$$$/Dialogs/Cert/IssuedBy') + 10,
	zstring_width(zstring: '$$$/Dialogs/Cert/ValidFrom') + 10);

gMinTopEditWidth = max_char_width() * 18;

gMaxControlWidth = max( gMaxTopStaticWidth + 10 + gMinTopEditWidth, 450 );

dialog(target_id: 'name', name: '$$$/Dialogs/Legal')
{
	group()
	{
	 	cluster(align_children: align_left, alignment: align_fill, name: '$$$/Dialogs/Cert/LegalDisclaimer', width: gMaxControlWidth)
		{
			static_text(item_id: 'legl', alignment: align_fill);
		}

		cluster(align_children: align_left, name: '$$$/Dialogs/Cert/GeneralClusterName', width: gMaxControlWidth )
		{
			view( align_children: align_left, alignment: align_fill )
			{
				view(align_children: align_row, alignment: align_fill)
				{
					static_text(alignment: align_right, font_id: 5, name: '$$$/Dialogs/Cert/IssuedTo');
					static_text(item_id: 'isTo', alignment: align_fill, font_id: 5);
				}
				view(align_children: align_row, alignment: align_fill)
				{
					static_text(alignment: align_right, font_id: 5, name: '$$$/Dialogs/Cert/IssuedBy');
					static_text(item_id: 'isBy', alignment: align_fill, font_id: 5);
				}
				view(align_children: align_row, alignment: align_fill)
				{
					static_text(alignment: align_right, font_id: 5, name: '$$$/Dialogs/Cert/ValidFrom');
					static_text(item_id: 'vald', alignment: align_fill, font_id: 5);
				}
			    view(align_children: align_row, alignment: align_fill)
			    {
                    static_text(alignment: align_right, font_id: 5, name: '$$$/Dialogs/Cert/UserNotice');
				    static_text(item_id: 'notc', alignment: align_fill);
			    }
			    view(align_children: align_row, alignment: align_center)
			    {
				    button( item_id: 'issB', name: '$$$/Dialogs/Cert/ButtonIssuer');
				    button( item_id: 'polB', alignment: align_right, name: '$$$/Dialogs/Cert/ButtonPolicy');
			    }
            }
		}
  		view(align_children: align_right, alignment: align_fill)
		{
			view(align_children: align_top)
			{
				button(item_id: 'LegB', name: '$$$/Dialogs/SigPropButton');
				button(item_id: 'Okay', name: '$$$/Dialogs/CloseButton');
			}
		}
	}
}
