window.onload = function() {
	for(var i = 0, l = document.getElementsByTagName('input').length; i < l; i++) {
		if(document.getElementsByTagName('input').item(i).type == 'text') {
			document.getElementsByTagName('input').item(i).setAttribute('autocomplete', 'off');
		};
	};
};
function lookup(inputString) {
	if(inputString.length == 0) {
		// Hide the suggestion box.
		$('#suggestions').hide();
	} else {
		$.post("search.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);
	$("#inputString").focus();
}
$("#inputString").keydown(function(e){
	if (e.keyCode == 13) {
		$("#formrech").submit();
	}
});

// Accessoires
function ChangeUrl(formulaire) {
   if (formulaire.ListeUrl.selectedIndex != 0){
	  location.href = formulaire.ListeUrl.options[formulaire.ListeUrl.selectedIndex].value;
   }
} 


