function initFormulaire(index) {

	var btn = 'switch_'+index;
	var goform = 'form_nd_'+index;
	var sendform = 'form_telechargement_'+index;
	var xhr_response = 'xhr_form_'+index;
	var click_ajout = $(btn);
	var slide = new Fx.Slide(goform);
	click_ajout.style.display = "block";
	slide.hide();
	$(click_ajout).addEvent('click',function(e) {
		slide.toggle();
		e.stop();
	});			
	
	$(sendform).addEvent('submit', function(e) {
		//Prevents the default submit event from loading a new page.
		e.stop();
		
		var verif = /^[a-zA-Z0-9-._]+@[a-zA-Z0-9-.]{2,}[.][a-zA-Z]{2,3}$/;
		var mail = $(sendform).getElement('input.email_formcontrole');
		if(mail.value != '') {
			if (verif.exec(mail.value) == null)
			{
				alert(_ERREUR_EMAIL_VALIDE);
				mail.focus();
				return false;
			}
		} else if(mail.value == '') {
			alert(_ERREUR_EMAIL);
			mail.focus();
			return false;
		}
		
		//Empty the log and show the spinning indicator.
		//var log = $('xhr_form').empty();
		//Set the options of the form's Request handler. 
		//("this" refers to the $('myForm') element).
		this.set('send', {onComplete: function(response) { 
			$(xhr_response).set('html', response);
			//alert(response)
		}});
		//Send the form.
		this.send();
	});
	
}

