theInnerAdjustment = gGap * 8;
theTabDecorationWidth = gGap * 4;
gTabWidth = zstring_width(zstring: '$$$IDS_CV_CERT_GENERAL_TAB') + theTabDecorationWidth +
				   zstring_width(zstring: '$$$IDS_CV_CERT_DETAILS_TAB') + theTabDecorationWidth +
				   zstring_width(zstring: '$$$IDS_CV_CERT_REVOCATION_TAB') + theTabDecorationWidth +
				   zstring_width(zstring: '$$$IDS_CV_CERT_TRUST_TAB') + theTabDecorationWidth +
				   zstring_width(zstring: '$$$IDS_CV_CERT_POLICY_TAB') + theTabDecorationWidth +
				   zstring_width(zstring: '$$$IDS_CV_CERT_LEGAL_TAB') + theTabDecorationWidth - theInnerAdjustment;

thePromptWidth = max(
	zstring_width(zstring: '$$$IDS_CERT_Issuer'),
	zstring_width(zstring: '$$$IDS_CERT_Usages'),
	zstring_width(zstring: '$$$IDS_CERT_ValidityStart'),
	zstring_width(zstring: '$$$IDS_CERT_ValidityEnd') );

theUsageEditBoxHeight =  2 * gEditTextHeight;
theUsageEditBoxWidth = gTabWidth - thePromptWidth - gGap;

dialog()
{
	view(margin_height: 0, margin_width: 0, width: gTabWidth)
	{
		view(align_children: align_top, alignment: align_fill)
		{
			view(align_children: align_center, width: thePromptWidth)
			{
				picture(item_id: 'i2Sb', width: 32, height: 32);
			}

			view(align_children: align_left, alignment: align_fill)
			{
				static_text(item_id: 's2N1', alignment: align_fill);
				static_text(item_id: 's2O1', alignment: align_fill);
			}
		}

		view(align_children: align_top, alignment: align_fill)
		{
			view(width: thePromptWidth, align_children: align_right) 
			{
				static_text(item_id: 's2P1', name: '$$$IDS_CERT_Issuer');
			}
			static_text(item_id: 's2N2', alignment: align_fill);
		}

		view(align_children: align_top, alignment: align_fill)
		{
			gap(width: thePromptWidth);
			static_text(item_id: 's2I2', alignment: align_fill);
		}

		view(align_children: align_top, alignment: align_fill)
		{
			view(width: thePromptWidth, align_children: align_right) 
			{
				static_text(item_id: 's2P2', name: '$$$IDS_CERT_ValidityStart');
			}
			static_text(item_id: 's2VB', alignment: align_fill);
		}

		view(align_children: align_top, alignment: align_fill)
		{
			view(width: thePromptWidth, align_children: align_right) 
			{
				static_text(item_id: 's2P3', name: '$$$IDS_CERT_ValidityEnd');
			}
			static_text(item_id: 's2VE', alignment: align_fill);
		}

		view(align_children: align_top, alignment: align_fill)
		{
			view(width: thePromptWidth, align_children: align_right) 
			{
				static_text(item_id: 's2P4', name: '$$$IDS_CERT_Usages');
			}
			view( align_children: align_right, alignment: align_fill )
			{
				edit_text(item_id: 'e2Us', multiline: true, readonly: true, width: theUsageEditBoxWidth-gEditTextPad, height: theUsageEditBoxHeight);
			}	
		}
		
		view(align_children: align_top, alignment: align_fill)
		{
			view(align_children: align_center, width: thePromptWidth)
			{
				picture(item_id: 'i2ER', width: 32, height: 32);
			}
			view(align_children: align_left)
			{
				static_text(item_id: 's2ER', alignment: align_fill, width: theUsageEditBoxWidth, height: 32);
			}
		}
		view(align_children: align_top, alignment: align_fill)
		{
			view(width: thePromptWidth, align_children: align_right) 
			{
			}
			view(align_children: align_left)
			{
				static_text(item_id: 's2PK', alignment: align_fill, width: theUsageEditBoxWidth, height: 48);
			}
		}
		
		view(align_children: align_top, alignment: align_fill, item_id: 'g2AT')
		{
			view(width: thePromptWidth, align_children: align_right)
			{
				static_text( item_id: 's2AT', name: '$$$IDS_CERT_Attributes');
			}
			
			view( align_children: align_right, alignment: align_fill )
			{
				list_box(item_id: 'l2AT', width: theUsageEditBoxWidth, height: gEditTextHeight);
				button( item_id: 'b2AT', name: '$$$/Dialogs/CertGeneralTabs/AttributeButton' );				
			}
		}
		
    	view(align_children: align_row, alignment: align_center)
	    {
    		button(item_id: 'b2Xp', name: '$$$/Dialogs/CertGeneralTabs/ExportButton');
	    }    		    							

	}
}