// JavaScript Document
function lookup(inputString,stateid) 
		{
		if(inputString.length == 0) 
			{
			// Hide the suggestion box.
			$('#suggestions').hide();
			} 
		else 
			{
			if (stateid>0)
				{
				inputString=inputString+"VVV"+stateid;
				}
			$.post("_ajax/autocomplete.ajax.php", {queryString: ""+inputString+""}, 
			function(data)
				{
				if(data.length >0) 
					{
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
					}
				});
			}
		} // lookup

	function fill(thisValue) {
		
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}
	
	
/** WEATHER SEARCH **/
function weather_lookup(inputString) 
		{
		if(inputString.length == 0) 
			{
			// Hide the suggestion box.
			$('#weather_suggestions').hide();
			} 
		else 
			{
			inputString=inputString+"1WEATHER1";
			$.post("_ajax/autocomplete.ajax.php", {queryString: ""+inputString+""}, 
			function(data)
				{
				if(data.length >0) 
					{
					$('#weather_suggestions').show();
					$('#weather_autoSuggestionsList').html(data);
					}
				});
			}
		} // lookup

	function weather_fill(thisValue) {
		
		$('#weather_inputString').val(thisValue);
		setTimeout("$('#weather_suggestions').hide();", 200);
	}
	
function sm_weather_search(inputString)
	{		
	$.post("_ajax/sm_weather.ajax.php", {queryString: ""+inputString+""}, 
		function(data)
			{			
			if(data.length >0) 
				{				
				$('#SmWeather').html(data);
				}
			});
	
	}
	
function timeout_movediv(divid,thesize)
	{
	document.getElementById(divid).style.height=thesize+"px";
	}

	
function soft_div_resizer(divid,startsize,maxsize,increments)
	{	
	
	while(startsize<maxsize)
		{		
		startsize=startsize+increments;				
		
		var t=setTimeout("timeout_movediv(document.get"+divid+",50)",1000);
		}
	
	}