<!--
//
agt=navigator.userAgent.toLowerCase()
app=navigator.appName.toLowerCase()
ver = parseInt(navigator.appVersion)
//ie=document.all?1:0;
//n=document.layers?1:0;
ie=(agt.indexOf('msie')!=-1 || agt.indexOf('Microsoft')!=-1)?1:0;
n=(agt.indexOf('netscape')!=-1 || app.indexOf('netscape')!=-1)?1:0;
ns4=(n && ver==4)?1:0;
ns6=(n && ver==5)?1:0;


function on(name,src){
document.images[name].src = src
}

function off(name,src){
document.images[name].src = src
}

var myimages=new Array()

function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

function PopUp(theURL,winName,features) { 
window.open(theURL,winName,features);
}


function ControleInfoOrga(formm, type){
	
	ctlvar = new String();
	
	
			
	
	ctl = "O";
	
	VerifSaisie("SIEGE", "le siège !");
	if (ctl == "N") return false;	
	CapitalSAisie("SIEGE");
	
	
	
	VerifSaisie("ADRESSE_SIEGE_1", "l'adresse du siège !");
	if (ctl == "N") return false;
	CapitalSAisie("ADRESSE_SIEGE_1");
	
	
	if (document.forms["frmInscript"].elements["ADRESSE_SIEGE_2"].value.length > 0){	
    	CapitalSAisie("ADRESSE_SIEGE_2");
    }
	if (document.forms["frmInscript"].elements["ADRESSE_SIEGE_3"].value.length > 0){	
    	CapitalSAisie("ADRESSE_SIEGE_3");
    }
	
	VerifSaisie("CP_SIEGE", "le code postal du siège !");
	if (ctl == "N") return false;
	
	if (type == "relais"){
		if (document.forms["frmInscript"].elements["CP_SIEGE"].value.length > 0){	
    			VerifCP("CP_SIEGE", "le code postal du siège");
			if (ctl == "N") return false;
    		}
	}
	else{
		if (document.forms["frmInscript"].elements["PAYS_SIEGE"].value.toUpperCase() == "FRANCE"){	
			if (document.forms["frmInscript"].elements["CP_SIEGE"].value.length > 0){	
    				VerifCP("CP_SIEGE", "le code postal du siège");
				if (ctl == "N") return false;
    			}
		}
	}
	
	VerifSaisie("VILLE_SIEGE", "la ville du siège !");
	if (ctl == "N") return false;
	CapitalSAisie("VILLE_SIEGE");
	
	VerifSaisie("NOM_RESPONSABLE", "le nom du responsable !");
	if (ctl == "N") return false;
	CapitalSAisie("NOM_RESPONSABLE");
	
	VerifSaisie("PRENOM_RESPONSABLE", "le prénom du responsable !");
	if (ctl == "N") return false;
	
	
	
	
	
	if (type == "relais"){
			
			if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length > 0){	
    				VerifTel("TEL_RESPONSABLE", "Le numéro de téléphone");
				if (ctl == "N") return false;
    			}
	
			if (document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length > 0){	
    				VerifTel("MOBILE_RESPONSABLE", "Le numéro de mobile");
				if (ctl == "N") return false;
    			}
	
			if (document.forms["frmInscript"].elements["FAX_RESPONSABLE"].value.length > 0){	
    				VerifTel("FAX_RESPONSABLE", "Le numéro de Fax");
				if (ctl == "N") return false;
    			}
		
	}
	else{
		if (document.forms["frmInscript"].elements["PAYS_SIEGE"].value.toUpperCase() == "FRANCE"){	
			if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length > 0){	
    				VerifTel("TEL_RESPONSABLE", "Le numéro de téléphone");
				if (ctl == "N") return false;
    			}
	
			if (document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length > 0){	
    				VerifTel("MOBILE_RESPONSABLE", "Le numéro de mobile");
				if (ctl == "N") return false;
    			}
	
			if (document.forms["frmInscript"].elements["FAX_RESPONSABLE"].value.length > 0){	
    				VerifTel("FAX_RESPONSABLE", "Le numéro de Fax");
				if (ctl == "N") return false;
    			}
		}
	}
	
	if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length < 1 && document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length < 1){	
		window.alert("Veuillez saisir au moins 1 numero de téléphone !");
		document.forms["frmInscript"].elements["TEL_RESPONSABLE"].focus();
		ctl = "N";
		return ctl;		
	}
		
	
	VerifSaisie("EMAIL_RESPONSABLE", "votre e-mail !");
	if (ctl == "N") return false;
	
	if (document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].value.length > 0){
		document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].value = document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].value.toLowerCase();
        	var mail = document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].value;
        	var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/	
   		ctl2 = reg.exec(mail)!=null
   		ctl = ctl2?"O":"N";
		if (ctl == "N"){ 
			window.alert("L'adresse e-mail semble incorrecte !");
        		document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].focus();          		
        		return false;	
		}									
    	}
    	
    
    	VerifSaisie("CONF-EMAIL_RESPONSABLE", "votre confirmation e-mail !");
	if (ctl == "N") return false;
	document.forms["frmInscript"].elements["CONF-EMAIL_RESPONSABLE"].value = document.forms["frmInscript"].elements["CONF-EMAIL_RESPONSABLE"].value.toLowerCase();
	if (document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].value != document.forms["frmInscript"].elements["CONF-EMAIL_RESPONSABLE"].value){
					window.alert("L'adresse E-mail et la confirmation sont différentes !");
	    	document.forms["frmInscript"].elements["EMAIL_RESPONSABLE"].focus();        		
        	ctl = "N";
			return false;
	}
	
	if (type == "org"){
      		if (document.forms["frmInscript"].elements["NOM_LIVRAISON"].value == ""){	
          		document.forms["frmInscript"].elements["NOM_LIVRAISON"].value = document.forms["frmInscript"].elements["SIEGE"].value; 
          	}
      		if (document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_1"].value == ""){	
          		document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_1"].value = document.forms["frmInscript"].elements["ADRESSE_SIEGE_1"].value; 
          	}
      		VerifSaisie("ADRESSE_LIVRAISON_1", "l'adresse de livraison !");
      		if (ctl == "N") return false;
      		CapitalSAisie("ADRESSE_LIVRAISON_1");
      	
      		if (document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_2"].value == ""){	
          		document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_2"].value = document.forms["frmInscript"].elements["ADRESSE_SIEGE_2"].value; 
          	}
      		CapitalSAisie("ADRESSE_LIVRAISON_2");
      	
      		if (document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_3"].value == ""){	
          		document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_3"].value = document.forms["frmInscript"].elements["ADRESSE_SIEGE_3"].value; 
         	 }
      		CapitalSAisie("ADRESSE_LIVRAISON_3");
      	
      		if (document.forms["frmInscript"].elements["CP_LIVRAISON"].value == ""){	
          		document.forms["frmInscript"].elements["CP_LIVRAISON"].value = document.forms["frmInscript"].elements["CP_SIEGE"].value; 
         	 }
      		if (document.forms["frmInscript"].elements["CP_LIVRAISON"].value.length > 0){	
          		VerifCP("CP_LIVRAISON", "le code postal de livraison");
          	}
      		VerifSaisie("CP_LIVRAISON", "le code postal de livraison !");
      		if (ctl == "N") return false;
      	
      		if (document.forms["frmInscript"].elements["VILLE_LIVRAISON"].value == ""){	
          		document.forms["frmInscript"].elements["VILLE_LIVRAISON"].value = document.forms["frmInscript"].elements["VILLE_SIEGE"].value; 
          	}
      		VerifSaisie("VILLE_LIVRAISON", "la ville de livraison !");
      		if (ctl == "N") return false;
      		CapitalSAisie("VILLE_LIVRAISON");
	

		VerifSaisie("TEL_LIVRAISON", "Tel / Mobile");
      		if (ctl == "N") return false;
      	}
	
	activ="FEDE" + nbfede 
		if (document.forms["frmInscript"].elements[activ].checked) {	        			
    			VerifSaisie("FEDE_AUTRE", "une affiliation autre !");
			if (ctl == "N") return false;
    		}
    		if (document.forms["frmInscript"].elements["FEDE_AUTRE"].value.length > 0){
    			activ="FEDE" + nbfede 
    			document.forms["frmInscript"].elements[activ].checked = true;    			
    		}
	
	
	if (type == "org"){
    		
    		
    		
    		
    		var ctlactivite = "NOK";
    	
    			for (var i=1; i<=nbactiv;i++) {	
    				activ="ACTIVITE" + i
        				if (document.forms["frmInscript"].elements[activ].checked) {	        			
    						ctlactivite = "OK";
    	        			}
            		}
            	
    		if (ctlactivite == "NOK"){
    			window.alert("Veuillez cocher au moins une activité.");		
    			ctl = "N";
    			return false;
    		}
    	
    		activ="ACTIVITE" + nbactiv
		if (document.forms["frmInscript"].elements[activ].checked) {	        			
    			VerifSaisie("ACIVITE_AUTRE", "une activité autre !");
			if (ctl == "N") return false;
    		}
    		
    		if (document.forms["frmInscript"].elements["ACIVITE_AUTRE"].value.length > 0){
    			activ="ACTIVITE" + nbactiv
    			document.forms["frmInscript"].elements[activ].checked = true;    			
    		}
    	
	}
	
	
	if (ctl == "O"){
		if (type == "org"){
	 	document.forms["frmInscript"].action="inscription_organisateur_confirm.asp";
		}
		else{
		document.forms["frmInscript"].action="inscription_relais_confirm.asp";
		}
	  	document.forms["frmInscript"].submit();
	  }
	  else{
	  	return false;
	  }
		
}


function ControleInfoModifOrga(formm, type){	
	ctlvar = new String();
	
	
			
	
	ctl = "O";
	
	VerifSaisie("SIEGE", "le siège !");
	if (ctl == "N") return false;	
	CapitalSAisie("SIEGE");
	
	
	
	VerifSaisie("ADRESSE_SIEGE_1", "l'adresse du siège !");
	if (ctl == "N") return false;
	CapitalSAisie("ADRESSE_SIEGE_1");
	
	
	if (document.forms["frmInscript"].elements["ADRESSE_SIEGE_2"].value.length > 0){	
    		CapitalSAisie("ADRESSE_SIEGE_2");
    	}
	if (document.forms["frmInscript"].elements["ADRESSE_SIEGE_3"].value.length > 0){	
    		CapitalSAisie("ADRESSE_SIEGE_3");
    	}
	
	VerifSaisie("CP_SIEGE", "le code postal du siège !");
	if (ctl == "N") return false;
	
	if (document.forms["frmInscript"].elements["PAYS_SIEGE"].value.toUpperCase() == "FRANCE"){	
		if (document.forms["frmInscript"].elements["CP_SIEGE"].value.length > 0){	
    			VerifCP("CP_SIEGE", "le code postal du siège");
			if (ctl == "N") return false;
    		}
	}
	
	
	VerifSaisie("VILLE_SIEGE", "la ville du siège !");
	if (ctl == "N") return false;
	CapitalSAisie("VILLE_SIEGE");
	
	if (document.forms["frmInscript"].elements["TYPEORG"].value == "COORD"){
		rech2 = document.forms["frmInscript"].elements["REGION_SIEGE"].options[document.forms["frmInscript"].elements["REGION_SIEGE"].selectedIndex].value;
		if (rech2 == "**"){
			alert("Veuillez sélectionner une région !");
			document.forms["frmInscript"].elements["REGION_SIEGE"].focus();	
		}
	}
	
	
	VerifSaisie("NOM_RESPONSABLE", "le nom du responsable !");
	if (ctl == "N") return false;
	CapitalSAisie("NOM_RESPONSABLE");
	
	VerifSaisie("PRENOM_RESPONSABLE", "le prénom du responsable !");
	if (ctl == "N") return false;
	
	
	if (document.forms["frmInscript"].elements["PAYS_SIEGE"].value.toUpperCase() == "FRANCE"){	
		if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length > 0){	
    			VerifTel("TEL_RESPONSABLE", "Le numéro de téléphone");
			if (ctl == "N") return false;
    		}
	
		if (document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length > 0){	
    			VerifTel("MOBILE_RESPONSABLE", "Le numéro de mobile");
			if (ctl == "N") return false;
   		 }
	
		if (document.forms["frmInscript"].elements["FAX_RESPONSABLE"].value.length > 0){	
    			VerifTel("FAX_RESPONSABLE", "Le numéro de Fax");
			if (ctl == "N") return false;
    		}
	}
	
	if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length < 1 && document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length < 1){	
		window.alert("Veuillez saisir au moins 1 numero de téléphone !");
		document.forms["frmInscript"].elements["TEL_RESPONSABLE"].focus();
		ctl = "N";
		return ctl;		
	}
	
	if (document.forms["frmInscript"].elements["NOM_LIVRAISON"].value == ""){	
          	document.forms["frmInscript"].elements["NOM_LIVRAISON"].value = document.forms["frmInscript"].elements["SIEGE"].value; 
         }
        if (document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_1"].value == ""){	
          	document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_1"].value = document.forms["frmInscript"].elements["ADRESSE_SIEGE_1"].value; 
        }
      	VerifSaisie("ADRESSE_LIVRAISON_1", "l'adresse de livraison !");
      	if (ctl == "N") return false;
      	CapitalSAisie("ADRESSE_LIVRAISON_1");
      	
      	if (document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_2"].value == ""){	
          	document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_2"].value = document.forms["frmInscript"].elements["ADRESSE_SIEGE_2"].value; 
          }
      	CapitalSAisie("ADRESSE_LIVRAISON_2");
      	
      	if (document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_3"].value == ""){	
          	document.forms["frmInscript"].elements["ADRESSE_LIVRAISON_3"].value = document.forms["frmInscript"].elements["ADRESSE_SIEGE_3"].value; 
          }
      	CapitalSAisie("ADRESSE_LIVRAISON_3");
      	
      	if (document.forms["frmInscript"].elements["CP_LIVRAISON"].value == ""){	
          	document.forms["frmInscript"].elements["CP_LIVRAISON"].value = document.forms["frmInscript"].elements["CP_SIEGE"].value; 
          }
      	if (document.forms["frmInscript"].elements["CP_LIVRAISON"].value.length > 0){	
          	VerifCP("CP_LIVRAISON", "le code postal de livraison");
          }
      	VerifSaisie("CP_LIVRAISON", "le code postal de livraison !");
      	if (ctl == "N") return false;
      	
      	if (document.forms["frmInscript"].elements["VILLE_LIVRAISON"].value == ""){	
          	document.forms["frmInscript"].elements["VILLE_LIVRAISON"].value = document.forms["frmInscript"].elements["VILLE_SIEGE"].value; 
          }
      	VerifSaisie("VILLE_LIVRAISON", "la ville de livraison !");
      	if (ctl == "N") return false;
      	CapitalSAisie("VILLE_LIVRAISON");
      	
      	VerifSaisie("TEL_LIVRAISON", "Tel / Mobile");
      	if (ctl == "N") return false;
	
	
	
		
	
	
    	activ="FEDE" + nbfede 
		if (document.forms["frmInscript"].elements[activ].checked) {	        			
    			VerifSaisie("FEDE_AUTRE", "une affiliation autre !");
			if (ctl == "N") return false;
    		}
    		if (document.forms["frmInscript"].elements["FEDE_AUTRE"].value.length > 0){
    			activ="FEDE" + nbfede 
    			document.forms["frmInscript"].elements[activ].checked = true;    			
    		}
    
    	
	
	
    	var ctlactivite = "NOK";
    	
    		for (var i=1; i<=nbactiv;i++) {	
    			activ="ACTIVITE" + i
        			if (document.forms["frmInscript"].elements[activ].checked) {	        			
    						ctlactivite = "OK";
    	        		}
            	}
    	if (ctlactivite == "NOK"){
    		window.alert("Veuillez cocher au moins une activité.");		
    		ctl = "N";
    		return false;
    	}
	
	activ="ACTIVITE" + nbactiv
		if (document.forms["frmInscript"].elements[activ].checked) {	        			
    			VerifSaisie("ACIVITE_AUTRE", "une activité autre !");
			if (ctl == "N") return false;
    		}
    		
    		if (document.forms["frmInscript"].elements["ACIVITE_AUTRE"].value.length > 0){
    			activ="ACTIVITE" + nbactiv
    			document.forms["frmInscript"].elements[activ].checked = true;    			
    		}
	
	
	if (ctl == "O"){
		
	 	document.forms["frmInscript"].action="modification_organisateur_confirm.asp";
		
	  	document.forms["frmInscript"].submit();
	  }
	  else{
	  	return false;
	  }
		
}

function ControleInfoRelais(formm, type){
	
	ctlvar = new String();
	
	
			
	
	ctl = "O";
	
	VerifSaisie("SIEGE", "le siège !");
	if (ctl == "N") return false;	
	CapitalSAisie("SIEGE");
	
	
	
	VerifSaisie("ADRESSE_SIEGE_1", "l'adresse du siège !");
	if (ctl == "N") return false;
	CapitalSAisie("ADRESSE_SIEGE_1");
	
	
	if (document.forms["frmInscript"].elements["ADRESSE_SIEGE_2"].value.length > 0){	
    	CapitalSAisie("ADRESSE_SIEGE_2");
    }
	if (document.forms["frmInscript"].elements["ADRESSE_SIEGE_3"].value.length > 0){	
    	CapitalSAisie("ADRESSE_SIEGE_3");
    }
	
	VerifSaisie("CP_SIEGE", "le code postal du siège !");
	if (ctl == "N") return false;
	
	if (document.forms["frmInscript"].elements["CP_SIEGE"].value.length > 0){	
    	VerifCP("CP_SIEGE", "le code postal du siège");
		if (ctl == "N") return false;
    }
	
	
	VerifSaisie("VILLE_SIEGE", "la ville du siège !");
	if (ctl == "N") return false;
	CapitalSAisie("VILLE_SIEGE");
	
	rech2 = document.forms["frmInscript"].elements["REGION_SIEGE"].options[document.forms["frmInscript"].elements["REGION_SIEGE"].selectedIndex].value;
	if (rech2 == "**"){
			alert("Veuillez sélectionner une région !");
			document.forms["frmInscript"].elements["REGION_SIEGE"].focus();	
		}
	
	VerifSaisie("NOM_RESPONSABLE", "le nom du responsable !");
	if (ctl == "N") return false;
	CapitalSAisie("NOM_RESPONSABLE");
	
	VerifSaisie("PRENOM_RESPONSABLE", "le prénom du responsable !");
	if (ctl == "N") return false;
	
	
	
	if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length > 0){	
    	VerifTel("TEL_RESPONSABLE", "Le numéro de téléphone");
		if (ctl == "N") return false;
    }
	
	if (document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length > 0){	
    	VerifTel("MOBILE_RESPONSABLE", "Le numéro de mobile");
		if (ctl == "N") return false;
    }
	
	if (document.forms["frmInscript"].elements["FAX_RESPONSABLE"].value.length > 0){	
    	VerifTel("FAX_RESPONSABLE", "Le numéro de Fax");
		if (ctl == "N") return false;
    }
	
	if (document.forms["frmInscript"].elements["TEL_RESPONSABLE"].value.length < 1 && document.forms["frmInscript"].elements["MOBILE_RESPONSABLE"].value.length < 1){	
		window.alert("Veuillez saisir au moins 1 numero de téléphone !");
		document.forms["frmInscript"].elements["TEL_RESPONSABLE"].focus();
		ctl = "N";
		return ctl;		
	}
		
	
	
    	
    activ="FEDE" + nbfede 
		if (document.forms["frmInscript"].elements[activ].checked) {	        			
    			VerifSaisie("FEDE_AUTRE", "une affiliation autre !");
			if (ctl == "N") return false;
    		}
    		if (document.forms["frmInscript"].elements["FEDE_AUTRE"].value.length > 0){
    			activ="FEDE" + nbfede 
    			document.forms["frmInscript"].elements[activ].checked = true;    			
    		}
    	
	
	
	
	
	if (ctl == "O"){
		
		document.forms["frmInscript"].action="modification_relais_confirm.asp";
		
	  	document.forms["frmInscript"].submit();
	  }
	  else{
	  	return false;
	  }
		
}


function ControleInfoEven(formm){
	
	ctlvar = new String();
	
	
			
	
	ctl = "O";
	
	VerifSaisie("LOCALITE_EVENEMENT", "la localité !");
	if (ctl == "N") return false;
	CapitalSAisie("LOCALITE_EVENEMENT");	
	
	
	VerifSaisie("CP_EVENEMENT", "le code postal !");
	if (ctl == "N") return false;
	
	if (document.forms["frmInscript"].elements["NAT"][0].checked){	
	if (document.forms["frmInscript"].elements["CP_EVENEMENT"].value.length > 0){	
    	VerifCP("CP_EVENEMENT", "le code postal");
		if (ctl == "N") return false;
    	}
    	}
	
	
	
	VerifSaisie("NOM_CONTACT", "le nom du contact !");
	if (ctl == "N") return false;
	
	VerifSaisie("PRENOM_CONTACT", "le prénom du contact !");
	if (ctl == "N") return false;
	
	
	if (document.forms["frmInscript"].elements["TEL_CONTACT"].value.length > 0){	
    	VerifTel("TEL_CONTACT", "Le numéro de téléphone");
		if (ctl == "N") return false;
    }
	
	if (document.forms["frmInscript"].elements["MOBILE_CONTACT"].value.length > 0){	
    	VerifTel("MOBILE_CONTACT", "Le numéro de mobile");
		if (ctl == "N") return false;
    }
	
	
	
	if (document.forms["frmInscript"].elements["TEL_CONTACT"].value.length < 1 && document.forms["frmInscript"].elements["MOBILE_CONTACT"].value.length < 1){	
		window.alert("Veuillez saisir au moins 1 numero de téléphone !");
		document.forms["frmInscript"].elements["TEL_CONTACT"].focus();
		ctl = "N";
		return ctl;		
	}
		
	
	
   VerifSaisie("PRESENTATION", "une présentation sommaire de l'événement !");
	if (ctl == "N") return false;
   
	if (document.forms["frmInscript"].elements["file_plan"].value.length > 0){
      	browsejpeg = document.forms["frmInscript"].elements["file_plan"].value.toUpperCase().indexOf("JPEG") ;    
      	browsejpg = document.forms["frmInscript"].elements["file_plan"].value.toUpperCase().indexOf("JPG") ;   
   	browsegif = document.forms["frmInscript"].elements["file_plan"].value.toUpperCase().indexOf("GIF") ;  
   	browsepdf = document.forms["frmInscript"].elements["file_fiche"].value.toUpperCase().indexOf("PDF") ;   
   		if (browsejpeg == -1 & browsejpg == -1 & browsegif == -1 & browsepdf == -1){
			alert("Veuillez selectionner une image jpg ou jpeg ou gif ou pdf");	
    		document.forms["frmInscript"].elements["file_plan"].focus();
    		return false;
		}
    	
    }
	
	if (document.forms["frmInscript"].elements["file_logo"].value.length > 0){
	 	browsejpeg = document.forms["frmInscript"].elements["file_logo"].value.toUpperCase().indexOf("JPEG") ;   
	 	browsejpg = document.forms["frmInscript"].elements["file_logo"].value.toUpperCase().indexOf("JPG") ;   
   		browsegif = document.forms["frmInscript"].elements["file_logo"].value.toUpperCase().indexOf("GIF") ;   
   		if (browsejpeg == -1 & browsejpg == -1 & browsegif == -1){
			alert("Veuillez selectionner une image jpg ou jpeg ou gif");	
    		document.forms["frmInscript"].elements["file_logo"].focus();
    		return false;
		}
    	
    }
	
	if (document.forms["frmInscript"].elements["file_fiche"].value.length > 0){
	 	browsejpeg = document.forms["frmInscript"].elements["file_fiche"].value.toUpperCase().indexOf("JPEG") ;   
	 	browsejpg = document.forms["frmInscript"].elements["file_fiche"].value.toUpperCase().indexOf("JPG") ;   
   		browsegif = document.forms["frmInscript"].elements["file_fiche"].value.toUpperCase().indexOf("PDF") ;   
   		if (browsejpeg == -1 & browsejpg == -1 & browsegif == -1){
			alert("Veuillez selectionner une image jpg ou jpeg ou pdf");	
    		document.forms["frmInscript"].elements["file_fiche"].focus();
    		return false;
		}
    	
    }
	
	for (i=1; i<=4; i++){
	

    	if (document.forms["frmInscript"].elements["file_photo_"+i].value.length > 0){
    	 browsejpeg = document.forms["frmInscript"].elements["file_photo_"+i].value.toUpperCase().indexOf("JPEG") ;   
    	 browsejpg = document.forms["frmInscript"].elements["file_photo_"+i].value.toUpperCase().indexOf("JPG") ;     
   		if (browsejpeg == -1 & browsejpg == -1){
			alert("Veuillez selectionner une image jpg ou jpeg");	
    		document.forms["frmInscript"].elements["file_photo_"+i].focus();
    		return false;
		}
        	

        }
	}
	
	for (i=1; i<=3; i++){
	

    	if (document.forms["frmInscript"].elements["file_partenaire_"+i].value.length > 0){
    	 browsejpeg = document.forms["frmInscript"].elements["file_partenaire_"+i].value.toUpperCase().indexOf("JPEG") ;   
    	 browsejpg = document.forms["frmInscript"].elements["file_partenaire_"+i].value.toUpperCase().indexOf("JPG") ;     
   		browsegif = document.forms["frmInscript"].elements["file_partenaire_"+i].value.toUpperCase().indexOf("GIF") ;   
   		if (browsejpeg == -1 & browsejpg == -1 & browsegif == -1){
			alert("Veuillez selectionner une image jpg ou jpeg");	
    		document.forms["frmInscript"].elements["file_partenaire_"+i].focus();
    		return false;
		}
        	

        }
}
	/*if (document.forms["frmInscript"].elements["MINISTERE"].value.length > 0){	
		ctlmin = "N";
		if (document.forms["frmInscript"].elements["ACCEPTE"].checked){ctlmin = "O";}
	

		if (ctlmin == "O"){	
		
			VerifSaisie("TITRE_EVENEMENT", "le titre de votre événement !");
			if (ctl == "N") return false;
		}
		if (document.forms["frmInscript"].elements["TITRE_EVENEMENT"].value.length > 0){
			if (document.forms["frmInscript"].elements["ACCEPTE"].checked == false){
				window.alert("Vous devez cocher la case pour valider votre présentation sur le site des Journées de la mer");
		
		
				document.forms["frmInscript"].elements["ACCEPTE"].focus();
				ctl = "N";
				return false;
			}
		}	
		
		
	}*/
	
	if (ctl == "O"){
		if (n) {
			if (ns4) {
				document.layers["message"].visibility='show';
			}
			if (ns6){		
				document.getElementById("message").style.visibility="visible";			
			}
		}
		else{
			document.all["message"].style.visibility='visible';
		}	
	 	document.forms["frmInscript"].action="evenement_valid.asp";
		document.forms["frmInscript"].submit();
	  }
	  else{
	  	return false;
	  }
		
}

function ControleLivraison(){

	ctl = "O";
	 
	 VerifSaisie("NOM_LIVRAISON", "Nom ou votre Raison sociale");
      	if (ctl == "N") return false;
      	CapitalSAisie("NOM_LIVRAISON");
      	
      	 VerifSaisie("ADRESSE_LIVRAISON_1", "l'adresse de livraison !");
      	if (ctl == "N") return false;
      	CapitalSAisie("ADRESSE_LIVRAISON_1");
      	
      	
      	CapitalSAisie("ADRESSE_LIVRAISON_2");
      	
      	
      	CapitalSAisie("ADRESSE_LIVRAISON_3");
      	
      	
      	if (document.forms["frmInscript"].elements["CP_LIVRAISON"].value.length > 0){	
          	VerifCP("CP_LIVRAISON", "le code postal de livraison");
          }
      	VerifSaisie("CP_LIVRAISON", "le code postal de livraison !");
      	if (ctl == "N") return false;
      	
      
      	VerifSaisie("VILLE_LIVRAISON", "la ville de livraison !");
      	if (ctl == "N") return false;
      	CapitalSAisie("VILLE_LIVRAISON");
      	
      	VerifSaisie("TEL_LIVRAISON", "Tel / Mobile");
      	if (ctl == "N") return false;
	 	
	if (ctl == "O"){
	 	document.forms["frmInscript"].action="modif_adresse_livraison_maj.asp";
	  	document.forms["frmInscript"].submit();
	 }
	  else{
	  	return false;
	  }
		
}

function VerifSaisie(champ, libelle){	
if (document.forms["frmInscript"].elements[champ].value.length < 1){			
			
		window.alert("Veuillez saisir " + libelle );
	
			
			document.forms["frmInscript"].elements[champ].focus();
			ctl = "N";
			return ctl;		
	}	
}
function VerifTel(champ, lebelle){
	if (document.forms["frmInscript"].elements[champ].value.length = 1){	
		if (document.forms["frmInscript"].elements[champ].value == "0"){	
			document.forms["frmInscript"].elements[champ].value = "";
		}
	}
	if (document.forms["frmInscript"].elements[champ].value.length > 0){	
	
		nb = document.forms["frmInscript"].elements[champ].value		
		
		var ok = ""
		while (nb.length > 0){
			nbn = parseInt(nb.charAt(0))
			if (isNaN(nbn)){
				ok = "n"
			}	
			nb = nb.substring(1,nb.length)
		}
		if (ok == "n"){
			window.alert(lebelle + " n'est pas valide !");
			document.forms["frmInscript"].elements[champ].focus();	
			ctl = "N";
			return false;
		}
		else{ 					
				
				if (document.forms["frmInscript"].elements[champ].value.length != 10){
					window.alert(lebelle + " doit comporter 10 chiffres !");
					document.forms["frmInscript"].elements[champ].focus();	
					ctl = "N";
					return false;		
				}						
		}
			
	}
	
}
function VerifCP(champ, lebelle){
	
	if (document.forms["frmInscript"].elements[champ].value.length > 0){	
	
		nb = document.forms["frmInscript"].elements[champ].value		
		
		var ok = ""
		while (nb.length > 0){
			nbn = parseInt(nb.charAt(0))
			if (isNaN(nbn)){
				ok = "n"
			}	
			nb = nb.substring(1,nb.length)
		}
		if (ok == "n"){
			window.alert(lebelle + " n'est pas valide !");
			document.forms["frmInscript"].elements[champ].focus();	
			ctl = "N";
			return false;
		}
		else{ 					
				
				if (document.forms["frmInscript"].elements[champ].value.length != 5){
					window.alert(lebelle + " doit comporter 5 chiffres !");
					document.forms["frmInscript"].elements[champ].focus();	
					ctl = "N";
					return false;		
				}					
						
		}
			
	}
	
}
function CapitalSAisie(champ){
ctlvar = document.forms["frmInscript"].elements[champ].value;
	ctlvar = ctlvar.toUpperCase();
	document.forms["frmInscript"].elements[champ].value = ctlvar
	}




function ControleInfo(){
	ctl = "O";
	if (document.forms["form_org"].elements["LOGIN"].value.length < 1){
		window.alert("Veuillez saisir votre adresse e-mail ! ");
		document.forms["form_org"].elements["LOGIN"].focus();
		ctl = "N";
		return false;		
	}
	if (document.forms["form_org"].elements["LOGIN"].value == "admin"){
	}
	else{
		var mail = document.forms["form_org"].elements["LOGIN"].value;
        	document.forms["form_org"].elements["LOGIN"].value = document.forms["form_org"].elements["LOGIN"].value.toLowerCase();
        	var mail = document.forms["form_org"].elements["LOGIN"].value;
       	 	var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/	
   		ctl2 = reg.exec(mail)!=null
   		ctl = ctl2?"O":"N";
		if (ctl == "N"){ 
			window.alert("L'adresse e-mail semble incorrecte !");
        		document.forms["form_org"].elements["LOGIN"].focus();          		
        		return false;	
		}
	}
	if (document.forms["form_org"].elements["PW"].value.length < 1){
		window.alert("Veuillez saisir votre Mot de passe !");
		document.forms["form_org"].elements["PW"].focus();
		ctl = "N";
		return false;		
	}
	
	if (ctl == "O"){
	
	 	document.forms["form_org"].action="login_ctl.asp";
	  	document.forms["form_org"].submit();
	  }
	  else{
	  	return false;
	  }
		
}

function ControleInfoPW(){
ctl = "O";
	
	
	if (document.forms["frmEcrire"].elements["EMAIL"].value.length < 1){
      window.alert("Veuillez saisir votre adresse E-mail !");
	document.forms["frmEcrire"].elements["EMAIL"].focus();        		
        	ctl = "N";
			return false;
        								
    }
	if (document.forms["frmEcrire"].elements["EMAIL"].value.length > 0){
        var mail = document.forms["frmEcrire"].elements["EMAIL"].value;
        document.forms["frmEcrire"].elements["EMAIL"].value = document.forms["frmEcrire"].elements["EMAIL"].value.toLowerCase();
        var mail = document.forms["frmEcrire"].elements["EMAIL"].value;
        var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/	
   		ctl2 = reg.exec(mail)!=null
   		ctl = ctl2?"O":"N";
		if (ctl == "N"){ 
			
			window.alert("Votre adresse E-mail semble incorrecte !");
				
			document.forms["frmEcrire"].elements["EMAIL"].focus();        		
        		avalid = false;
			return false;	
		}								
    }
	
	if (ctl == "O"){
		
	 	document.forms["frmEcrire"].action="contact_identifiants_envoi.asp";
	  	document.forms["frmEcrire"].submit();
	  }
	  else{
	  	return false;
	  }
	
}

function testclic(f,chp,valeur){

	if (document.forms[f].elements[chp].value == valeur){			
			document.forms[f].elements[chp].value = "";	
	}
	
}

function SelectRech(typrech) {
	
	var prog;
	var typesel;
	var selection;
	
	rech = document.forms["form_rech"].elements["selectrech"].options[document.forms["form_rech"].elements["selectrech"].selectedIndex].value;
	rech2 = document.forms["form_rech"].elements["selectrechact"].options[document.forms["form_rech"].elements["selectrechact"].selectedIndex].value;
	document.forms["form_rech"].elements["id_dep"].value = document.forms["form_rech"].elements["selectrech"].options[document.forms["form_rech"].elements["selectrech"].selectedIndex].value;	
	document.forms["form_rech"].elements["activite"].value = document.forms["form_rech"].elements["selectrechact"].options[document.forms["form_rech"].elements["selectrechact"].selectedIndex].value;	
	if (rech2 != "ACT" || rech != "DEP"){
		typrech = "2"
	}
	else{
		typrech = "3"
	}
	
	if (typrech == "2"){
	
		if (rech2 == "ACT" && rech == "DEP"){
			alert("Veuillez faire une sélection !");
			document.forms["form_rech"].elements["selectrech"].focus();	
		}
		else{
			if (rech2 == "ACT"){
				document.forms["form_rech"].elements["activite"].value = "";
			}
			if (rech == "DEP"){
				document.forms["form_rech"].elements["id_dep"].value = "";
			}
			
			document.forms["form_rech"].action="recherche_resultat.asp";
			document.forms["form_rech"].submit();
		}	
	
	}
	if (typrech == "3"){
	if (document.forms["form_rech"].elements["mot_cle"].value.length < 1){
		window.alert("Veuillez saisir un mot clé ou faire une sélection !");
		document.forms["form_rech"].elements["mot_cle"].focus();
		ctl = "N";
		return false;		
	}
	
	if (document.forms["form_rech"].elements["mot_cle"].value == "Mot clé"){
		window.alert("Veuillez saisir un mot clé ou faire une sélection !");
		document.forms["form_rech"].elements["mot_cle"].focus();
		ctl = "N";
		return false;		
	}
	document.forms["form_rech"].action="recherche_mot_cle.asp";
			document.forms["form_rech"].submit();
	}
	
}

function ControleInfoContact(){
ctl = "O";
	
	
	if (document.forms["frmEcrire"].elements["EMAIL"].value.length < 1){
      window.alert("Veuillez saisir votre adresse E-mail !");
	document.forms["frmEcrire"].elements["EMAIL"].focus();        		
        	ctl = "N";
			return false;
        								
    }
	if (document.forms["frmEcrire"].elements["EMAIL"].value.length > 0){
        var mail = document.forms["frmEcrire"].elements["EMAIL"].value;
        document.forms["frmEcrire"].elements["EMAIL"].value = document.forms["frmEcrire"].elements["EMAIL"].value.toLowerCase();
        var mail = document.forms["frmEcrire"].elements["EMAIL"].value;
        	var reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/	
   		ctl2 = reg.exec(mail)!=null
   		ctl = ctl2?"O":"N";
		if (ctl == "N"){ 
			window.alert("L'adresse e-mail semble incorrecte !");
        		document.forms["frmEcrire"].elements["EMAIL"].focus();          		
        		return false;	
		}									
    }
	if (document.forms["frmEcrire"].elements["MESSAGE"].value.length < 1){
		window.alert("Merci de saisir votre message");
		document.forms["frmEcrire"].elements["MESSAGE"].focus();
		ctl = "N";
		return false;		
	}
	if (ctl == "O"){
		
	 	document.forms["frmEcrire"].action="contact_envoi.asp";
	  	document.forms["frmEcrire"].submit();
	  }
	  else{
	  	return false;
	  }
	
}

var dernier = 'presentation';
var lay
lay = dernier
function AffRub(num){	
	lay = num	
	document.getElementById(lay).style.visibility="visible";			
	dernier = num
}
function EffRub(num){
	lay = num
	document.getElementById(lay).style.visibility="hidden";
}




 function ControleInfoBreves(mode){
	
	ctlvar = new String();
	
	
	 
			
	
	ctl = "O";
	
	
	
	VerifSaisie("DETAIL_BREVE", "la brève !");
	if (ctl == "N") return false;
	
	
	if (document.forms["frmInscript"].elements["DETAIL_BREVE"].value.length > max ){			
			window.alert("Votre Brève fait plus de " + max + " caractères" );
			document.forms["frmInscript"].elements["DETAIL_BREVE"].focus();
			ctl = "N";
			return ctl;		
	}	
	
	if (document.forms["frmInscript"].elements["INTRO_BREVE"].value == ""){	
    		document.forms["frmInscript"].elements["INTRO_BREVE"].value = document.forms["frmInscript"].elements["DETAIL_BREVE"].value.substr(0,50) + "..."
    	}
	
	if (ctldate == "OUI"){
		VerifSaisie("DATE_DEBUT", "la date de début !");
		if (ctl == "N") return false;	
	
		if (verif_date(document.forms["frmInscript"].elements["DATE_DEBUT"].value)){
		}
		else{	
			window.alert("La date de début est erronnée !");
	 		document.forms["frmInscript"].elements["DATE_DEBUT"].focus();
	 		ctl = "N"
	 		return false;
	 
	 	}
	
		VerifSaisie("DATE_FIN", "la date de fin !");
		if (ctl == "N") return false;
	
		if (verif_date(document.forms["frmInscript"].elements["DATE_FIN"].value)){
		}
		else{	
			window.alert("La date de fin est erronnée !");
	 		document.forms["frmInscript"].elements["DATE_FIN"].focus();
	 		ctl = "N"
	 		return false;
	 
	 	}
	 
	 	var datedebctl = document.forms["frmInscript"].elements["DATE_DEBUT"].value ;
	 	var datefinctl = document.forms["frmInscript"].elements["DATE_FIN"].value ;
	 	
	 	jjd = datedebctl.substr(0, 2);
		mmd = datedebctl.substr(3, 2);
		aaaad = datedebctl.substr(6, 4);
		
		jjf = datefinctl.substr(0, 2);
		mmf = datefinctl.substr(3, 2);
		aaaaf = datefinctl.substr(6, 4);
		
		datedebctl = mmd + "/" + jjd + "/" + aaaad;
		datefinctl = mmf + "/" + jjf + "/" + aaaaf;
		
		datedeb = new Date(datedebctl) ;
	 	datefin = new Date(datefinctl) ;
	 	datejour =  new Date(document.forms["frmInscript"].elements["DATEJOUR"].value) ;
	 
	
		if (datedeb < datejour){
			window.alert("La date début ne peut être inférieure à la date du jour !");
			document.forms["frmInscript"].elements["DATE_DEBUT"].focus();
			ctl = "N"
	 		return false;
		}
		if (datefin < datedeb){
			window.alert("La date fin ne peut être inférieure à la date de début !");
			document.forms["frmInscript"].elements["DATE_DEBUT"].focus();
			ctl = "N"
	 		return false;
		}
	}
	
	if (ctl == "O"){
		if (mode == "saisie"){
			document.forms["frmInscript"].action="breves_saisie_validation.asp";
		}
		if (mode == "maj"){
			document.forms["frmInscript"].action="breves_modification_validation.asp";
		}
	  	document.forms["frmInscript"].submit();
	  	
	  }
	  else{
	  	return false;
	  }
		
}
 function verif_date(input)
{
var regex = new RegExp("[/-]");
var date = input.split(regex);
var nbJours = new Array('',31,28,31,30,31,30,31,31,30,31,30,31);
var result = true;

if ( date['2']%4 == 0 && date['2']%100 > 0 || date['2']%400 == 0 )
nbJours['2'] = 29;

if( isNaN(date['2']) )
result=false;

if ( isNaN(date['1']) || date['1'] > 12 || date['1'] < 1 )
result=false;

if ( isNaN(date['0']) || date['0'] > nbJours[Math.round(date['1'])] || date['0'] < 1 )
result=false;

return result;
}

function compter(f) {

	
	var txt=f.elements['DETAIL_BREVE'].value;
	var nb=txt.length ;
	if (nb>max) { 
		window.alert("Votre Brève fait plus de " + max + " caractères" );
		
		f.elements['DETAIL_BREVE'].value=txt.substring(0,max);
		nb=max;
	}
	
	document.getElementById("libcaract").innerHTML = "(<b>" + nb +  "</b> caractères saisis)";
}

function timer() {
	compter(document.forms["frmInscript"]);
	setTimeout("timer()",100);
}




 function ControleInfoBrevesAdmin(){
	
	ctlvar = new String();
	
	
	 
			
	
	ctl = "O";
	
	
	
	
	
		VerifSaisie("DATE_DEBUT", "la date de début !");
		if (ctl == "N") return false;	
	
		if (verif_date(document.forms["frmInscript"].elements["DATE_DEBUT"].value)){
		}
		else{	
			window.alert("La date de début est erronnée !");
	 		document.forms["frmInscript"].elements["DATE_DEBUT"].focus();
	 		ctl = "N"
	 		return false;
	 
	 	}
	
		VerifSaisie("DATE_FIN", "la date de fin !");
		if (ctl == "N") return false;
	
		if (verif_date(document.forms["frmInscript"].elements["DATE_FIN"].value)){
		}
		else{	
			window.alert("La date de fin est erronnée !");
	 		document.forms["frmInscript"].elements["DATE_FIN"].focus();
	 		ctl = "N"
	 		return false;
	 
	 	}
	 
	 	var datedebctl = document.forms["frmInscript"].elements["DATE_DEBUT"].value ;
	 	var datefinctl = document.forms["frmInscript"].elements["DATE_FIN"].value ;
	 	
	 	jjd = datedebctl.substr(0, 2);
		mmd = datedebctl.substr(3, 2);
		aaaad = datedebctl.substr(6, 4);
		
		jjf = datefinctl.substr(0, 2);
		mmf = datefinctl.substr(3, 2);
		aaaaf = datefinctl.substr(6, 4);
		
		datedebctl = mmd + "/" + jjd + "/" + aaaad;
		datefinctl = mmf + "/" + jjf + "/" + aaaaf;
		
		datedeb = new Date(datedebctl) ;
	 	datefin = new Date(datefinctl) ;
	 	datejour =  new Date(document.forms["frmInscript"].elements["DATEJOUR"].value) ;
	 
	
		if (datedeb < datejour){
			window.alert("La date début ne peut être inférieure à la date du jour !");
			document.forms["frmInscript"].elements["DATE_DEBUT"].focus();
			ctl = "N"
	 		return false;
		}
		if (datefin < datedeb){
			window.alert("La date fin ne peut être inférieure à la date de début !");
			document.forms["frmInscript"].elements["DATE_DEBUT"].focus();
			ctl = "N"
	 		return false;
		}
	
	
	if (ctl == "O"){
		
			document.forms["frmInscript"].action="admin_breves_modification_dates_validation.asp";
		
	  	document.forms["frmInscript"].submit();
	  	
	  }
	  else{
	  	return false;
	  }
		
}
//-->

