function btnSearch()
		{
			document.searchform.search.value = trim(document.searchform.search.value);
			if (document.searchform.search.value == "")
			{
				alert("Please enter a search term.");
				return false;
			}

			if (document.searchform.searchfor.value == "")
			{
				alert("Please select a search area.");
				return false;
			}

			document.searchform.submit();
			return true;
		}

		$(function() {
		  var timer;
		  $("input#inputString").keyup(function() {
			clearTimeout(timer);
			var ms = 800; // milliseconds
			var val = this.value;
			timer = setTimeout(function() {
			  lookup(val);
			}, ms);
		  });

		// Fade out the suggestions box when not active
		 $("#inputString").blur(function(){
			$('#suggestions').fadeOut();
		 });
		});

		function lookup(inputString) {
			if(inputString.length == 0) {
				$('#suggestions').fadeOut(); // Hide the suggestions box
			} else {
					$.post("/searchgadget.asp?"+inputString, {queryString: ""+inputString+""}, function(data) { // Do an AJAX call
						$('#suggestions').fadeIn(); // Show the suggestions box
						$('#suggestions').html(data); // Fill the suggestions box
					});
			}
		}
