gMaxSettingWidth = max(
	zstring_width(zstring: '$$$/Prefs/TrustManagerURL/AlwaysAllow'),
	zstring_width(zstring: '$$$/Prefs/TrustManagerURL/AlwaysDeny'),
	zstring_width(zstring: '$$$/Prefs/TrustManagerURL/UseTrustList')) + max_char_width();
	
gMaxSetting2Width = max(
	zstring_width(zstring: '$$$/Prefs/TrustManagerURL/AlwaysAllow'),
	zstring_width(zstring: '$$$/Prefs/TrustManagerURL/AlwaysDeny'),
	zstring_width(zstring: '$$$/Prefs/TrustManagerURL/AlwaysPrompt')) + max_char_width();

gDialogWidth = 400;

dialog(item_id: 'titl', name: '$$$/Prefs/TrustManagerURL/Title')
{
	view(width: gDialogWidth, align_children: align_left)
	{
		static_text(name: '$$$/Prefs/TrustManagerURL/InfoTxt');
		
		radio(item_id: 'alal', group_id: 'stpu', name: '$$$/Prefs/TrustManagerURL/AllowAll');
		radio(item_id: 'alme', group_id: 'stpu', name: '$$$/Prefs/TrustManagerURL/AllowMe');
		radio(item_id: 'blal', group_id: 'stpu', name: '$$$/Prefs/TrustManagerURL/BlockAll');
				
		cluster(name: '$$$/Prefs/TrustManagerURL/AllowBlockCluster', width: gDialogWidth, align_children: align_left)
		{
			static_text(item_id: 'tlst', width:gDialogWidth, height: gStaticTextHeight * 1);			
			edit_text(item_id: 'edit', alignment: align_fill );
			
			view(alignment: align_fill, align_children: align_right)
			{
				view(align_children: align_row)
				{
					button(item_id: 'allu', name: '$$$/Prefs/TrustManagerURL/AllowURL');
					button(item_id: 'blku', name: '$$$/Prefs/TrustManagerURL/BlockURL');
				}
			}
		}
		
		cluster(name: '$$$/Prefs/TrustManagerURL/MySitesCluster', width: gDialogWidth, align_children: align_left)
		{
			button(item_id: 'rmv ', name: '$$$/Prefs/TrustManagerURL/Remove');
			
			mclv(item_id: 'list', alignment: align_fill, height: gEditTextHeight * 8);
			
			static_text(name: '$$$/Prefs/TrustManagerURL/OtherSitesDesc');
			
			radio(item_id: 'askm', group_id: 'defo', name: '$$$/Prefs/TrustManagerURL/AlwaysAsk');
			radio(item_id: 'alla', group_id: 'defo', name: '$$$/Prefs/TrustManagerURL/AllowAccess');
			radio(item_id: 'bloa', group_id: 'defo', name: '$$$/Prefs/TrustManagerURL/BlockAccess');
		}
		
		ok_cancel();		
	}
}