function controler_formulaire(){
	
	var nom=document.getElementById('nom');
	var representation=document.getElementById('representation');
	var nb_enfants=document.getElementById('nb_enfants');
	var nb_reductions=document.getElementById('nb_reductions');
	var nb_adultes=document.getElementById('nb_adultes');
	var nb_invitations=document.getElementById('nb_invitations');
	

	var erreurs=0;
	var message="";
	if (nom.value=="")
		{
		erreurs++;
		message+=" Nom" ;
		}
		
	if (representation.value==0)
		{
		erreurs++;
		message+=" Representation" ;
		}
		
	if ((nb_enfants.value==0) && (nb_reductions.value==0) && (nb_adultes.value==0) && (nb_invitations.value==0))
		{
		erreurs++;
		message+=" Nombre de billets" ;
		}
		
	if (erreurs==1)
		{
		message="Vous devez remplir obligatoirement la rubrique suivante:"+message;
			alert (message)	
		}
		
	if (erreurs>1)
		{
			message="Vous devez remplir obligatoirement les rubriques suivantes:"+message;
			alert (message)	
		}
		
	if  (erreurs==0)
		{

		submitForm(2)
			}
			
}


//<!--

        // The following function submits the data from the 'post-form' form
        // to a PHP script located at
        // 'http://www.dojoforum.com/demo-0.9/xhr/parse_form.php'
        // The PHP script simply outputs a string in the format of
        // 'Hello $name!', which is then put in the <div> w/ the id
        // of 'response'.
        //
        // NOTE: As with xhrGet, you can also use handleAs to accept
        // JSON objects in your load() function.
        function submitForm(etape) {
                dojo.xhrPost ({
                        // The page that parses the POST request
                        url: 'reservations.php?etape='+etape,
               
                        // Name of the Form we want to submit
                        form: 'reservation',
               
                        // Loads this function if everything went ok
                        load: function (data) {
                                // Put the data into the appropriate <div>
                                dojo.byId('scroll_3col_droite').innerHTML = data;
                        },
                        // Call this function if an error happened
                        error: function (error) {
                                console.error ('Error: ', error);
                        }
            });
        }
        //-->