thePromptWidth = max(
	zstring_width( zstring: '$$$/Dialogs/SearchForRecipients/Name' ),
	zstring_width( zstring: '$$$/Dialogs/SearchForRecipients/Email' ),
	zstring_width( zstring: '$$$/Dialogs/SearchForRecipients/Groups' ),
	zstring_width( zstring: '$$$/Dialogs/SearchForRecipients/Directories' ) );

theEditWidth = max_char_width() * 15;

theListHeight = gEditTextHeight * 6;

theListWidth = max_char_width() * 25;

dialog(name: '$$$/Dialogs/SearchForRecipients/Title')
{
	view(alignment: align_fill)
	{
		cluster(item_id: 'AdvC', name: '$$$/Dialogs/SearchForRecipients/AdvancedSearchTitle', alignment: align_fill)
		{
			check_box(item_id: 'AllB', name: '$$$/Dialogs/SearchForRecipients/SearchAll');
			check_box(item_id: 'wien', name: '$$$/Dialogs/SearchForRecipients/WindowsImportEnable');
			
			view(alignment: align_fill, align_children: align_row)
			{
				view(width: thePromptWidth, align_children: align_right)
				{
					static_text(name: '$$$/Dialogs/SearchForRecipients/Directories');
				}
				popup(item_id: 'DirL', alignment: align_fill);
			}
			
			view(alignment: align_fill, align_children: align_row)
			{
				view(width: thePromptWidth, align_children: align_right)
				{
					static_text(name: '$$$/Dialogs/SearchForRecipients/Groups');
				}
				popup(item_id: 'GrpL', alignment: align_fill);
			}
		}
		
		cluster(item_id: 'SrcC', name: '$$$/Dialogs/SearchForRecipients/SearchTitle', alignment: align_fill)
		{
			view(alignment: align_fill, align_children: align_row)
			{
				view(width: thePromptWidth, align_children: align_right)
				{
					static_text(item_id: 'NamP', name: '$$$/Dialogs/SearchForRecipients/Name');
				}
				edit_text(item_id: 'NamE', width: theEditWidth);
				button(item_id: 'SrcB', name: '$$$/Dialogs/SearchForRecipients/Search');
			}
			
			view(alignment: align_fill, align_children: align_row)
			{
				view(width: thePromptWidth, align_children: align_right)
				{
					static_text(item_id: 'EmlP', name: '$$$/Dialogs/SearchForRecipients/Email');
				}
				edit_text(item_id: 'EmlE', width: theEditWidth);
			}
		}
		
		cluster(item_id: 'RslC', name: '$$$/Dialogs/SearchForRecipients/SearchResultsTitle', alignment: align_fill)
		{
			mclv(item_id: 'RslL', height: theListHeight, width: theListWidth, alignment: align_fill );
		}

		view(alignment: align_fill, align_children: align_row)
		{
			button(item_id: 'CstB', name: '$$$/Dialogs/SearchForRecipients/CustomSearch');
			ok_cancel();
		}
	}
}
