function Envoicontact(NomForm)
	{
	c_nom = document.getElementById('c_nom').value;
	if (c_nom == "") {alert ("Nom obligatoire"); document.getElementById('c_nom').focus(); return;}
	c_prenom = document.getElementById('c_prenom').value;
	if (c_prenom == "") {alert ("Prénom obligatoire"); document.getElementById('c_prenom').focus(); return;}
	c_phone = document.getElementById('c_phone').value;
	if (c_phone == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('c_phone').focus(); return;}
	c_email = document.getElementById('c_email').value;
	if (c_email == "") {alert ("Adresse messagerie obligatoire"); document.getElementById('c_email').focus(); return;}
	c_emailconfirm = document.getElementById('c_emailconfirm').value;
	if (c_emailconfirm == "") {alert ("Confirmation adresse messagerie obligatoire"); document.getElementById('c_emailconfirm').focus(); return;}
	if (document.getElementById('c_email').value != document.getElementById('c_emailconfirm').value)
		{
		alert("La confirmation de l'adresse de messagerie n'est pas bonne");
		document.getElementById('c_email').value="";
		document.getElementById('c_emailconfirm').value="";
		document.getElementById('c_email').focus();
		return;
		}
	PageAppellee="./menu.php?choixmenu=21&codeenvoi=1";
	document.forms[NomForm].action=PageAppellee;
	document.forms[NomForm].method="POST";
	document.forms[NomForm].submit();
	return;
	}
function IsNumeric(sText)
	{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   }
function IsNumeric_prix(sText)
	{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   }
function FicheP(CodeFiche)
	{
	newwin=window.open("./typefiche.php?choix="+CodeFiche,"","scrollbars=yes,menubar=no,toolbar=no,width=800");
	return;
	}
function DemandeF(CodeFiche)
	{ 
	if (document.getElementById("mdpident").value == "") {alert ("Identifiant incorrect"); document.getElementById("mdpident").focus(); return;}
	var Identif=document.getElementById("mdpident").value;
	//alert (+document.getElementById("mdpident").value);
	switch (Identif)
		{
	    case "albanvistel" :
	    var Results=13;
	    break;
	    case "omschatelain" :
	    var Results=99;
	    break;
	    case "cn1951" :
	    var Results=88;
	    break;
		case "omscommunication" :
	    var Results=77;
	    break;
	    default :
	    var Results=-1;
	    //NameFirst.Input.text=""; 
	    }
	switch (CodeFiche)
		{
		case 401:
		CodeFff=1;
		break;
		case 402:
		CodeFff=2;
		CodeFiche=401;
		break;
		default:
		CodeFff=0;
		}
	PageAppelleeInt="./fiche/f"+CodeFiche+".php?Code_Iden="+Results+"&CodeFff="+CodeFff;
	document.forms['menu'].action=PageAppelleeInt;
	document.forms['menu'].method="post";
	document.forms['menu'].target="_blank";
	document.forms['menu'].submit();
	return;
	}
function AppelVisu()
	{
	PageAppelleeInt="./visualiser-01.php";
	document.forms['visualisation'].action=PageAppelleeInt;
	document.forms['visualisation'].method="post";
	document.forms['visualisation'].target="_self";
	document.forms['visualisation'].submit();
	return;	
	}
function AppelF_101(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var qua_1=document.getElementById('qua_dem_1').value;
	var qua_2=document.getElementById('qua_dem_2').value;
	var qua_3=document.getElementById('qua_dem_3').value;
	var pru_1=document.getElementById('pru_dem_1').value;
	var pru_2=document.getElementById('pru_dem_2').value;
	var pru_3=document.getElementById('pru_dem_3').value;
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Type de manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	if (!IsNumeric(document.getElementById('senior_m').value)) {alert ("Seniors : Merci de saisir un nombre"); document.getElementById('senior_m').focus(); return;}
	if (!IsNumeric(document.getElementById('jeune_m').value)) {alert ("Jeunes : Merci de saisir un nombre"); document.getElementById('jeune_m').focus(); return;}
	if (document.getElementById('motif_dem').value == "") {alert ("Motif obligatoire"); document.getElementById('motif_dem').focus(); return;}
	var top = 0;
	if (document.getElementById('coord_dem_1').value != "")	 {top++;}
	if (document.getElementById('coord_dem_2').value != "")	 {top++;}
	if (document.getElementById('coord_dem_3').value != "")	 {top++;}
	if (top == 0) {alert ("Nom du fournisseur obligatoire"); document.getElementById('coord_dem_1').focus(); return;}
	var top = 0;
	if (document.getElementById('refer_dem_1').value != "")	 
		{
		top++;
		if (qua_1 == "") {alert ("Quantité obligatoire"); document.getElementById('qua_dem_1').focus(); return;}
		if (!IsNumeric(qua_1)) {alert ("Quantité incorrect"); document.getElementById('qua_dem_1').focus(); return;}
		if (document.getElementById('pru_dem_1').value == "") {alert ("Prix unitaire obligatoire"); document.getElementById('pru_dem_1').focus(); return;}
		if (!IsNumeric_prix(pru_1)) {alert ("Prix unitaire incorrect\nValeur acceptée :\nde 0 à 9 et le point décimal"); document.getElementById('pru_dem_1').focus(); return;}
		}
	if (document.getElementById('refer_dem_2').value != "")	
		{
		top++;
		if (qua_2 == "") {alert ("Quantité obligatoire"); document.getElementById('qua_dem_2').focus(); return;}
		if (!IsNumeric(qua_2)) {alert ("Quantité incorrect"); document.getElementById('qua_dem_2').focus(); return;}
		if (document.getElementById('pru_dem_2').value == "") {alert ("Prix unitaire obligatoire"); document.getElementById('pru_dem_2').focus(); return;}
		if (!IsNumeric_prix(pru_2)) {alert ("Prix unitaire incorrect\nValeur acceptée :\nde 0 à 9 et le point décimal"); document.getElementById('pru_dem_2').focus(); return;}
		}
	if (document.getElementById('refer_dem_3').value != "")
		{
		top++; 
		if (qua_3 == "") {alert ("Quantité obligatoire"); document.getElementById('qua_dem_3').focus(); return;}
		if (!IsNumeric(qua_3)) {alert ("Quantité incorrect"); document.getElementById('qua_dem_3').focus(); return;}
		if (document.getElementById('pru_dem_3').value == "") {alert ("Prix unitaire obligatoire"); document.getElementById('pru_dem_3').focus(); return;}
		if (!IsNumeric_prix(pru_3)) {alert ("Prix unitaire incorrect\nValeur acceptée :\nde 0 à 9 et le point décimal"); document.getElementById('pru_dem_3').focus(); return;}
		}
	if (top == 0) {alert ("Libellé référence obligatoire"); document.getElementById('refer_dem_1').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	} 
function AppelF_102(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('nbper_t').value == "") {alert ("Nombre de personnes attendues obligatoire"); document.getElementById('nbper_t').focus(); return;}
	var top=0;
	for (i=0;i<=9;i++)
		{
		if (document.getElementById('datef_'+i).value != "" && document.getElementById('dated_'+i).value != "")	{top++;}	
		}
	if (top == 0) {alert ("Au moins une ligne doit être saisie "); return;}
	for (i=0;i<=9;i++)
		{
		if (document.getElementById('datef_'+i).value != "" && document.getElementById('dated_'+i).value == "")	{alert ("Date de début obligatoire"); document.getElementById('datef_'+i).focus(); return;}	
		if (document.getElementById('dated_'+i).value != "" && document.getElementById('datef_'+i).value == "")	{alert ("Date de fin obligatoire"); document.getElementById('datef_'+i).focus(); return;}
		if (document.getElementById('datef_'+i).value != "" && document.getElementById('dated_'+i).value != "")
			{
			if (document.getElementById('lieu_'+i).value == "")	{alert ("Lieu obligatoire"); document.getElementById('lieu_'+i).focus(); return;}
			}
		}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_103(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var depl_1_kilo=document.getElementById('depl_1_kilo').value;
	var hebe_1_nui=document.getElementById('hebe_1_nui').value;
	var hebe_1_rep=document.getElementById('hebe_1_rep').value;
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Type de manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	if (document.getElementById('lieu_m').value == "") {alert ("Lieu obligatoire"); document.getElementById('lieu_m').focus(); return;}
	var top = 0;
	if (document.getElementById('comp_1_nom').value != "")	 {top++;}
	if (document.getElementById('comp_2_nom').value != "")	 {top++;}
	if (document.getElementById('comp_3_nom').value != "")	 {top++;}
	if (document.getElementById('comp_4_nom').value != "")	 {top++;}
	if (document.getElementById('comp_5_nom').value != "")	 {top++;}
	if (document.getElementById('comp_6_nom').value != "")	 {top++;}
	if (top == 0) {alert ("Nom du compétiteur obligatoire"); document.getElementById('comp_1_nom').focus(); return;}
	//var top = 0;
	//if (document.getElementById('acco_1_nom').value != "")	 {top++;}
	//if (document.getElementById('acco_2_nom').value != "")	 {top++;}
	//if (document.getElementById('acco_3_nom').value != "")	 {top++;}
	//if (top == 0) {alert ("Nom de l'accompagnateur obligatoire"); document.getElementById('acco_1_nom').focus(); return;}
	var top = 0;
	if (document.getElementById('depl_1_kilo').value != "")	 {top++;}
	if (document.getElementById('hebe_1_nui').value != "")	 {top++;}
	if (document.getElementById('hebe_1_rep').value != "")	 {top++;}
	if (top == 0) {alert ("Formulaire incomplet"); document.getElementById('depl_1_kilo').focus(); return;}
	if (!IsNumeric(depl_1_kilo)) {alert ("Nombre de kilomètres incorrect"); document.getElementById('depl_1_kilo').focus(); return;}
	if (!IsNumeric(hebe_1_nui)) {alert ("Nombre de nuits incorrect"); document.getElementById('hebe_1_nui').focus(); return;}
	if (!IsNumeric(hebe_1_rep)) {alert ("Nombre de repas incorrect"); document.getElementById('hebe_1_rep').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_201(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Type de manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	var top=0;
	if (document.getElementById('salle_lac_1').checked) {top=1;}
	if (document.getElementById('salle_lac_2').checked) {top=1;}
	if (document.getElementById('salle_lac_3').checked) {top=1;}
	if (document.getElementById('salle_lac_4').checked) {top=1;}
	if (top == 0) {alert("Vous devez sélectionner une salle"); return;}	 
	if (document.getElementById('nbper_t').value == "") {alert ("Nombre de personnes attendues obligatoire"); document.getElementById('nbper_t').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_202(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value;
	var cout_ttc=document.getElementById('cout_ttc').value;
	var cout_ass=document.getElementById('cout_ass').value;
	var cout_per=document.getElementById('cout_per').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	var top=0;
	if (document.getElementById('stage_typ_1').checked) {top=1;}
	if (document.getElementById('stage_typ_2').checked) {top=2;}
	if (document.getElementById('stage_typ_3').checked) {top=3;}
	if (top == 0) {alert("Vous devez sélectionner un type de stage"); return;}
	var top3=top4=top5=0; 
	switch (top)
		{
		case 1:
		if (document.getElementById('stage_enc_1').checked) {top5=1;}
		if (document.getElementById('stage_enc_2').checked) {top5=2;}
		if (document.getElementById('stage_enc_3').checked) {top5=3;}
		if (document.getElementById('stage_enc_4').checked) {top5=4;}
		if (document.getElementById('stage_enc_5').checked) {top5=5;}
		if (document.getElementById('stage_enc_6').checked) {top5=6;}
		if (document.getElementById('stage_enc_7').checked) {top5=7;}
		if (top5 == 0) {alert("Vous devez sélectionner une catégorie"); return;}
		break;
		case 2:
		if (document.getElementById('stage_spo_1').checked) {top4=1;}
		if (document.getElementById('stage_spo_2').checked) {top4=2;}
		if (document.getElementById('stage_spo_3').checked) {top4=3;}
		if (document.getElementById('stage_spo_4').checked) {top4=4;}
		if (top4 == 0) {alert("Vous devez sélectionner une catégorie"); return;}
		break;
		case 3:
		if (document.getElementById('stage_ass_1').checked) {top3=1;}
		if (document.getElementById('stage_ass_2').checked) {top3=2;}
		if (document.getElementById('stage_ass_3').checked) {top3=3;}
		if (document.getElementById('stage_ass_4').checked) {top3=4;}
		if (top3 == 0) {alert("Vous devez sélectionner une organisation"); return;}
		break;
		default:
		}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	var top = 0;
	if (document.getElementById('cout_ttc').value == "") {alert("Montant Total obligatoire"); document.getElementById('cout_ttc').focus(); return;}
	if (!IsNumeric(cout_ttc)) {alert ("Montant Total incorrect"); document.getElementById('cout_ttc').focus(); return;}
	if (document.getElementById('cout_ass').value == "") {alert("Montant Association obligatoire"); document.getElementById('cout_ass').focus(); return;}
	if (!IsNumeric(cout_ass)) {alert ("Montant Association incorrect"); document.getElementById('cout_ass').focus(); return;}
	if (document.getElementById('cout_per').value == "") {alert("Montant Intéressé obligatoire"); document.getElementById('cout_per').focus(); return;}
	if (!IsNumeric(cout_per)) {alert ("Montant Intéressé incorrect"); document.getElementById('cout_per').focus(); return;}
	var vertot=cout_ttc-cout_ass-cout_per;
	if (vertot != 0) {alert("Le montant total saisi n'est pas égal au cumul des montants versés"); document.getElementById('cout_ttc').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_401(CodeFiche)
	{
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Nom de la manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	if (document.getElementById('competiteur_m').value == "") {alert ("Compétiteurs : Merci de saisir un nombre"); document.getElementById('competiteur_m').focus(); return;}
	if (!IsNumeric(document.getElementById('competiteur_m').value)) {alert ("Compétiteurs : Merci de saisir un nombre"); document.getElementById('competiteur_m').focus(); return;}
	if (document.getElementById('public_m').value != "") {
		if (!IsNumeric(document.getElementById('public_m').value)) {alert ("Public : Merci de saisir un nombre"); document.getElementById('public_m').focus(); return;}
		}
	if (document.getElementById('choix_sit').checked)
		{
		var top=0;
		if (document.getElementById('bar_g').checked) {top=1;}
		if (document.getElementById('pdl_g').checked) {top=1;}
		if (document.getElementById('sab_g').checked) {top=1;}
		if (document.getElementById('pdl_s').checked) {top=1;}
		if (document.getElementById('pla_s').checked) {top=1;}
		if (document.getElementById('bou_s').checked) {top=1;}
		if (document.getElementById('pis_s').checked) {top=1;}
		if (top != 1) {alert ("Merci de choisir au moins un site"); return;}
		if (document.getElementById('bar_g').checked)
			{
			top = 0;
			if (document.getElementById('tatami_g').checked) {top=1;}
			if (document.getElementById('salle_g').checked) {top=1;}
			if (document.getElementById('tun_g').checked) {top=1;}
			if (document.getElementById('tdeux_g').checked) {top=1;}
			if (document.getElementById('ttrois_g').checked) {top=1;}
			if (top != 1) {alert ("Gymnase Barlet : Sélection incomplète"); return;}
			}
		if (document.getElementById('pdl_g').checked)
			{
			top = 0;
			if (document.getElementById('hall_g').checked) {top=1;}
			if (document.getElementById('vest_g').checked) {top=1;}
			if (document.getElementById('club_g').checked) {top=1;}
			if (top != 1) {alert ("Gymnase Plan du Loup : Sélection incomplète"); return;}
			}
		if (document.getElementById('sab_g').checked)
			{
			top = 0;
			if (document.getElementById('grandesal_g').checked) {top=1;}
			if (document.getElementById('musculation_g').checked) {top=1;}
			if (document.getElementById('reception_g').checked) {top=1;}
			if (top != 1) {alert ("Gymnase Sainte Barbe : Sélection incomplète"); return;}
			}
		if (document.getElementById('pdl_s').checked)
			{
			top = 0;
			if (document.getElementById('pelouse_p').checked) {top=1;}
			if (document.getElementById('stabilise_p').checked) {top=1;}
			if (document.getElementById('herbe_p').checked) {top=1;}
			if (document.getElementById('vest_p').checked) {top=1;}
			if (document.getElementById('club_p').checked) {top=1;}
			if (top != 1) {alert ("Stade Plan du Loup : Sélection incomplète"); return;}
			}
		if (document.getElementById('pla_s').checked)
			{
			top = 0;
			if (document.getElementById('stabilise_a').checked) {top=1;}
			if (document.getElementById('vest_a').checked) {top=1;}
			if (document.getElementById('buvette_a').checked) {top=1;}
			if (top != 1) {alert ("Stade La Plaine : Sélection incomplète"); return;}
			}
		if (document.getElementById('bou_s').checked)
			{
			top = 0;
			if (document.getElementById('longue_m').checked) {top=1;}
			if (document.getElementById('petanque_m').checked) {top=1;}
			if (document.getElementById('buvette_m').checked) {top=1;}
			if (top != 1) {alert ("Stade Marius Bourrat : Sélection incomplète"); return;}
			}
		if (document.getElementById('pis_s').checked)
			{
			top = 0;
			if (document.getElementById('hiver_i').checked) {top=1;}
			if (document.getElementById('ete_i').checked) {top=1;}
			if (document.getElementById('complet_i').checked) {top=1;}
			if (top != 1) {alert ("Piscine Municipale : Sélection incomplète"); return;}
			}
		}
	if (document.getElementById('choix_mat').checked)
		{
		top=0;
		if (document.getElementById('barriere_l').value!="") {top++;}
		if (document.getElementById('chaise_l').value!="") {top++;}
		if (document.getElementById('plateau_l').value!="") {top++;}
		if (document.getElementById('treteau_l').value!="") {top++;}
		if (document.getElementById('podium36_l').value!="") {top++;}
		if (document.getElementById('podium54_l').value!="") {top++;}
		if (document.getElementById('estrade_l').value!="") {top++;}
		if (document.getElementById('cafetiere_l').value!="") {top++;}
		if (document.getElementById('hotdog_l').value!="") {top++;}
		if (document.getElementById('gaufrier_l').value!="") {top++;}
		if (document.getElementById('grille_l').value!="") {top++;}
		if (document.getElementById('parquet_l').value!="") {top++;}
		if (document.getElementById('chapiteau_l').value!="") {top++;}
		if (document.getElementById('abri_l').value!="") {top++;}
		if (document.getElementById('ancienne_s').checked) {top++;} 
		if (document.getElementById('gymnase_s').checked) {top++;} 
		if (document.getElementById('oms_s').checked) {top++;} 
		if (document.getElementById('def_s').checked) {top++;} 
		if (top == 0) {alert("Formulaire Matériel incomplet"); document.getElementById('barriere_l').focus(); return;}
		if (!IsNumeric(document.getElementById('barriere_l').value)) {alert ("Barrières : Merci de saisir un nombre"); document.getElementById('barriere_l').focus(); return;}
		if (!IsNumeric(document.getElementById('chaise_l').value)) {alert ("Chaises : Merci de saisir un nombre"); document.getElementById('chaise_l').focus(); return;}
		if (!IsNumeric(document.getElementById('plateau_l').value)) {alert ("Plateaux : Merci de saisir un nombre"); document.getElementById('plateau_l').focus(); return;}
		if (!IsNumeric(document.getElementById('treteau_l').value)) {alert ("Tréteaux : Merci de saisir un nombre"); document.getElementById('treteau_l').focus(); return;}
		if (!IsNumeric(document.getElementById('cafetiere_l').value)) {alert ("Cafetière  : Merci de saisir un nombre"); document.getElementById('cafetiere_l').focus(); return;}
		if (!IsNumeric(document.getElementById('grille_l').value)) {alert ("Grilles d'exposition  : Merci de saisir un nombre"); document.getElementById('grille_l').focus(); return;}
		if (!IsNumeric(document.getElementById('abri_l').value)) {alert ("Abris faciles  : Merci de saisir un nombre"); document.getElementById('abri_l').focus(); return;}
		}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_403(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length; 
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('adresse_t').value == "") {alert ("Adresse obligatoire"); document.getElementById('adresse_t').focus(); return;} 
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('dated_d').value == "") {alert ("Date du conseil d'administration\nou comité directeur obligatoire"); document.getElementById('dated_d').focus(); return;}
	if (document.getElementById('lieu_m').value == "") {alert ("Lieu obligatoire"); document.getElementById('lieu_m').focus(); return;}
	var top=0;
	if (document.getElementById('type_b_1').checked) {top=1;}
	if (document.getElementById('type_b_2').checked) {top=1;}
	if (document.getElementById('type_b_3').checked) {top=1;} 
	if (top == 0) {alert("Vous devez sélectionner la catégorie"); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	var top=0;
	if (document.getElementById('qualite_b_1').checked) {top=1;}
	if (document.getElementById('qualite_b_2').checked) {top=1;}
	if (document.getElementById('qualite_b_3').checked) {top=1;}
	if (document.getElementById('qualite_b_4').checked) {top=1;}
	if (document.getElementById('qualite_b_5').checked) {top=1;} 
	if (top == 0) {alert("Vous devez sélectionner 'En qualité de'"); return;}
	if (document.getElementById('qualite_b_1').checked && document.getElementById('agrement_b').value == "")
		{alert("Numéro d'agrément obligatoire"); document.getElementById('agrement_b').focus(); return;}  
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_404(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Nom de la manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	var top=0;
	if (document.getElementById('typeman_1').checked) {top++;}
	if (document.getElementById('typeman_2').checked) {top++;}
	if (document.getElementById('typeman_3').checked) {top++;}
	if (document.getElementById('typeman_4').checked) {top++;}
	if (document.getElementById('typeman_5').checked) {top++;}
	if (top == 0) {alert("Choix du type de manifestation obligatoire"); document.getElementById('typeman_1').focus(); return;}
	var top=0;
	if (document.getElementById('catage_1').checked) {top++;}
	if (document.getElementById('catage_2').checked) {top++;}
	if (document.getElementById('catage_3').checked) {top++;}
	if (document.getElementById('catage_4').checked) {top++;}
	if (document.getElementById('catage_5').checked) {top++;}
	if (top == 0) {alert("Choix de la catégorie d'age obligatoire"); document.getElementById('catage_1').focus(); return;}
	var top=0;
	if (document.getElementById('nivecomp_1').checked) {top++;}
	if (document.getElementById('nivecomp_2').checked) {top++;}
	if (document.getElementById('nivecomp_3').checked) {top++;}
	if (document.getElementById('nivecomp_4').checked) {top++;}
	if (document.getElementById('nivecomp_5').checked) {top++;}
	if (top == 0) {alert("Choix du niveau sportif obligatoire"); document.getElementById('nivecomp_1').focus(); return;}
	if (document.getElementById('competiteur_m').value == "") {alert ("Compétiteurs : Merci de saisir un nombre"); document.getElementById('competiteur_m').focus(); return;}
	if (!IsNumeric(document.getElementById('competiteur_m').value)) {alert ("Compétiteurs : Merci de saisir un nombre"); document.getElementById('competiteur_m').focus(); return;}
	if (document.getElementById('public_m').value == "") {
		if (!IsNumeric(document.getElementById('public_m').value)) {alert ("Public : Merci de saisir un nombre"); document.getElementById('public_m').focus(); return;}
		}
	if (document.getElementById('souhait_m').value == "") {alert ("Merci de saisir vos souhaits"); document.getElementById('souhait_m').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_405(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('manifestation_m').value == "") {alert ("Type de manifestation obligatoire"); document.getElementById('manifestation_m').focus(); return;}
	if (document.getElementById('lieu_m').value == "") {alert ("Lieu obligatoire"); document.getElementById('lieu_m').focus(); return;}
	if (document.getElementById('dated_m').value=="") {alert ("Date de début obligatoire"); document.getElementById('dated_m').focus(); return;}
	if (document.getElementById('datef_m').value=="") {alert ("Date de fin obligatoire"); document.getElementById('datef_m').focus(); return;}
	if (document.getElementById('band_lon').value == "") {alert ("Longueur de la banderole obligatoire"); document.getElementById('band_lon').focus(); return;}
	if (document.getElementById('band_lar').value == "") {alert ("Largeur de la banderole obligatoire"); document.getElementById('band_lar').focus(); return;}
	if (document.getElementById('band_hau').value == "") {alert ("Hauteur de la banderole obligatoire"); document.getElementById('band_hau').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_999(CodeFiche)
	{ 
	var name_tel=document.getElementById('telephone_t').value; 
	var len_tel=name_tel.length;
	if (document.getElementById('association_t').value == "-1") {alert ("Choix de l'association obligatoire"); document.getElementById('association_t').focus(); return;}
	if (document.getElementById('responsable_t').value == "") {alert ("Nom du responsable obligatoire"); document.getElementById('responsable_t').focus(); return;}
	if (name_tel == "") {alert ("Numéro de téléphone obligatoire"); document.getElementById('telephone_t').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_t').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_t').focus(); return;}
	if (document.getElementById('activite_m').value == "") {alert ("Type d'activité obligatoire"); document.getElementById('activite_m').focus(); return;}
	if (document.getElementById('nom_m').value=="") {alert ("Nom du contact obligatoire"); document.getElementById('nom_m').focus(); return;}
	if (document.getElementById('prenom_m').value=="") {alert ("Prénom du contact obligatoire"); document.getElementById('prenom_m').focus(); return;}
	var name_tel=document.getElementById('telephone_m').value; 
	var len_tel=name_tel.length;
	if (name_tel == "") {alert ("téléphone du contact obligatoire"); document.getElementById('telephone_m').focus(); return;}
	if (!IsNumeric(name_tel)) {alert ("Numéro de téléphone incorrect"); document.getElementById('telephone_m').focus(); return;}
	if (len_tel != 10) {alert ("Numéro de téléphone = 10 chiffres"); document.getElementById('telephone_m').focus(); return;} 
	if (document.getElementById('lieu_m').value == "") {alert ("Lieu de pratique obligatoire"); document.getElementById('lieu_m').focus(); return;}
	PageAppelleeInt="./f"+CodeFiche+".php?topmaj=oui";
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function AppelF_777()
	{
	var code_assoc= document.getElementById('association_t').value; 
	PageAppelleeInt="./f999.php?Code_Iden="+code_assoc;
	document.forms['fiche_f'].action=PageAppelleeInt;
	document.forms['fiche_f'].method="post";
	document.forms['fiche_f'].target="_self";
	document.forms['fiche_f'].submit();
	return;	
	}
function ChoixSite(CodeFiche)
	{
	switch (CodeFiche)
		{
		case "1":
		if (document.getElementById('choix_sit').checked==true)
			{
			document.getElementById('div_site').style.display = ''; 
			document.getElementById('div_sds').style.display = ''; 
			document.getElementById('titre_1').style.display = 'none';
			document.getElementById('titre_2').style.display = '';
			}
		else
			{
			document.getElementById('div_site').style.display = 'none'; 
			document.getElementById('div_sds').style.display = 'none';
			document.getElementById('titre_1').style.display = '';
			document.getElementById('titre_2').style.display = 'none';
			}
		break;
		case "2":
		if (document.getElementById('choix_mat').checked==true)
			{
			document.getElementById('div_materiel').style.display = ''; 
			document.getElementById('div_ctm').style.display = '';
			document.getElementById('titre_1').style.display = 'none';
			document.getElementById('titre_2').style.display = '';
			}
		else
			{
			document.getElementById('div_materiel').style.display = 'none'; 
			document.getElementById('div_ctm').style.display = 'none';
			document.getElementById('titre_1').style.display = '';
			document.getElementById('titre_2').style.display = 'none';
			}
		break;
		default:
		}
	return;
	}
function agrandir()
	{
	window.moveTo(0,0);
	window.resizeTo(screen.width,screen.height);
	return;
	}
function ChoixTypeB(ValTypeB)
	{
	switch (ValTypeB)
		{
		case 2:
		document.getElementById('Choix_type_1').style.display = "none";
		document.getElementById('Choix_type_2').style.display = "";
		document.getElementById('Choix_type_3').style.display = "none";
		break;
		case 3:
		document.getElementById('Choix_type_1').style.display = "none";
		document.getElementById('Choix_type_2').style.display = "none";
		document.getElementById('Choix_type_3').style.display = "";
		break;
		default:
		document.getElementById('Choix_type_1').style.display = "";
		document.getElementById('Choix_type_2').style.display = "none";
		document.getElementById('Choix_type_3').style.display = "none";
		}
	return;
	}
function ChoixStage(ValTypeS)
	{
	switch (ValTypeS)
		{
		case 2:
		document.getElementById('encadrement').style.display = "none";
		document.getElementById('sportif').style.display = "";
		document.getElementById('associatif').style.display = "none";
		document.getElementById('stage_spo_1').checked=false;
		document.getElementById('stage_spo_2').checked=false;
		document.getElementById('stage_spo_3').checked=false;
		document.getElementById('stage_spo_4').checked=false;
		document.getElementById('spo_autre').value="";
		break;
		case 3:
		document.getElementById('encadrement').style.display = "none";
		document.getElementById('sportif').style.display = "none";
		document.getElementById('associatif').style.display = "";
		document.getElementById('stage_ass_1').checked=false;
		document.getElementById('stage_ass_2').checked=false;
		document.getElementById('stage_ass_3').checked=false;
		document.getElementById('stage_ass_4').checked=false;
		document.getElementById('ass_autre').value="";
		break;
		default:
		document.getElementById('encadrement').style.display = "";
		document.getElementById('sportif').style.display = "none";
		document.getElementById('associatif').style.display = "none";
		document.getElementById('stage_enc_1').checked=false;
		document.getElementById('stage_enc_2').checked=false;
		document.getElementById('stage_enc_3').checked=false;
		document.getElementById('stage_enc_4').checked=false;
		document.getElementById('stage_enc_5').checked=false;
		document.getElementById('stage_enc_6').checked=false;
		document.getElementById('stage_enc_7').checked=false;
		document.getElementById('enc_autre').value="";
		}
	return;
	}
function ChoixAutre(ValTypeA)
	{
	switch (ValTypeA)
		{ 
		case 1:
		document.getElementById('enc_aut').style.display = "";
		document.getElementById('spo_aut').style.display = "none";
		document.getElementById('ass_aut').style.display = "none"; 
		break;
		case 2:
		document.getElementById('enc_aut').style.display = "none";
		document.getElementById('spo_aut').style.display = "";
		document.getElementById('ass_aut').style.display = "none";
		break;
		case 3:
		document.getElementById('enc_aut').style.display = "none";
		document.getElementById('spo_aut').style.display = "none";
		document.getElementById('ass_aut').style.display = "";
		break;
		default:
		document.getElementById('enc_aut').style.display = "none";
		document.getElementById('spo_aut').style.display = "none";
		document.getElementById('ass_aut').style.display = "none";
		}
	return;
	}
var Num_Choix = -1;
function Plus_Inf_N(Num_Sport)
	{
	//alert ('a '+Num_Sport);
	if (Num_Choix != -1)
		{
		//alert ('a '+Num_Choix);
		document.getElementById('plus_'+Num_Choix+'_0').style.display = "";
		document.getElementById('moins_'+Num_Choix+'_0').style.display = "none";
		document.getElementById('disc_'+Num_Choix).style.backgroundColor = "";
		for (j=1;j<16;j++)
			{
			if (j !=5)	
				{
				document.getElementById('plus_'+Num_Choix+'_'+j).style.display = "none";
				document.getElementById('plus_'+Num_Choix+'_'+j).style.backgroundColor = "";
				}
			else
				{
				if (document.getElementById('plus_'+Num_Sport+'_'+j))
					{  
					document.getElementById('plus_'+Num_Choix+'_'+j).style.display = "none";
					document.getElementById('plus_'+Num_Choix+'_'+j).style.backgroundColor = "";
					}
				}
			}
		}
	Num_Choix=Num_Sport;
	document.getElementById('plus_'+Num_Sport+'_0').style.display = "none";
	document.getElementById('moins_'+Num_Sport+'_0').style.display = "";
	document.getElementById('disc_'+Num_Sport).style.backgroundColor = "white";
	for (j=1;j<16;j++)
		{
		if (j !=5)	
			{
			document.getElementById('plus_'+Num_Sport+'_'+j).style.display = "";
			document.getElementById('plus_'+Num_Sport+'_'+j).style.backgroundColor = "white";
			}
		else
			{
			if (document.getElementById('plus_'+Num_Sport+'_'+j))
				{
				document.getElementById('plus_'+Num_Sport+'_'+j).style.display = "";
				document.getElementById('plus_'+Num_Sport+'_'+j).style.backgroundColor = "white";
				}
			}
		}
	//alert ("fin");
	return;
	}
function Moins_Inf_N(Num_Sport)
	{
	//alert ('a '+Num_Sport);
	document.getElementById('plus_'+Num_Sport+'_0').style.display = "";
	document.getElementById('moins_'+Num_Sport+'_0').style.display = "none";
	document.getElementById('disc_'+Num_Sport).style.backgroundColor = "";
	for (j=1;j<16;j++)
		{
		if (j !=5)	
			{
			document.getElementById('plus_'+Num_Sport+'_'+j).style.display = "none";
			document.getElementById('plus_'+Num_Sport+'_'+j).style.backgroundColor = "";
			}
		else
			{
			if (document.getElementById('plus_'+Num_Sport+'_'+j))
				{
				document.getElementById('plus_'+Num_Sport+'_'+j).style.display = "none";
				document.getElementById('plus_'+Num_Sport+'_'+j).style.backgroundColor = "";
				}
			}
		}
	Num_Choix=-1;
	//alert ("fin");
	return;
	}

