
<br />
{if {$_CONF['info_row']['ajax_search']}}
<script language="javascript">
function AjaxSearch()
{
	var AjaxState = {ajaxSend : Wait};

	var data = {};

	data['keyword'] 	    = 	$("#keyword_id").val();
	data['username'] 	    = 	$("#username_id").val();
	data['section'] 	    = 	$("#section_id").val();
	data['tag'] 	        = 	$("#tag_id").val();
	data['search_only'] 	= 	$("#search_only_id").val();
	data['exactname'] 	    = 	$("#exactname_id").val();
	data['sort_order'] 	    = 	$("#sort_order_id").val();
	data['starteronly']     = 	$("#starteronly_id").val();

	data['ajax']		=	1;

	$.post("index.php?page=search&start=1",data,Success);
}

function Wait()
{
	$("#result").html("{$lang['Ongoing_process']}");
}

function Success(xml)
{
	$("#result").html(xml);
}

function Ready()
{
	$("#search_id").click(AjaxSearch);
}

$(document).ready(Ready);
-->
</script>
{/if}

{template}address_bar_part1{/template}
<a href="index.php?page=search&index=1">{$lang['Search_Engine']}</a>
{template}address_bar_part2{/template}

<form name="search" method="get">

<input type="hidden" name="page" value="search">
<input type="hidden" name="start" value="1">

<table border="0" cellspacing="1" width="98%" class="border" align="center">
	<tr align="center">
		<td class="thead1" width="60%" colspan="2">
		{$lang['Search_Engine']}
		</td>
	</tr>
	<tr>

        <td class="row1" width="25%">

          <fieldset class="fieldset" style="margin: 0px;">
			<legend><b>{$lang['Search_by_Keyword']}</b></legend>
			{$lang['Search_by_Key_Word']}<br />
        	<input type="text" name="keyword" id="keyword_id" size="35"/>
        	<br />
<select name="search_only" id="search_only_id">
<option value="1">{$lang['search_in_topics']}</option>
<option value="2">{$lang['Search_in_replies']}</option>
<option value="3">{$lang['Search_in_Titles']}</option>
</select>
</fieldset>
        </td>
		<td class="row1" width="25%">
		<fieldset class="fieldset" style="margin: 0px;">
		<legend><b>{$lang['Search_by_User_Name']}</b></legend>
		{$lang['Nickusername']}<br />
<input type="text" name="username" id="username_id" size="35"/>
<br />
					<select name="starteronly" id="starteronly_id">
					<option value="0" selected="selected">{$lang['search_for_all_posts']}</option>
					<option value="1">{$lang['search_for_all_replys']}</option>
					</select>
<input name="exactname" id="exactname_id" value="1" class="checkbox" type="checkbox" checked><label for="matchexact">{$lang['Match_Name']}</label>
</fieldset>
		</td>

	</tr>
	</table>
	<br />
			<table width="98%" border="0" cellspacing="1" class="border" align="center">
						<tr align="center">
					<td class="thead1">
				  <span class="switch">
                 <a onclick="switchMenuNone('searching');"><img border="0" alt=""  src="{$image_path}/collapse_b.gif" /></a>
                   </span>
						{$lang['Search_Options']}
						</td>
					</tr>
			   </table>
	<table border="0" cellspacing="1" width="98%" class="border" align="center" id="searching">
	<tr>

        <td class="row1" width="50%">
        <fieldset class="fieldset" style="margin: 0px;">
				<legend><b>{$lang['Search_Forums']}</b></legend>
        	<select style="width: 100%;" name="section" id="section_id" size="13" multiple="multiple">
               <option selected="selected" value="all">{$lang['All_Forums']}</option>
        		{Des::foreach}{forums_list}{forum}
        		{if {$forum['parent']} == 0}
				<option value="{$forum['id']}">- {$forum['title']}</option>
				{else}
				<option value="{$forum['id']}">-- {$forum['title']}</option>
				{/if}
				{if {$forum['parent']} != 0}
		       {if {$forum['linksection']} != '1'}
				 {if {$forum['is_sub']}}
					{$forum['sub']}
				{/if}
					{/if}
	            {/if}
				{/Des::foreach}
			</select>
			</fieldset>
		</td>
		<td class="row1" width="50%" valign="top">
 <table border="0" width="100%">
	<tr>
		<td>
				 <fieldset class="fieldset" style="margin: 0px;">
		<legend><b>{$lang['Search_By_Tgs']}</b></legend>
<b>{$lang['tag_word']}</b>
		<br />
	<input type="text" name="tag" id="tag_id" size="35"/>
	</fieldset>
	<br />
		</td>
	</tr>
	</table>
<br />
<br />
 <fieldset class="fieldset" style="margin: 0px;">
<legend><b>{$lang['Sort_results_by']}</b></legend>
<input name="sort_order" id="sort_order_id" class="radiobutton" value="DESC" checked type="radio"><label for="desc">
 {$lang['sort_desc']}</label><br />
<input name="sort_order" id="sort_order_id" class="radiobutton" value="ASC" type="radio"><label for="asc">
{$lang['sort_asc']}</label>
</fieldset>
		</td>

	</tr>
	<tr>
		<td class="darkrow" width="100%" colspan="2">
<div align="center">
{if {$_CONF['info_row']['ajax_search']}}
	<input type="submit" value="{$lang['Go_Search']}" name="search">
{else}
	<input type="submit" value="{$lang['Go_Search']}" name="search">
{/if}
</div></td>

	</tr>
</table>


</form>

{if {$_CONF['info_row']['ajax_search']}}
<br />
<div id="result">
</div>
{/if}

{template}jump_forums_list{/template}
<br />
<br />
<br />

<br />