gMaxWidth = max( zstring_width( zstring: '$$$/Dialogs/Identity/UserName' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/FirstName' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/LastName' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/Title' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/Corporation' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/CorporationAbbr' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/Department' ),
		 zstring_width( zstring: '$$$/Dialogs/Identity/EMail' ) );

gRightHandWidth = ( max_char_width() * 20 );

gOverallWidth = gMaxWidth + gRightHandWidth + gSpace + gEditTextPad;

gTheGapSpace = gOverallWidth - zstring_width( zstring: '$$$/AnnotAlert/Checkbox' ) - gCheckBoxWidth - max(gButtonWidth, zstring_width( zstring: '$$$IDS_COMPLETE' )) - max(gButtonWidth, zstring_width( zstring: '$$$IDS_CANCEL' ));

dialog( name: '$$$/Dialogs/Identity', target_id: 'Name' )
{
	view( align_children: align_left )
	{
		static_text( item_id: 'itxt', name: '$$$IDS_NO_IDENTITY_INFO_MSG', wrap_name: true, width: gOverallWidth );

		cluster( name: '$$$/Dialogs/Identity/Group' )
		{
			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/UserName', width : gMaxWidth, alignment: align_right );
				static_text( item_id: 'UNam', width: gRightHandWidth );
			}

			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/LastName', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'LNam', width: gRightHandWidth );
			}

			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/FirstName', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'FNam', width: gRightHandWidth );
			}

			view(align_children: align_row)
			{
				static_text( name: '$$$/Dialogs/Identity/Title', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'TITL', width: gRightHandWidth );
			}

			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/Corporation', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'Corp', width: gRightHandWidth );
			}

			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/CorporationAbbr', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'CrpH', width: gRightHandWidth );
			}

			view( align_children: align_row )
			{
				gap( alignment: align_center, width: gMaxWidth );
				static_text( name: '$$$/Dialogs/Identity/CorporationAbbrHint', width : gRightHandWidth, alignment: align_left );
			}

			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/Department', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'Dept', width: gRightHandWidth );
			}

			view( align_children: align_row )
			{
				static_text( name: '$$$/Dialogs/Identity/EMail', width : gMaxWidth, alignment: align_right );
				edit_text( item_id: 'Mail', width: gRightHandWidth );
			}
		}

		view( align_children: align_row )
		{
			check_box( item_id: 'cbox', name: '$$$/AnnotAlert/Checkbox', alignment: align_left );
			gap( alignment: align_center, width: gTheGapSpace );
			ok_cancel( ok_name: '$$$IDS_COMPLETE', alignment: align_right );
		}
	}
}
