<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;}
#mastertable_block{$id} {margin-left:50px;margin-top:10px}
#toplinks_block{$id} {width:100%; text-align:right;padding:3px}
#toplinks_block{$id} * {padding:0px 10px;}
#left_block{$id} { position:absolute;width:200px; left:10px; overflow:visible;}
#search_records_block{$id} {width:100%;}
#search_records_block{$id} > * {vertical-align:middle;}
#search_records_block{$id} select {margin:0px 0px;}
#login_block{$id},#languages_block{$id} {padding:10px; margin-bottom:3px}
#login_block{$id} div {margin-left:0px; padding:5px 0px;}
#menu_block{$id} {margin-bottom:3px;width:auto;}
##if @BUILDER.arrLanguages.len>1 || @BUILDER.bCreateLoginPage || CreateMenu##
/*{BEGIN shiftstyle_block}*/
#records_block{$id} {margin-left:203px;}
/*{END shiftstyle_block}*/
##endif##
#recordcontrols_block{$id} {padding:10px;}
#record_controls{$id} > *,#newrecord_controls > * {margin:2px;vertical-align:middle;}
#grid_block{$id} {margin-top:2px;}
.grid_recordheader {padding:0 5px 5px}
.grid_recordheader * {margin:0px 5px; vertical-align:middle}
form#frmAdmin{$id} {display:inline;}
body{margin:0px;padding:0px;}
</style>
{END style_block}
</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 id="toplinks_block{$id}">
##if @TABLE.bPrinterFriendly##
{BEGIN print_link}
<a target="_blank" href="##@TABLE.strShortTableName h##_print.##@ext##" class="tablelinks3">##message PRINTER_FRIENDLY##</a>
{END print_link}
{BEGIN printall_link}
##if @TABLE.bPrintAll##
<a target="_blank" href="##@TABLE.strShortTableName h##_print.##@ext##?all=1" class="tablelinks3">##message PRINT_ALL_PAGES##</a>
##endif##
{END printall_link}
##endif##

##if Fields[bAdvancedSearch=1].len##
{BEGIN asearch_link}
<a href="##@TABLE.strShortTableName h##_search.##@ext##" class="tablelinks3">##message ADVANCED_SEARCH##</a>
{END asearch_link}
##endif##

##if @TABLE.bExportTo##
{BEGIN export_link}
<a target="_blank" href="##@TABLE.strShortTableName h##_export.##@ext##" class="tablelinks3">##message EXPORT_RESULTS##</a>
{END export_link}
##endif##

##if @TABLE.bImport##
{BEGIN import_link}
<a href="##@TABLE.strShortTableName h##_import.##@ext##" class="tablelinks3">##message IMPORT##</a>
{END import_link}
##endif##
</div>
{END toplinks_block}

{BEGIN search_records_block} 
<div id="search_records_block{$id}" class="linedownbody main_table2 toplist">
<img src="include/img/arrow_topmenu.gif" align="absmiddle">
##if Fields[bSearch=1].len##
{BEGIN searchform}
<span id="searchform{$id}" align="absmiddle">
<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;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{BEGIN details_block}
<span>##message DETAILS_FOUND##: <b>{$records_found}</b>&nbsp;&nbsp;&nbsp;&nbsp;</span>
{END details_block}
{BEGIN pages_block}
<span>##message PAGE1## <b>{$page}</b> ##message PAGE2## <b>{$maxpages}</b></span>
{END pages_block}

&nbsp;&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>
{END search_records_block} 

<div id="left_block{$id}">
##if @BUILDER.arrLanguages.len>1##
{BEGIN languages_block}
<div id="languages_block{$id}" class="blackshade toplist">
<!---language-->
<b>##message LANGUAGE ##:</b>&nbsp;&nbsp;&nbsp;&nbsp;
	<select {$langselector_attrs}>
	##foreach @BUILDER.arrLanguages as @lang##
		<option value="##@lang h##" {$##@lang g##_langattrs}>##@lang h##</option>
	##endfor##
	</select>
</div>
{END languages_block}
##endif##

##if @BUILDER.bCreateLoginPage##
{BEGIN security_block}
<div id="login_block{$id}" class="blackshade toplist">
	<div style="font-weight:normal;">##message LOGGED_AS ##&nbsp;<b>{$username}</b></div>
	<br><a class="tablelinks" href="login.##@ext##?a=logout">##message LOG_OUT##</a>
<!-- Permissions -->
##if @BUILDER.bDynamicPermissions##
 ##if !IsAdminTable(@TABLE)##
  {BEGIN adminarea_link}
	<br><a class="tablelinks" href="admin_rights_list.##@ext##">##message AA_ADMINAREA##</a>
  {END adminarea_link}
 ##else##
  {BEGIN exitadminarea_link}
	<br><a {$exitaalink_href} class="tablelinks">##message AA_EXIT_ADMINAREA##</a>
  {END exitadminarea_link}
 ##endif##
##endif##
##if @BUILDER.Registration.bChangePwdPage && @BUILDER.nLoginMethod == SECURITY_TABLE##
{BEGIN changepwd_link}
	<br><a class="tablelinks" href="changepwd.##@ext##">##message CHANGE_PASSWORD ##</a>
{END changepwd_link}
##endif##
</div>
{END security_block}
##endif##
<!-- MenuBegin -->
##include templates\lmenu.htm##
<!-- MenuEnd -->
</div>

<div id="records_block{$id}" class="linedownbody">
{BEGIN recordcontrols_block}
<div id="recordcontrols_block{$id}" class="main_table2" >

##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>
{END recordcontrols_block}
<div class="message" id="usermessage{$id}" style="background:white;"></div>
