// JavaScript NEWSLETTER

	function newsletterSubscribe(){
		var theEmail = $F('newsletterEmail');
		var p=theEmail.indexOf('@');

		if( (theEmail == '') ||  (p==-1) ) {
			alert("email invalide !");
			return;
		}
		
		var url = 'inscriptionNewsletter_ajaxAction.php';
		var parametres = 'newsletterEmail=' + theEmail;
		
		var myAjax = new Ajax.Request(
			url,
			{
				 method: 'get',
				 parameters: parametres,
				 onCreate: loadingFn,
				 onComplete: afficheReponse
			}
		)
	}
	
	function loadingFn ()
	{ 
			$('loaderForNewsletter').style.display = 'inline';
			$('btnForNewsletter').style.display = 'none';
	
	}
	
	function afficheReponse() {
				$('newsletterForm').style.display = 'none';
				$('newsletterConfirmation').style.display = 'block';
	}
