<div class="ilMainMenuSearch">
<form class="ilMainMenuSearch" action="{FORMACTION}" method="post" target="_top">
<div style="margin-top:3px; position:absolute; text-align:left; right:23px;">
<table cellpadding="0" cellspacing="0" datatable="0"><tr><td>
	<!-- block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
		-moz-inline-stack for FF2
		zoom 1; *display:inline for IE6 & 7 -->
	<div style="margin-left: width:150px; display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;" id="myAutoComplete">
		<label class="ilAccHidden" for="main_menu_search">{BTN_SEARCH}</label>
		<input style="width:150px; font-size:80%" type="text" class="ilMainMenuSearch" id="main_menu_search" name="queryString" />
		<input type="hidden" name="root_id" value="{CONT_REF_ID}" />
	    <div class="yui-skin-sam" style="font-size: 75%;" id="{ID_AUTOCOMPLETE}"></div>
	</div>
	</td>
	<td><input style="margin-left:5px;" class="ilMainMenuSearchSubmit" type="submit" name="cmd[remoteSearch]" value="{BTN_SEARCH}" /></td>
</tr></table>
</div>
	<script type="text/javascript">
		ilAddOnLoad(
			function()
			{
				// Define the schema of the delimited results
				var responseSchema = ["response.results","term"];
				
				// source script uri
				// any existing parameters (after a '?') are stripped off
				// and passed seperately to the DataSource instance
				var aUri = "{YUI_DATASOURCE}";
				var additionalArguments = "";
				if (aUri.indexOf('?'))
				{
					additionalArguments = aUri.substr(aUri.indexOf('?')+1);
					aUri = aUri.substr(0, aUri.indexOf('?'));
				}
				
				// Use an XHRDataSource
				var oDS = new YAHOO.widget.DS_XHR(aUri , responseSchema);
				
				// Set the responseType
				oDS.responseType = YAHOO.widget.DS_XHR.TYPE_JSON;
				
				// set arguments
				oDS.scriptQueryAppend = additionalArguments;
				
				// Enable caching
				oDS.maxCacheEntries = 5;
				
				// Instantiate the AutoComplete
				var oAC = new YAHOO.widget.AutoComplete("main_menu_search", "{ID_AUTOCOMPLETE}", oDS);
				oAC.minQueryLength = 2;
				oAC.queryDelay = 0.5;
				oAC.autoHighlight = false;
				oAC.responseType = YAHOO.widget.DS_XHR.TYPE_JSON;
				// compatibility for IE < 7
				oAC.useIFrame = true; 
			}
		);
	</script>
</form>
</div>