<!--//

function pulldown(url) {
        if (url != "") {
        window.location=url
        }
}

function autocomplete() {
    new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "/localeater/search", {paramName: "q", minChars: 1});
  }


function isblank(s) {
	for(var i = 0; i < s.length; i++) {
		var c = s.charAt(i);
		if ((c != ' ') && (c != '\n') && (c != '\t')) {
			return false;
		}
	}
	return true;
}

function space_to_plus(s) {
	return s.replace(/\s/g, "-" );
}

function formcheck() {
	var q = document.search.q.value;
	var city = document.search.city.value;
	var redirectURL = 'http://www.localeater.com/search/' + city + '/'  + space_to_plus(q);

	if ((q == null) || (q == "") || isblank(q)) {
		alert("Please enter a word to look up.");
		jump2form();
		return false;
	}
	location.href = redirectURL;
	return false;
}


//-->
