{%!HTML-FRAGMENT%}
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{%?CSS-FILENAME%}<link rel="stylesheet" type="text/css" href="{%@%}" />{%ENDIF%}
<title> {%?QUERY-STRING%}Search results for "{%@%}"{%ELSE%}Awasu search{%ENDIF%} </title>
</head>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<body onLoad="document.form.query.focus()">

<img src="{%LOGO-URL%}" id="logo" />
{%ENDIF%}

<form name="form" action="/search/query" method="get" class="awasu-searchForm">
<table>
    <tr>
        <td> Search for: </td>
        <td colspan="2">
            <input type="text" name="query" size="40" maxlength="250" value="{%QUERY-STRING% encode=sgml chars=\"}" />
            <input type="submit" value="  Go  " />
        </td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td class="options">
            <input type="checkbox" {%?SLD-CHECKED%}checked{%ENDIF%} name="slD" value="1">Descriptions</input>
            <input type="checkbox" {%?SLT-CHECKED%}checked{%ENDIF%} name="slT" value="1">Titles</input>
            <input type="checkbox" {%?SLU-CHECKED%}checked{%ENDIF%} name="slU" value="1">URL's</input>
            <p style="margin-top:0">
                <input type="checkbox" {%?ADVANCED-SYNTAX%}checked{%ENDIF%} name="advsyn" value="1"><span style="font-size:80%">Enable advanced syntax</span></input>
            </p>
        </td>
        <td align="right">
            <select name="feedItemDescriptionFormat">
                <option {%?FIDF-FULLCONTENT-SELECTED%}selected{%ENDIF%} value="full">Full content</option>
                <option {%?FIDF-EXCERPT-SELECTED%}selected{%ENDIF%} value="excerpt">Excerpt</option>
                <option {%?FIDF-PLAINTEXT-SELECTED%}selected{%ENDIF%} value="plaintext">Plain text</option>
                <option {%?FIDF-NONE-SELECTED%}selected{%ENDIF%} value="none">None</option>
            </select>
        </td>
    </tr>
</table>
{%?API-TOKEN%}<input type="hidden" name="token" value="{%@%}" />{%ENDIF%}
<input type="hidden" name="format" value="html" />
<input type="hidden" name="pageSize" value="10" />
{%?HTML-FRAGMENT%}<input type="hidden" name="htmlFragment" value="1" />{%ENDIF%}
</form>

{%?QUERY-STRING%}
<div class="awasu-searchResults">

<div class="header">
{%?RESULT-COUNT-MSG%}
    {%@%} 
    {%?PAGE-COUNT-MSG%} <br/> {%PAGE-COUNT-MSG%} {%ENDIF%}
{%ENDIF%}
</div>

<br clear="all" />

<div class="results">

{%?NO-SEARCH-RESULTS%}
    No results were found.
{%ELSE%}
    {%REPEAT% SearchResults}
    <div class="result">
    <div class="title">
        <a href="{%OPEN-ITEM-URL%}" onFocus="javascript:this.blur()"><img src="{%ITEM-IMAGE-URL%}" border="0" /></a>
        <b>{%ITEM-SCORE%}</b>
        <a href="{%ITEM-METADATA% url encode=href}">{%ITEM-METADATA% name!}</a>
    </div>
    <div class="content"> {%ITEM-METADATA% description} </div>
    <div class="details"> {%ITEM-METADATA% timestamp} - <a href="{%OPEN-CHANNEL-URL%}">{%CHANNEL-METADATA% name} </a> </div>
    </div>
    {%/REPEAT%}
{%ENDIF%}

</div>

<center>
<table class="footer"><tr>
<td width="40"> {%?PREV-PAGE-URL%} <a href="{%@%}" onFocus="javascript:this.blur()"><img src="{%PREV-PAGE-IMAGE-URL%}" border="0" /></a> {%ENDIF%} </td>
<td> {%?RESULT-COUNT-MSG%}{%@%}{%ENDIF%} {%?PAGE-COUNT-MSG%}<br/>{%@%}{%ENDIF%} </td>
<td width="40"> {%?NEXT-PAGE-URL%} <a href="{%@%}" onFocus="javascript:this.blur()"><img src="{%NEXT-PAGE-IMAGE-URL%}" border="0" /></a> {%ENDIF%} </td>
</tr></table>
</center>

</div> <!-- awasu-searchResults -->
{%ENDIF%} 

{%!HTML-FRAGMENT%}
</body>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

</html> {%SET-CONTENT-TYPE% text/html}
{%ENDIF%}
