function pageSearch(val){
	
	var options = {
		parameters: {val: val},
		onSuccess: function(rtn){
			var response = rtn.responseText;
	      	if (response == 'error') {alert('produit inexistant');}
			
			else {alert(response);window.location = response;}
    	}
	}
	new Ajax.Request('ajax/pagesearch.php', options);
}