<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} {height:auto;padding:10px;}
#search_block{$id} div {padding:5px 7px;}
#global_block{$id} {padding:5px 12px;/*min-height:800px;*/ border: 1px solid #516C81;}
#search_block_center{$id} {padding:3px 5px;text-align:center;}
#center_block{$id} {text-align:center;padding:4px;}
#center_block_caption{$id} {text-align:center;padding:4px;}
#left_block{$id} { position:absolute;width:202px; left:20px; overflow:visible; margin-top:10px}
#right_block{$id} { padding:10px 0px 0px 0px;}
/*{BEGIN shiftstyle_block}*/
#right_block{$id} { padding-left:220px;}
/*{END shiftstyle_block}*/
#toplinks_block{$id} {padding:0 5px 5px 5px;}
#toplinks_block{$id} > * {margin:4px 6px;vertical-align:middle;}
#menu_block{$id} {clear:left;padding:5px; width:auto;}
#details_block{$id}, #pages_block{$id}, #records_pp_block{$id} {white-space:nowrap;padding:5px 7px;text-align:center;}
#recordspp_block{$id} {padding:10px;}
#recordcontrols_block{$id} {padding:13px 10px 9px 10px;text-align:left}
#record_controls{$id} > *,#newrecord_controls{$id} > * {margin:2px 2px;vertical-align:middle}
.menuitem {padding:6px 18px 10px 13px}
.menuitem_active {padding:6px 18px 11px 13px}
.message_block {text-align:center;}
.grid_recordheader {padding:0 5px 5px}
.grid_recordheader * {margin:0px 5px; vertical-align:middle}
#grid_block{$id} {margin-top:10px;}
.headerlist_right2 *,.headerlist * {vertical-align:middle}
body{margin:0px;padding:0px;}
</style>
{END style_block}
<!--[if IE]>
{BEGIN iestyle_block}
<style>
#right_block{$id} { width:100%}
#global_block{$id} {height:95%}
</style>
{END iestyle_block}
<![endif]-->
</head>
<body marginheight=0 marginwidth=0 {$bodyattrs}>
{BEGIN body}
<div id="height100{$id}">
{$header}
<b class="xtop"><b class="xb1b"></b><b class="xb2b"></b><b class="xb3b"></b><b class="xb4b"></b></b>
{BEGIN toplinks_block}
<div id="toplinks_block{$id}" class="upeditmenu">
##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>
<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>
{END toplinks_block}
<div class="main_table_border2 main_table" id="global_block{$id}">
{BEGIN left_block}
<div id="left_block{$id}" >
    <b class="xtop"><b class="xb1b1"></b><b class="xb2b1"></b><b class="xb3b1"></b><b class="xb4b1"></b></b>
	<!-- MenuBegin -->
##include templates\lmenu.htm##
	<!-- MenuEnd -->	
	{BEGIN search_records_block}
	<div>
        ##if Fields[bSearch=1].len##
		{BEGIN searchform}
        <div class="menu_table" id="search_block{$id}">
            <div class="blackshade2" id="center_block{$id}">
                ##message SEARCH_FOR##:
            </div>
            <div class="blackshade">
                {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}
            </div>
            <div class="blackshade">
                {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}
            </div>
            <div class="blackshade">
                {BEGIN searchform_text}
                <input type=text size=20 {$searchfor_attrs}>
                {END searchform_text}
            </div>
            <div id="search_block_center{$id}" class="blackshade">
                {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}
            </div>
            <div class="blackshade2" id="details_block{$id}">
                {BEGIN details_block}
                <span>##message DETAILS_FOUND##: {$records_found}</span>
                {END details_block}
            </div>
            <div class="menu_text blackshade" id="pages_block{$id}">
                {BEGIN pages_block}
                <span>##message PAGE1## {$page} ##message PAGE2## {$maxpages}</span>
                {END pages_block}
            </div>
        </div>
		{END searchform}
        ##endif##
        <div class="menu_table2">
            {BEGIN recordspp_block}
            <div class="menu_text blackshade" id="recordspp_block{$id}" >
                ##message RECORDS_PP##:&nbsp;
                <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>
            </div>
            {END recordspp_block}
        </div>
	</div>
	{END search_records_block}
    </div>
{END left_block}
    <div id="right_block{$id}">
        
        ##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##

        <div class=list_table1>
        <div class=list_table>
        
        <div class=blackshade2 id="center_block_caption{$id}">
        ##@TABLE.strCaption hn##
        </div>
        {BEGIN recordcontrols_block}
        <div class=blackshade id="recordcontrols_block{$id}">
	##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##
		
		{$lookupSearchControls}
		
		{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}