<html>
<head>
<title>##@TABLE.strCaption h##</title>
<link REL="stylesheet" href="include/style.css" type="text/css">
<!--[if IE]>
<link REL="stylesheet" href="include/styleIE.css" type="text/css">
<![endif]-->
{BEGIN style_block}
<style>
#toplinks_caption{$id} {padding:0px 30px;font-size:12px;font-weight:bold;}
#mastertable_block{$id} {margin-left:50px;margin-top:10px}
#toplinks_block{$id} {width:100%;padding:3px;padding-left:30px}
#toplinks_block{$id} span {padding-left:5px;}
#search_records_block{$id} { padding-left:20px;}
#search_records_block{$id} > * {vertical-align:middle;}
#search_records_block{$id} select {margin:3px 0px;}
#login_block{$id} {padding:10px; margin-bottom:3px}
#login_block{$id} * {margin-left:5px; padding:5px 0px;}
#menu_block{$id} {padding:10px;}
#menu_block{$id} * {list-style-type:none;}
#menu_block{$id} IMG {vertical-align:middle;}
#records_block{$id} {margin-left:203px;}
#record_controls{$id} {padding:10px 10px;}
#record_controls{$id} span {padding-left:10px;}
#recordcontrolsadd_block{$id} {padding:10px 10px;border: solid; border-width: 1px; border-color: #C0C0C0;}
#recordcontrolsadd_block{$id} span {padding-left:10px;}
#grid_block{$id} {border:solid 1px #C0C0C0;}
.grid_recordheader{$id} {padding:0 5px 5px;vertical-align:top;}
.grid_recordheader{$id} * {margin:0px 5px; vertical-align:top;}
body {margin-left:10px;}
</style>
{END style_block}
</head>
<body topmargin=5 {$bodyattrs}>
{BEGIN body}
{$header}

##if @TABLE.arrMasterTables.len##
    {BEGIN mastertable_block}
    <div id="mastertable_block{$id}">
    {$showmasterfile}
	<br>
    </div>
    {END mastertable_block}
##endif##

<div id="usermessage{$id}" class="message"></div>
{BEGIN grid_block}
<table name="maintable" cellspacing=2 cellpadding=3 border=0 id="grid_block{$id}">
{BEGIN grid_row}
<tr valign="top" class="shade"> 
{BEGIN grid_record}
<td><img src="{$firstphoto}" id="imgMainPhoto"></td>
##foreach Fields as @f filter bListPage order nListPageOrder##
{BEGIN ##@f.strName g##_fieldcolumn}
<td valign=middle align=left>
{$##@f.strName g##_value}
</td>
{END ##@f.strName g##_fieldcolumn}
##endfor##

{BEGIN endrecord_block}
<td class=body2 {$endrecordblock_attrs}>&nbsp;</td>
{END endrecord_block}
{END grid_record}
</tr>
{END grid_row}

##if Fields[strTotalsType].len##
{BEGIN totals_row}
<tr>
{BEGIN totals_record}

##if @TABLE.bEdit##
{BEGIN edit_column}
<td width=50 align="center" class="blackshade">&nbsp;</td>
{END edit_column}
##endif##

##if @TABLE.bInlineEdit##
{BEGIN inlineedit_column}
<td width=100 align="center" class="blackshade">&nbsp;</td>
{END inlineedit_column}
##endif##

##if @TABLE.bCopy##
{BEGIN copy_column}
<td width=50 align="center" class="blackshade">&nbsp;</td>
{END copy_column}
##endif##

##if @TABLE.bView##
{BEGIN view_column}
<td width=50 align="center" class="blackshade">&nbsp;</td>
{END view_column}
##endif##

##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN checkbox_column}
<td width=50 align="center" class="blackshade">
&nbsp;
</td>
{END checkbox_column}
##endif##

##foreach @BUILDER.tables as @t filter @t.arrMasterTables[strMasterTable==@TABLE.strDataSourceTable].len##
{BEGIN ##@t.strShortTableName##_dtable_column}
<td width=50 class="blackshade">&nbsp;</td>
{END ##@t.strShortTableName##_dtable_column}
##endfor##

##foreach Fields as @f filter bListPage order nListPageOrder##
{BEGIN ##@f.strName g##_fieldfootercolumn}
<td valign=middle align=center class="blackshade">
{BEGIN ##@f.strName g##_showtotal}
##if strTotalsType=="COUNT"##
	##message COUNT##
##elseif strTotalsType=="TOTAL"##
	##message TOTAL##:
##elseif strTotalsType=="AVERAGE"##
	##message AVERAGE##:
##endif##
{$##@f.strName g##_total}
{END ##@f.strName g##_showtotal}
</td>
{END ##@f.strName g##_fieldfootercolumn}
##endfor##

{BEGIN endrecordtotals_block}
<td>&nbsp;</td>
{END endrecordtotals_block}
{END totals_record}
</tr>
{END totals_row}
##endif##
</table>
{END grid_block}


{BEGIN pagination_block}
<p align=center class=toplist >{$pagination}</p>
{END pagination_block}

{BEGIN message_block}
<p align=center valign=middle class=toplist><b>{$message}</b></p>
{END message_block}
{$footer}
{END body}
</body>
</html>

{$imgMainPhoto}
