/*
* Author:      Marco Kuiper (http://www.marcofolio.net/)
*/
google.load("jquery", "1.3.1");
google.setOnLoadCallback(function()
{
	
	var cssObj = { 
		'box-shadow' : '#888 5px 10px 10px', 
		'-webkit-box-shadow' : '#888 5px 10px 10px',
		'-moz-box-shadow' : '#888 5px 10px 10px'}; 
		$("#suggestions").css(cssObj);
	
	// Fade out the suggestions box when not active
	 $("input").blur(function(){
	 	$('#suggestions').fadeOut();
	 });
	 
	// Fade out the suggestions box when not active
	 $("input").blur(function(){
	 	$('#suggestions1').fadeOut();
	 }); 
	 
});

function lookup(inputString) {
	if(inputString.length == 0) {
		$('#suggestions').fadeOut(); // Hide the suggestions box
	} else {
		$.post("rpc.asp", {queryString: ""+inputString+""}, function(data) { // Do an AJAX call
			$('#suggestions').fadeIn(); // Show the suggestions box
			$('#suggestions').html(data); // Fill the suggestions box
		});
	}
}

function lookup1(inputString1) {
	if(inputString1.length == 0) {
		$('#suggestions1').fadeOut(); // Hide the suggestions box
	} else {
		$.post("rpc_commo.asp", {queryString: ""+inputString1+""}, function(data) { // Do an AJAX call
			$('#suggestions1').fadeIn(); // Show the suggestions box
			$('#suggestions1').html(data); // Fill the suggestions box
		});
	}
}
