function checkForm(form){
    if (form.nb_participants.value == ""){
		alert('Veuillez entrez un nombre de participants');
		form.nb_participants.focus();
		return false;
    }
    if (form.societe.value == ""){
		alert('Veuillez entrer le nom de votre sociŽtŽ');
		form.societe.focus();
		return false;
    }
    if (form.adresse.value == ""){
		alert('Veuillez entrez l\'adresse de votre sociŽtŽ');
		form.adresse.focus();
		return false;
    }
    if (form.cp.value == ""){
		alert('Veuillez entrez le code postal de la localitŽ');
		form.cp.focus();
		return false;
    }
    if (form.localite.value == ""){
		alert('Veuillez entrez la localitŽ');
		form.localite.focus();
		return false;
    }
    if (form.pays.value == ""){
		alert('Veuillez entrez le nom de votre pays');
		form.pays.focus();
		return false;
    }
    if (form.nom.value == ""){
		alert('Veuillez entrez votre nom');
		form.nom.focus();
		return false;
    }
    if (form.email.value == ""){
		alert('Veuillez entrez votre adresse email');
		form.email.focus();
		return false;
    }
	else {
		return true;
    }
}

function lireLesValeurs() {
	// lire les valeurs
	formation_prixPP		= document.getElementById("formation_prixPP").innerHTML;
	formation_participants	= document.getElementById("formation_participants").value;
	formation_sujet			= document.getElementById("formation_sujet").innerHTML;
	formation_date			= document.getElementById("formation_date").innerHTML;
	
	// nettoyer le HTML, si jamais il restait des tags HTML
	formation_prixPP		= stripTags(formation_prixPP);
	formation_sujet			= stripTags(formation_sujet);
	formation_date			= stripTags(formation_date);

}

function recopierLesValeurs() {
	lireLesValeurs();
	
	// afficher le rŽsultat
	document.getElementById("formation_prixTotal").innerHTML = formation_prixTotal+' euros';
	
	document.form1.v_Intro.value	= formation_sujet + " : " + formation_date;
	document.form1.prixPP.value		= formation_prixPP;
	document.form1.prixTotal.value	= formation_prixTotal;
}

function calculerPrixTotal() {	
	// lire les valeurs
	lireLesValeurs();

	// calculer
	formation_prixTotal	= ( parseInt(formation_prixPP) * formation_participants );
	
	// ecrire les valeurs calculŽes et autres
	recopierLesValeurs();	
}

function stripTags(fromText) {
        // What a tag looks like
        var matchTag = /<(?:.|\s)*?>/g;
        // Replace the tag
        return fromText.replace(matchTag, "");
};
