<script type="text/javascript">
	//<![CDATA[
	/* 
	 * This example is from the book _Ajax: The Definitive Guide_ by Anthony T. Holdener III.
	 * Written by Anthony T. Holdener III.  Copyright (C) 2008 O'Reilly Media, Inc.
	 * You may study, use, modify, and distribute this example for any purpose.
	 * This example is provided WITHOUT WARRANTY either expressed or implied.
	 */
	/* Example 16-7. Using the GSearchControl control. */

	/**
	 * This function, body_onload, is called when the page finishes loading and
	 * creates and draws a /GSearchControl/, adding searchers and executing the
	 * search for "The Matrix".
	 */
	function body_onload( ) {
		/* Create a search control */
		var searchControl = new GSearchControl( );

		/*
		 * Create a draw options object so that we can position the search
		 * form root
		 */
		var options = new GdrawOptions( );
		options.setSearchFormRoot(document.getElementById('searchForm'));

		/* Populate with searchers */
		searchControl.addSearcher(new GwebSearch( ));
		searchControl.addSearcher(new GvideoSearch( ));
		searchControl.addSearcher(new GblogSearch( ));

		searchControl.draw(document.getElementById('searchResults'), options);
		searchControl.execute('The Matrix');
	}
	GSearch.setOnLoadCallback(body_onload);
	//]]>
</script>