window.addEvent('domready', function() {
    var inputWord = $('recherche');
	new Autocompleter.Request.HTML(inputWord, '/ajax/recherche_rapide.php', {
		'indicatorClass': 'autocompleter-loading', // class added to the input during request
		'postVar': 'recherche'
	});
});

function afficheNewsletter() {
	var option = {  url: "/ajax/affiche_newsletter.php",
					method : 'get' ,
					update: $('div_newsletter2'),
					success: showDivAjax('div_newsletter'),
					evalScripts: true
	};
	var requestPanier= new Request.HTML( option );
	requestPanier.send();
}

function showDivAjax(div) {
	for(i=1;i<=3;i++){
		$(div+i).style.display='block';
		$(div+i).style.visibility='visible';
	}
}

function cacheDivAjax() {
	for(i=1;i<=3;i++){
		$(div+i).style.display='none';
		$(div+i).style.visibility='hidden';
	}
	window.location.reload();
}
