/*	var searchControl window.onload = function()
				{
					onLoad();
				} */
		
		function onLoad()
		 {		var searchControl;
				// Create a search control
				searchControl = new GSearchControl();

				// add a regular web search, with a custom label 'web'
				////var webSrearch = new GwebSearch();
				////webSrearch.setUserDefinedLabel("web");
				////searchControl.addSearcher(webSrearch);

				// add a site-limited web search, with a custom label
				var siteSearch = new GwebSearch();
				siteSearch.setUserDefinedLabel("Cirrus Global Solutions");
				siteSearch.setSiteRestriction("www.cirrusgs.com");
				searchControl.addSearcher(siteSearch);

/*		
				/// To Expand the Search Results use the following method
				var options = new GsearcherOptions();
				options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN); 
				searchControl.addSearcher(new GwebSearch(), options);

*/



			/*	// add a blog search, with a custom label
				var blogsSrearch = new GblogSearch();
				blogsSrearch.setUserDefinedLabel("weblogs");
				searchControl.addSearcher(blogsSrearch); */

				// setting the draw mode for the Google search
				var drawOptions = new GdrawOptions();
				// use tabbed view
				drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
				// set the input field (instead of the default one)
				drawOptions.setInput(document.getElementById('query'));
				// actually write the needed markup to the page
				searchControl.draw(document.getElementById("searchcontrol"), drawOptions);
				// set the google logo container
				//GSearch.getBranding(document.getElementById("branding"));
				}  
				var query = null;
				document.onkeydown = function(event) { kd(event); };
				function kd(e)
				 {
					// make it work on  IE and FireFox
					if (!e) e = event;
					// use ESC to clear the search results
					if (e.keyCode == 27)
						searchControl.clearAllResults();
					// get the input field
					if (query == null)
						query = document.getElementById('query');
					// and move the focus in there
					query.focus();
				}
		
