{TEMPLATE top}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
        <title>{IF $CNCAT[page][cid] > 0}{cn_str($CNCAT[page][cat][title])} / {ENDIF}{cn_str($CNCAT[page][title])}</title>
        <meta name="Content-Type" content="text/html; charset={$CNCAT[lang][charset]}">
        <link rel="stylesheet" type="text/css" media="all" href="{$THEMEURL}style.css">
        {IF $CNCAT[page][keywords]}<meta name="keywords" content="{cn_str($CNCAT[page][keywords])}">{ENDIF}
        {IF $CNCAT[page][description]}<meta name="description" content="{cn_str($CNCAT[page][description])}">{ENDIF}
    </head>
    <body>
{/TEMPLATE}

{TEMPLATE bottom}
    {IF $CNCAT[banner][page_bottom]}
        <br>
        {$CNCAT[banner][page_bottom]}
    {ENDIF}
    <br>
    <!-- Copyright -->
    {cn_copyright(1)}
    <!-- /Copyright -->
    </body>
</html>
</html>  
{/TEMPLATE}

{TEMPLATE menu}
    <!-- Menu -->
    <table width="100%">
        <tr>
            <td><h3>{cn_str($CNCAT[config][catalog_title])}</h3></td>
            <td align="right">
                <a href="{$CNCAT[abs]}">{$CNCAT[lang][menu_main]}</a> |
                {IF !$CNCAT[config][add_disable]}<a href="{$CNCAT[abs]}cncat_add.php"><strong>{$CNCAT[lang][menu_add_item]}</strong></a> |{ENDIF}
                {IF $CNCAT[config][add_article_enable]}<a href="{$CNCAT[abs]}cncat_add_article.php"><strong>{$CNCAT[lang][menu_add_article]}</strong></a> |{ENDIF}
                <a href="{$CNCAT[abs]}cncat_admin">{$CNCAT[lang][menu_admin]}</a> |
                <a href="{$CNCAT[abs]}cncat_map.php">{$CNCAT[lang][menu_map]}</a>
            </td>
        </tr>
    </table>
    <!-- /Menu -->
    {IF $CNCAT[banner][page_top]}
        <br>
        {$CNCAT[banner][page_top]}
    {ENDIF}
{/TEMPLATE}

{TEMPLATE searchform}
    <!-- Search form -->
    <br>
    <form action="{$CNCAT[abs]}cncat_search.php" method="get">
    <table width="100%"><tr>
        <td align="right">
            <input type="text" name="q" size="45" class="text" value="{cn_str($CNCAT[page][search_query])}" />
            <input type="submit" value="{$CNCAT[lang][search_submit]}" class="submit" />
        </td>
    </tr></table>
    </form>
    <!-- /Search form -->
{/TEMPLATE}

{TEMPLATE sort_top}
            <!-- Sort -->
            <p align="right">
                {$CNCAT[lang][sort_by]}: 
{/TEMPLATE}

{TEMPLATE sort}
            {IF $CNCAT[page][sort_order] == $CNCAT[sort][id]}
                <strong>{$CNCAT[sort][title]}</strong>
            {ELSE}
                <a href="{cn_str($CNCAT[sort][url])}">{$CNCAT[sort][title]}</a>
            {ENDIF}
{/TEMPLATE}

{TEMPLATE sort_delim} | {/TEMPLATE}

{TEMPLATE sort_bottom}
            </p>
            <!-- /Sort -->
{/TEMPLATE}

{TEMPLATE pagenav_top}
    <!-- Pagenav -->
	<form action="" onsubmit="
        if ((this.elements[0].value-1) &gt; {$CNCAT[pagenav][pagecount]} || this.elements[0].value &lt; 1) 
        {
            alert('{$CNCAT[lang][wrong_page_number]}');
            return false;
        } 
        url='{$CNCAT[pagenav][urltemplate]}'; 
        location.href = url.replace(new RegExp('{PAGE}', ''), this.elements[0].value-1);
        return false;
    " method="get">
    <center>
    <table class="pagenav">
    <tr>
{/TEMPLATE}

{TEMPLATE pagenav_curpage}
        <td><input name="p" type="text" size="2" value="{$CNCAT[pagenav][curpage]}" /></td>
{/TEMPLATE}

{TEMPLATE pagenav_pageitem}
        <td><a href="{$CNCAT[pagenav][url]}">{$CNCAT[pagenav][curpage]}</a></td>
{/TEMPLATE}

{TEMPLATE pagenav_delim1}<td>&nbsp;</td>{/TEMPLATE}

{TEMPLATE pagenav_delim2}<td>&nbsp;&nbsp;...&nbsp;&nbsp;</td>{/TEMPLATE}

{TEMPLATE pagenav_bottom}
    </tr>
    </table>
    </center>
    </form>
    <!-- /Pagenav -->
{/TEMPLATE}

{TEMPLATE filters_top}
    <!-- Filters -->
    <form action="?">
    <table><tr>
{/TEMPLATE}

{TEMPLATE filter (FILTER[title])}{/TEMPLATE}

{TEMPLATE filter_top}
        <td><strong>{cn_str($CNCAT[filter][title])}</strong><br>
{/TEMPLATE}

{TEMPLATE filtval (FILTVAL[id,title])}
            <label><input type="checkbox" name="f{$CNCAT[filtval][id]}" value="1" onclick="form.submit()" {if $CNCAT[filtval][_checked]}checked="checked"{endif} /> {$CNCAT[filtval][title]}</label>
{/TEMPLATE}

{TEMPLATE filtval_delim}{/TEMPLATE}

{TEMPLATE filter_bottom}
        </td>
{/TEMPLATE}

{TEMPLATE filters_delim}<td width="1" style="border-left: 3px solid #E0E0E0;"></td>{/TEMPLATE}

{TEMPLATE filters_bottom}
    {if $CNCAT[page][filter_used]}
        {INCLUDE filters_delim}
        <td>
            <input type="reset" onClick="javascript:for (i=0;i<form.length;i++){form.elements[i].checked=0};form.submit();">
        </td>
    {ENDIF}
    </tr>
    </table>
    {IF $CNCAT[config][url_style]==0}
        <input type="hidden" name="c" value="{$CNCAT[page][cid]}" />
        <input type="hidden" name="s" value="{$CNCAT[page][sort_order]}" />
        <input type="hidden" name="p" value="{$CNCAT[page][page_num]}" />
    {ENDIF}
    </form>
    <!-- /Filters -->
{/TEMPLATE}

{TEMPLATE itemtypes_top}
	<p align="right">
        {$CNCAT[lang][itemtypes_show]}:
{/TEMPLATE}

{TEMPLATE itemtype}
        {IF $CNCAT[itemtype][id] == $CNCAT[page][item_type]}
            <strong>{cn_str($CNCAT[itemtype][title])}</strong>
        {ELSE}
            <a href="{cn_str($CNCAT[itemtype][url])}">{cn_str($CNCAT[itemtype][title])}</a>
        {ENDIF}
{/TEMPLATE}

{TEMPLATE itemtypes_delim} | {/TEMPLATE}

{TEMPLATE itemtypes_bottom}
    </p>
{/TEMPLATE}
