<table class="BodyPanel" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td class="Heading"><img src="%%Config.ImagePath%%/SearchResult.gif" align="left" hspace="5" width="16" height="16" alt="">%%LNG_hpSearchTheKB%%</td>
		<td class="Heading"><img src="%%Config.ImagePath%%/Category/1.gif" align="left" hspace="5" width="16" height="16" alt="">%%LNG_hpBrowseByCategory%%</td>
	</tr>
	<tr>
		<td class="NavPanel" valign="top">
			<form name="frmSearch" onSubmit="return SendSearch()" method="POST" action="%%GLOBAL_SearchFormAction%%">
			<input name="Query" id="livesearch" type="text" style="width:250px;" value="%%GLOBAL_Query%%"  onKeypress="liveSearchStart()" onblur="setTimeout('closeResults()',2000);"  />
			<input type="submit" value="%%LNG_hpSearch%%" />
			<div id="LSResult" style="display: none;"><div id="LSShadow"></div></div><br>
			<a href="%%GLOBAL_pathToKB%%/search.php?as=1" class="SmallLink">[%%LNG_hpAdvancedSearch%%]</a>
			</form>
		</td>
		<td class="NavPanel" valign="top">
			<form name="frmCat" onSubmit="return SendCategory()" method="GET" action="">
			<select name="navCat" id="navCat" style="width:200px">
				<option value='0'>%%LNG_hpSelectCategory%%</option>
				%%GLOBAL_CategoryOptions%%
			</select>
			<input type="submit" value="%%LNG_hpGo%%" />
			</form>
		</td>

	</tr>
</table>

<script type="text/javascript" language="javascript">

	baseUrl = '%%GLOBAL_pathToKB%%';
	searchUrl = '%%GLOBAL_SearchUrl%%';
	categoriesUrl = '%%GLOBAL_CategoriesUrl%%';

	function SendSearch()
	{
		var query = document.getElementById("livesearch");
		if(query.value.length == 0) {
			alert("%%LNG_hpPleaseEnterSearchTerm%%");
			query.focus();
			query.select();
			return false;
		} else {
			return liveSearchSubmit();
		}
	}

	function SendCategory()
	{
		var cat = document.getElementById("navCat");

		if(cat.selectedIndex == 0)
		{
			alert("%%LNG_hpPleaseChooseCategory%%");
			cat.focus();
			return false;
		}
		else
		{
			document.location.href = '%%GLOBAL_pathToKB%%' + categoriesUrl + cat.options[cat.selectedIndex].value;
			return false;
		}
	}

</script>
