<html {$html_attrs}>
<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>
#height100{$id} {padding:10px;}
#toplinks_block{$id} {padding:2px 5px}
#toplinks_block{$id} > * {margin:4px 6px;vertical-align:middle;}
#menu_block{$id} {clear:left;margin-top:10px;}
#menu_block{$id} div {float:left;}
#menu_block{$id} div div {margin-right:1px;float:none;}
#menu_block{$id} a {white-space:nowrap;}
#search_records_block{$id} {padding:9px 10px 13px 10px;text-align:right}
#search_records_block{$id} > * {margin:2px 2px;vertical-align:middle}
#details_block{$id}, #pages_block{$id} {white-space:nowrap}
#recordcontrols_block{$id} {padding:13px 10px 9px 10px;text-align:right}
#recordcontrols{$id} > *,#newrecordcontrols{$id} > * {margin:2px 2px;vertical-align:middle}
#search_records_top{$id} {clear:left}
#message_block{$id} {text-align:center;}
#grid_block{$id} {margin-top:10px;}
.headerlist_right2 *,.headerlist * {vertical-align:middle}
.grid_recordheader {padding:0 5px 5px}
.grid_recordheader * {margin:0px 5px; vertical-align:middle}
#mastertable_block{$id} {margin:10px 0}
body{margin:0px;padding:0px;}
</style>
{END style_block}
<!--[if IE]>
{BEGIN iestyle_block}
<style>
#toplinks_block{$id} * {margin:2px 3px;vertical-align:middle;}
#search_records_block{$id} * {margin:1px 1px;vertical-align:middle}
#recordcontrols{$id} *, #newrecordcontrols{$id} * {margin:1x 1px;vertical-align:middle}
</style>
{END iestyle_block}
<![endif]-->
</head>
<body marginheight=0 marginwidth=0 {$bodyattrs}>
{BEGIN body}
<div id="height100{$id}">
{$header}
##if @TABLE.arrMasterTables.len##
{BEGIN mastertable_block}
<div id="mastertable_block{$id}">
{$showmasterfile}
<a {$backtomasterlink_attrs} class="toplinks"><b>##message BACK_TO_MASTER##</b></a>
<br>
</div>
{END mastertable_block}
##endif##

{BEGIN toplinks_block}
<div>
<b class="xtop"><b class="rb1 rb1_top"></b><b class="rb2 rb2_top"></b><b class="rb3 rb3_top"></b><b class="rb4 rb4_top"></b></b>
<div class="top" id="toplinks_block{$id}" >
##if @BUILDER.bCreateLoginPage##
<span><font style="FONT-FAMILY: Verdana, Arial;">##message LOGGED_AS ##</font>&nbsp;<b>{$username}</b>&nbsp;</span>
<span class=buttonborder><input type=button class=button value="##message LOG_OUT##" {$logoutlink_attrs}></span>

##if @BUILDER.bDynamicPermissions##
##if !IsAdminTable(@TABLE)##
{BEGIN adminarea_link}
<span class=buttonborder><input type=button class=button value="##message AA_ADMINAREA##" {$adminarealink_attrs}></span>
{END adminarea_link}
##else##
{BEGIN exitadminarea_link}
<span class=buttonborder><input type=button class=button value="##message AA_EXIT_ADMINAREA##" {$exitaalink_attrs}></span>
{END exitadminarea_link}
##endif##
##endif##

##if @BUILDER.Registration.bChangePwdPage && @BUILDER.nLoginMethod == SECURITY_TABLE##
{BEGIN changepwd_link}
<span class=buttonborder><input type=button class=button value="##message CHANGE_PASSWORD##" {$changepwdlink_attrs}></span>
{END changepwd_link}
##endif##
##endif##

##if Fields[bAdvancedSearch=1].len##
{BEGIN asearch_link}
<span class=buttonborder><input type=button class=button value="##message ADVANCED_SEARCH##" {$asearchlink_attrs}></span>
{END asearch_link}
##endif##

##if @TABLE.bExportTo##
{BEGIN export_link}
<span class=buttonborder><input type=button class=button value="##message EXPORT_RESULTS##" {$exportlink_attrs}></span>
{END export_link}
##endif##

##if @TABLE.bPrinterFriendly##
{BEGIN print_link}
<span class=buttonborder><input type=button class=button value="##message PRINTER_FRIENDLY##" {$printlink_attrs}></span>
{END print_link}
##if @TABLE.bPrintAll##
{BEGIN printall_link}
<span class=buttonborder><input type=button class=button value="##message PRINT_ALL_PAGES##" {$printalllink_attrs}></span>
{END printall_link}
##endif##
##endif##

##if @TABLE.bImport##
{BEGIN import_link}
<span class=buttonborder><input type=button class=button value="##message IMPORT##" {$importlink_attrs}></span>
{END import_link}
##endif##

##if @BUILDER.arrLanguages.len>1##
{BEGIN languages_block}
<span id="languages_block{$id}">
<b>##message LANGUAGE ##:</b>&nbsp;
	<select {$langselector_attrs}>
	##foreach @BUILDER.arrLanguages as @lang##
		<option value="##@lang h##" {$##@lang g##_langattrs}>##@lang h##</option>
	##endfor##
	</select>
</span>
{END languages_block}
##endif##
</div>
<b class="xbottom"><b class="rb4 rb4_top"></b><b class="rb3 rb3_top"></b><b class="rb2 rb2_top"></b><b class="rb1 rb1_top"></b></b>
</div>
{END toplinks_block}
<!-- MenuBegin -->
##include templates\lmenu.htm##
<!-- MenuEnd -->
{BEGIN search_records_block} 
<div id="search_records_top{$id}">
<b class="rb1 rb1_search" ></b><b class="rb2 rb2_search"></b><b class="rb3 rb3_search"></b><b class="rb4 rb4_search"></b>
<div id="search_records_block{$id}" class="main_table_border_P">
##if @TABLE.nType!=titCHART##
##if Fields[bSearch=1].len##
{BEGIN searchform}
<span id="searchform{$id}">
<b>##message SEARCH_FOR## </b> &nbsp;&nbsp;&nbsp;
{BEGIN searchform_field}
<select id="ctlSearchField{$id}">
<option value="">##message ANY_FIELD##</option>
##foreach Fields as @f filter @f.bSearch order @f.nAdvSearchPageOrder##
<option value="##@f.strName h##" {$##@f.strName g##_searchfieldoption}>##@f.strLabel h##</option>
##endfor##
</select>
{END searchform_field}
&nbsp;
{BEGIN searchform_option}
<select id="ctlSearchOption{$id}">
<option value="Contains" {$Contains_searchtypeoption}>##message CONTAINS##</option>
<option value="Equals" {$Equals_searchtypeoption}>##message EQUALS##</option>
<option value="Starts with ..." {$Starts_with_____searchtypeoption}>##message STARTS_WITH##</option>
<option value="More than ..." {$More_than_____searchtypeoption}>##message MORE_THAN##</option>
<option value="Less than ..." {$Less_than_____searchtypeoption}>##message LESS_THAN##</option>
<option value="Equal or more than ..." {$Equal_or_more_than_____searchtypeoption}>##message EQUAL_OR_MORE##</option>
<option value="Equal or less than ..." {$Equal_or_less_than_____searchtypeoption}>##message EQUAL_OR_LESS##</option>
<option value="Empty" {$Empty_searchtypeoption}>##message EMPTY##</option>
</select>
{END searchform_option}
&nbsp;
{BEGIN searchform_text}
<input type=text size=20 {$searchfor_attrs}>
{END searchform_text}
&nbsp;
{BEGIN searchform_search}
<span class=buttonborder><input type=button class="button" value="##message SEARCH##" {$searchbutton_attrs}></span>
{END searchform_search}
&nbsp;		
{BEGIN searchform_showall}
<span class=buttonborder><input type=button class="button" value="##message SHOW_ALL##" {$showallbutton_attrs}></span>
{END searchform_showall}
</span>
{END searchform}
##endif##

&nbsp;&nbsp;&nbsp;
{BEGIN details_block}
<span id="details_block{$id}">##message DETAILS_FOUND##: {$records_found}&nbsp;</span>
{END details_block}
{BEGIN pages_block}
<span id="pages_block{$id}">##message PAGE1## {$page} ##message PAGE2## {$maxpages}</span>
{END pages_block}

&nbsp;&nbsp;&nbsp;
{BEGIN recordspp_block}
<span id="recordspp_block{$id}">
##message RECORDS_PP##:
<select {$recordspp_attrs}>
<option value="10" {$rpp10_selected}>10</option>
<option value="20" {$rpp20_selected}>20</option>
<option value="30" {$rpp30_selected}>30</option>
<option value="50" {$rpp50_selected}>50</option>
<option value="100" {$rpp100_selected}>100</option>
<option value="500" {$rpp500_selected}>500</option>
</select>
</span>
{END recordspp_block}
</div>
##endif##
</div>
{END search_records_block} 

{BEGIN recordcontrols_block}
<div>
<div id="recordcontrols_block{$id}" class="body3">
##if @TABLE.bAdd || @TABLE.bInlineAdd##
{BEGIN newrecord_controls}
<span id="newrecord_controls{$id}">
##if @TABLE.bAdd##
{BEGIN add_link}
<span class=buttonborder><input type=button class="button" value="##message ADD_NEW##" {$addlink_attrs}></span>
{END add_link}
##endif##

##if @TABLE.bInlineAdd##
{BEGIN inlineadd_link}
<span class=buttonborder><input type=button class="button" value="##message INLINE_ADD##" {$inlineaddlink_attrs} ></span>
{END inlineadd_link}
##endif##
</span>
{END newrecord_controls}
##endif##
{BEGIN record_controls}
<span id="record_controls{$id}">
##if @TABLE.bListVerticalLayout##
##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN selectall_link}
<span class=buttonborder><input type=button class="button" value="##message SELECT##" {$selectalllink_attrs}></span>
{END selectall_link}
##endif##
##endif##

##if @TABLE.bInlineEdit || @TABLE.bInlineAdd##
##if @TABLE.bInlineEdit##
{BEGIN editselected_link}
<span class=buttonborder ><input type=button class="button" value="##message EDIT_SELECTED##" {$editselectedlink_attrs}></span>
{END editselected_link}
##endif##
{BEGIN saveall_link}
<span class=buttonborder {$savealllink_span}><input type=button class="button" value="##message SAVE_ALL##" {$savealllink_attrs}></span>
{END saveall_link}
{BEGIN cancelall_link}
<span class=buttonborder {$canselalllink_span}><input type=button class="button" value="##message CANCEL_ALL##" {$cancelalllink_attrs}></span>
{END cancelall_link}
##endif##

##if @TABLE.bDelete##
{BEGIN delete_link}
<span class=buttonborder><input type=button class="button" value="##message DELETE_SELECTED##" {$deletelink_attrs}></span>
{END delete_link}
##endif##

##if @TABLE.bExportTo && @TABLE.arrKeyFields.len##
{BEGIN exportselected_link}
<span class=buttonborder><input type=button class="button" value="##message EXPORT_SELECTED##" {$exportselectedlink_attrs}></span>
{END exportselected_link}
##endif##

##if @TABLE.bPrinterFriendly && @TABLE.arrKeyFields.len##
{BEGIN printselected_link}
<span class=buttonborder><input type=button class="button" value="##message PRINT_SELECTED##" {$printselectedlink_attrs}></span>
{END printselected_link}
##endif##
</span>
{END record_controls}
</div>
<b class="xbottom"><b class="rb4 rb4_controls"></b><b class="rb3 rb3_controls"></b><b class="rb2 rb2_controls"></b><b class="rb1 rb1_controls"></b></b>
</div>
{END recordcontrols_block}

<div id="usermessage{$id}" class="message"></div>