//validation formulaire
function validatea()   
    {
	//return true;
      var i, n;
      // ***********Verif Compte pas vide et + de 2 carac
      if ((document.signup.username.value == " ") || (document.signup.username.value.length < 2)) 
      {
        alert("Le pseudo doit avoir au moins 2 caractères.");
        document.signup.username.focus(); 
        return false;
      } 
      
      //***********Verif pas de carac spéciaux dans username                  
      if (document.signup.username.value.indexOf('`') >= 0 ||
          document.signup.username.value.indexOf('~') >= 0 ||
          document.signup.username.value.indexOf('@') >= 0 ||
          document.signup.username.value.indexOf('#') >= 0 ||
          document.signup.username.value.indexOf('$') >= 0 ||
          document.signup.username.value.indexOf('%') >= 0 ||
          document.signup.username.value.indexOf('&') >= 0 ||
          document.signup.username.value.indexOf('*') >= 0 ||
          document.signup.username.value.indexOf('(') >= 0 ||
          document.signup.username.value.indexOf(')') >= 0 ||
          document.signup.username.value.indexOf('+') >= 0 ||
          document.signup.username.value.indexOf('{') >= 0 ||
          document.signup.username.value.indexOf('}') >= 0 ||
          document.signup.username.value.indexOf('|') >= 0 ||
          document.signup.username.value.indexOf('[') >= 0 ||
          document.signup.username.value.indexOf(']') >= 0 ||
          document.signup.username.value.indexOf('\\') >= 0 ||
          document.signup.username.value.indexOf('>') >= 0 ||
          document.signup.username.value.indexOf('<') >= 0 ||
          document.signup.username.value.indexOf('/') >= 0 || 
          document.signup.username.value.indexOf('\'') >= 0 || 
          document.signup.username.value.indexOf('!') >= 0 ||
          document.signup.username.value.indexOf(',') >= 0 ||
          document.signup.username.value.indexOf('?') >= 0 ||  
       	  document.signup.username.value.indexOf(';') >= 0 ||
          document.signup.username.value.indexOf(':') >= 0 ||  
       	  document.signup.username.value.indexOf('^') >= 0 ||
          document.signup.username.value.indexOf('"') >= 0 )  
          {
            alert("Le pseudo ne peut pas contenir de caractéres spéciaux : `~@#$%&*()+{}|[]\</>!,?;:^\""); 
            document.signup.username.focus();
            return false;
          }
      
      	//***********Verif pas d'espaces dans Pseudo
      
      	if (document.signup.username.value.indexOf(' ') >= 0)
      	{
       	     alert("Votre pseudo ne peut pas contenir d'espaces."); 
       	     document.signup.username.focus();
       	     return false;
       	}	     
       	
       	//***********Verif pas de points a la fin
      	var toto = document.signup.username.value;
      	
      	if (toto.substring((toto.length), (toto.length)-1) == '.')
      	{
       	     alert("Votre pseudo ne peut pas de point a la fin."); 
       	     document.signup.username.focus();
       	     return false;
       	}	     
       	
       	
       	
       	//***********Verif pas d'accents dans Pseudo
       	if (document.signup.username.value.indexOf('é') >= 0 ||
       	    document.signup.username.value.indexOf('è') >= 0 ||
       	    document.signup.username.value.indexOf('à') >= 0 ||
       	    document.signup.username.value.indexOf('ù') >= 0 ||
       	    document.signup.username.value.indexOf('ê') >= 0 ||
       	    document.signup.username.value.indexOf('â') >= 0 ||
       	    document.signup.username.value.indexOf('î') >= 0)
      	{
       	    alert("Votre pseudo ne peut pas contenir d'accents."); 
       	    document.signup.username.focus();
       	     return false;
       	}	     
       		           
      //***********Verif pas d'espaces dans pass
            
      	if (document.signup.passwd1.value.indexOf(' ') >= 0)
      	{
       	    alert("Le mot de passe de doit pas contenir d'espaces.");	
            document.signup.passwd1.value=''
            document.signup.passwd2.value=''
            document.signup.passwd1.focus();
            return false;
       	}	     
      
      //***********Verif pass > 4 carac  
      if (document.signup.passwd1.value.length < 4)  
        {
          alert("Votre mot de passe doit posséder au moins 4 caractéres.");	
          document.signup.passwd1.value=''
          document.signup.passwd2.value=''
          document.signup.passwd1.focus();
          return false;
        }
      //***********Verif pass identiques
      if (document.signup.passwd1.value != document.signup.passwd2.value) 
        {
          alert("Les mots de passe ne correspondent pas!");
          document.signup.passwd1.value=''
          document.signup.passwd2.value=''
          document.signup.passwd1.focus();
          return false;
        } else if (document.signup.passwd1.value.length != document.signup.passwd2.value.length) 
        {
          alert("Les mots de passe ne correspondent pas!");
          document.signup.passwd1.value=''
          document.signup.passwd2.value=''
          document.signup.passwd1.focus();
          return false;
        }
        
      // ***********Verif nom pas vide
      if (document.signup.nom.value == "") 
      {
        alert("Veuillez entrer votre nom.");
        document.signup.nom.focus(); 
        return false;
      } 

      // ***********Verif Prénom pas vide
      if (document.signup.prenom.value == "") 
      {
        alert("Veuillez entrer votre Prénom.");
        document.signup.prenom.focus(); 
        return false;
      } 
      
      // ***********Verif region pas vide 
      if (document.signup.region.value== "00")
      {
        alert("Veuillez saisir votre région SVP.");
        document.signup.region.focus(); 
        return false;
      }
      
      // ***********Verif Sexe pas vide 
      if (document.signup.radioEst.value == "00")
      {
        alert("Veuillez saisir votre sexe SVP.");
        document.signup.radioEst.focus();
        return false;
      }    
      
      // ***********Verif email present
      if (document.signup.email.value == "") 
      {
      	alert("Veuillez entrer une adresse Email SVP.")
		document.signup.email.focus(); 
        return false;
      }else{
		if (!emailCheck(document.signup.email.value)) return false;
      }
      
	  return true; 
}


function validateb() {
	var i, n;
	
	if (document.signup.pseudo.value.indexOf('\'') >= 0) 
      {
        alert("Votre pseudo de dialogue en direct ne doit pas contenir de '");
        document.signup.pseudo.focus(); 
        return false;
      }
      
      
      // ***********Verif pseudo pas vide et + de 2 carac
      if ((document.signup.pseudo.value == " ") || (document.signup.pseudo.value.length < 2)) 
      {
        alert("Votre pseudo doit avoir au moins 2 caracteres.");
        document.signup.pseudo.focus(); 
        return false;
      } 
      
      // ***********Verif CV pas vide 
      if (document.signup.CV.value.length < 1)
      {
        alert("Veuillez vous décrire SVP.");
        document.signup.CV.focus(); 
        return false;
      } 
	  
      // ***********Verif dept pas vide 
      if (document.signup.dept.value == "00")
      {
        alert("Veuillez saisir votre département SVP.");
        document.signup.dept.focus(); 
        return false;
      } 
	  
      // ***********Verif Recherche pas vide 
      if (!document.signup.recbox1.checked && !document.signup.recbox2.checked && !document.signup.recbox3.checked && !document.signup.recbox0.checked)
      {
        alert("Veuillez saisir votre recherche SVP.");
        document.signup.recbox1.focus();
        return false;
      } 
	return true;
}


//validation formulaire
function validateForm() {

	var i, n, doIt;
      	
      	//USERNAME
	doIt = 1;
	try {
		document.signup.username.value;
	}
	catch (error) {
		doIt = 0;
	}
      
      	if (doIt == 1) {
	      // ***********Verif Compte pas vide et + de 2 carac
	      if ((document.signup.username.value == " ") || (document.signup.username.value.length < 2)) 
	      {
	        alert("Le pseudo email doit avoir au moins 2 caractères.");
	        document.signup.username.focus(); 
	        return false;
	      } 
	      
	      //***********Verif pas de carac spéciaux dans username                  
	      if (document.signup.username.value.indexOf('`') >= 0 ||
	          document.signup.username.value.indexOf('~') >= 0 ||
	          document.signup.username.value.indexOf('@') >= 0 ||
	          document.signup.username.value.indexOf('#') >= 0 ||
	          document.signup.username.value.indexOf('$') >= 0 ||
	          document.signup.username.value.indexOf('%') >= 0 ||
	          document.signup.username.value.indexOf('&') >= 0 ||
	          document.signup.username.value.indexOf('*') >= 0 ||
	          document.signup.username.value.indexOf('(') >= 0 ||
	          document.signup.username.value.indexOf(')') >= 0 ||
	          document.signup.username.value.indexOf('+') >= 0 ||
	          document.signup.username.value.indexOf('{') >= 0 ||
	          document.signup.username.value.indexOf('}') >= 0 ||
	          document.signup.username.value.indexOf('|') >= 0 ||
	          document.signup.username.value.indexOf('[') >= 0 ||
	          document.signup.username.value.indexOf(']') >= 0 ||
	          document.signup.username.value.indexOf('\\') >= 0 ||
	          document.signup.username.value.indexOf('>') >= 0 ||
	          document.signup.username.value.indexOf('<') >= 0 ||
	          document.signup.username.value.indexOf('/') >= 0 || 
	          document.signup.username.value.indexOf('\'') >= 0 || 
	          document.signup.username.value.indexOf('!') >= 0 ||
	          document.signup.username.value.indexOf(',') >= 0 ||
	          document.signup.username.value.indexOf('?') >= 0 ||  
	       	  document.signup.username.value.indexOf(';') >= 0 ||
	          document.signup.username.value.indexOf(':') >= 0 ||  
	       	  document.signup.username.value.indexOf('^') >= 0 ||
	          document.signup.username.value.indexOf('"') >= 0 )  
	          {
	            alert("Le pseudo ne peut pas contenir de caractéres spéciaux : `~@#$%&*()+{}|[]\</>!,?;:^\""); 
	            document.signup.username.focus();
	            return false;
	          }
	      
	      	//***********Verif pas d'espaces dans Pseudo
	      
	      	if (document.signup.username.value.indexOf(' ') >= 0)
	      	{
	       	     alert("Votre pseudo ne peut pas contenir d'espaces."); 
	       	     document.signup.username.focus();
	       	     return false;
	       	}	     
	       	
	       	//***********Verif pas de points a la fin
	      	var toto = document.signup.username.value;
	      	
	      	if (toto.substring((toto.length), (toto.length)-1) == '.')
	      	{
	       	     alert("Votre pseudo ne peut pas de point a la fin."); 
	       	     document.signup.username.focus();
	       	     return false;
	       	}	     
	       	
	       	
	       	
	       	//***********Verif pas d'accents dans Pseudo
	       	if (document.signup.username.value.indexOf('é') >= 0 ||
	       	    document.signup.username.value.indexOf('è') >= 0 ||
	       	    document.signup.username.value.indexOf('à') >= 0 ||
	       	    document.signup.username.value.indexOf('ù') >= 0 ||
	       	    document.signup.username.value.indexOf('ê') >= 0 ||
	       	    document.signup.username.value.indexOf('â') >= 0 ||
	       	    document.signup.username.value.indexOf('î') >= 0)
	      	{
	       	    alert("Votre pseudo ne peut pas contenir d'accents."); 
	       	    document.signup.username.focus();
	       	     return false;
	       	}	     
	}//doIt
	///////////////////////////////////////////////////////////////////////////////        
	
	//PASSWORD
	doIt = 1;
	try {
		document.signup.passwd1.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
	      //***********Verif pas d'espaces dans pass
	            
	      	if (document.signup.passwd1.value.indexOf(' ') >= 0)
	      	{
	       	    alert("Le mot de passe de doit pas contenir d'espaces.");	
	            document.signup.passwd1.value=''
	            document.signup.passwd2.value=''
	            document.signup.passwd1.focus();
	            return false;
	       	}	     
	      
	      //***********Verif pass > 4 carac  
	      if (document.signup.passwd1.value.length < 4)  
	        {
	          alert("Votre mot de passe doit posséder au moins 4 caractéres.");	
	          document.signup.passwd1.value=''
	          document.signup.passwd2.value=''
	          document.signup.passwd1.focus();
	          return false;
	        }
	      //***********Verif pass identiques
	      if (document.signup.passwd1.value != document.signup.passwd2.value) 
	        {
	          alert("Les mots de passe ne correspondent pas!");
	          document.signup.passwd1.value=''
	          document.signup.passwd2.value=''
	          document.signup.passwd1.focus();
	          return false;
	        } else if (document.signup.passwd1.value.length != document.signup.passwd2.value.length) 
	        {
	          alert("Les mots de passe ne correspondent pas!");
	          document.signup.passwd1.value=''
	          document.signup.passwd2.value=''
	          document.signup.passwd1.focus();
	          return false;
	        }
	        
	     
	}//doIt
	///////////////////////////////////////////////////////////////////////////////        
	
	//PRENOM
	doIt = 1;
	try {
		document.signup.nom.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		
		// ***********Verif nom pas vide
	      	if (document.signup.nom.value == "") {
	        	alert("Veuillez entrer votre nom.");
	        	document.signup.nom.focus(); 
	        	return false;
	      	} 
      	} //doIt
      	///////////////////////////////////////////////////////////////////////////////      
		
	//PRENOM
	doIt = 1;
	try {
		document.signup.prenom.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		
		// ***********Verif Prénom pas vide
		if (document.signup.prenom.value == "") {
	        	alert("Veuillez entrer votre Prénom.");
	        	document.signup.prenom.focus(); 
	        	return false;
	      	} 
      	} //doIt
      	///////////////////////////////////////////////////////////////////////////////        
      	
      	//REGION
	doIt = 1;
	try {
		document.signup.region.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		// ***********Verif region pas vide 
      		if (document.signup.region.value== "00") {
        		alert("Veuillez saisir votre région SVP.");
        		document.signup.region.focus(); 
        		return false;
      		}
      	} //doIt
      	///////////////////////////////////////////////////////////////////////////////        
      	
      	//Est
	doIt = 1;
	try {
		document.signup.radioEst.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		// ***********Verif Sexe pas vide 
		if (document.signup.radioEst.value == "00") {
		        alert("Veuillez saisir votre sexe SVP.");
		        document.signup.radioEst.focus();
		        return false;
		      }    
      	} //doIt
      	///////////////////////////////////////////////////////////////////////////////        
      	
      	//Email
	doIt = 1;
	try {
		document.signup.radioEst.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		// ***********Verif email present
      		if (document.signup.email.value == "") 
      		{
      			alert("Veuillez entrer une adresse Email SVP.")
			document.signup.email.focus(); 
        		return false;
      		}else{
			if (!emailCheck(document.signup.email.value)) return false;
      		}
      	} //doIt
        ///////////////////////////////////////////////////////////////////////////////        
 	
 	//Pseudo
	doIt = 1;
	try {
		document.signup.pseudo.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		
		if (document.signup.pseudo.value.indexOf('\'') >= 0) 
      		{
        		alert("Votre pseudo de dialogue en direct ne doit pas contenir de '");
        		document.signup.pseudo.focus(); 
        		return false;
      		}
            
      		// ***********Verif pseudo pas vide et + de 2 carac
      		if ((document.signup.pseudo.value == " ") || (document.signup.pseudo.value.length < 2)) 
      		{
        		alert("Votre pseudo doit avoir au moins 2 caracteres.");
        		document.signup.pseudo.focus(); 
        		return false;
      		} 
      	} //doIt
        ///////////////////////////////////////////////////////////////////////////////        
 	
 	//CV
	doIt = 1;
	try {
		document.signup.CV.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		
		// ***********Verif CV pas vide 
		if (document.signup.CV.value.length < 1) {
		        alert("Veuillez vous décrire SVP.");
		        document.signup.CV.focus(); 
		        return false;
		} 
      	} //doIt
        ///////////////////////////////////////////////////////////////////////////////       
 	
 	
 	//dept
	doIt = 1;
	try {
		document.signup.dept.value;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		
		// ***********Verif dept pas vide 
      		if (document.signup.dept.value == "00")
      		{
        		alert("Veuillez saisir votre département SVP.");
        		document.signup.dept.focus(); mm
        		return false;
      		} 
      	} //doIt
        ///////////////////////////////////////////////////////////////////////////////       
 	
 	//Recherche
	doIt = 1;
	try {
		document.signup.recbox1.checked;
	}
	catch (error) {
		doIt = 0;
	}
	
	if (doIt == 1) {
		
		// ***********Verif Recherche pas vide 
      		if (!document.signup.recbox1.checked && !document.signup.recbox2.checked && !document.signup.recbox3.checked && !document.signup.recbox0.checked)
      		{
        		alert("Veuillez saisir votre recherche SVP.");
        		document.signup.recbox1.focus();
        		return false;
      		} 
      	} //doIt
        ///////////////////////////////////////////////////////////////////////////////      
 	 	       
      	return true; 
}




























function endValidate(){
	//alert(document.signup.charte.checked);
	if(!document.signup.charte.checked) {
		alert("Vous devez signer électroniquement notre charte en cochant la case \n'Je certifie...' afin de finaliser l'inscription à Loisirs 2000");
		document.signup.charte.focus();
		return false;
	}
	
	return true;

}
function load_img (which){
	var img_name = which.value;
	if (img_name != '') 
	{
		
		
				
		maxHeight = 200;
		maxWidth = 150;
		
		var dW = 0;
  		var dH = 0;
  		
  		
  		var oImg = new Image();
  		oImg.src = img_name;
  		var h = dH = oImg.height;
  		var w = dW = oImg.width;
				
		// Si la largeur ou la hauteur depasse la taille maximale
  		if ((h >= maxHeight) || (w >= maxWidth)) {
    			
    			// Si la largeur et la hauteur depasse la taille maximale
    			if ((h >= maxHeight) && (w >= maxWidth)) {
      			
      			// On cherche la plus grande valeur
      			if (h > w) {
        			dH = maxHeight;
        			// On recalcule la taille proportionnellement
        			dW = parseInt((w * dH) / h, 10);
      			} else {
        			dW = maxWidth;
        			// On recalcule la taille proportionnellement
        			dH = parseInt((h * dW) / w, 10);
      			}
    			
    			} else if ((h > maxHeight) && (w < maxWidth)) {
      				// Si la hauteur depasse la taille maximale
      				dH = maxHeight;
        			// On recalcule la taille proportionnellement
      				dW = parseInt((w * dH) / h, 10);
    			} else if ((h < maxHeight) && (w > maxWidth)) {
      				// Si la largeur depasse la taille maximale
      				dW = maxWidth;
        			// On recalcule la taille proportionnellement
      				dH = parseInt((h * dW) / w, 10);
    			}
		}
		
		if (dW != 0)
		{
			document.images.photoimg.width = dW;
			document.images.photoimg.height = dH;
			
		}
		
                document.images.photoimg.src=img_name;
	}
}


function emailCheck (emailStr) {
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var matchArray=emailStr.match(emailPat)
	
	if (matchArray==null) {
		alert("Votre Adresse Email est incorrecte")
		document.signup.email.focus(); 
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]

	if (user.match(userPat)==null) {
    // user is not valid
		alert("Votre Adresse Email est incorrecte")
		document.signup.email.focus(); 
    return false
	}
	
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
		// this is an IP address
		for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				alert("Votre Adresse Email est incorrecte")
				document.signup.email.focus(); 
			return false
			}
		}
	return true
	}	

	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		alert("Votre Adresse Email est incorrecte")
		document.signup.email.focus(); 
		return false
	}

	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || 
	    domArr[domArr.length-1].length>3) {
   
		alert("Votre Adresse Email est incorrecte")
		document.signup.email.focus(); 
		return false
	}

	if (len<2) {
		alert("Votre Adresse Email est incorrecte")
		document.signup.email.focus(); 
		return false
	}

	return true;
}

function textCounter(field, countfield, maxlimit) {
		if (field.value.length > maxlimit) 
			field.value = field.value.substring(0, maxlimit);
		else 
			countfield.value = maxlimit - field.value.length;
	}
	
function TrackCount(fieldObj,countFieldName,maxChars){
  		//var countField = eval("fieldObj.form."+countFieldName);
  		var countField = 400;
  		var diff = maxChars - fieldObj.value.length;

		
  		if (diff < 0)
  		{
    			fieldObj.value = fieldObj.value.substring(0,maxChars);
    			diff = maxChars - fieldObj.value.length;
  		}
  		countField.value = diff;
	}

function LimitText(fieldObj,maxChars){
  		var result = true;
  		if (fieldObj.value.length >= maxChars)
    			result = false;
 
		if (window.event)
    			window.event.returnValue = result;
  		return result;
	}

function checkAll(x){
		var n = 0;
		if(x.name!="recbox0"){ 
			n+=1;
			all=false;
		}else{
			if(all) all=false;
			else n=3;
		}
		if(n==3){
			document.signup.recbox1.checked=document.signup.recbox2.checked=document.signup.recbox3.checked=false;
			document.signup.recbox0.checked=true;
			n=0;all=true;
		}
		if(!all) document.signup.recbox0.checked=false;
		return true;	
	}


function detect(typab)
{
	if (typab == 'C')
	{
		if (document.Paie.payement[0].checked)
			{   
			   if (document.Paie.formule[0].checked)
			         {
			         //	alert("3 mois");
			         	document.Paie.rebilling.checked = true;
				        //document.Paie.rebilling.disabled = true;
			         }	
			    else if (document.Paie.formule[1].checked)
			         {
			          //	alert("6 mois");
			        	//document.Paie.rebilling.disabled = false;
			        }
			    else
			    {	
			        //alert("1 an")
			        //document.Paie.rebilling.disabled = false;
			     }
			}
			else
			{
				//paiement cheque
				document.Paie.rebilling.checked = false;
			        //document.Paie.rebilling.disabled = true;
			}
	}
	else
	{
		if (document.Paie.payement[0].checked)
		{   
			if (document.Paie.formule[0].checked)
			{
				//alert("1 mois")
				document.Paie.rebilling.checked = true;
				//document.Paie.rebilling.disabled = true;
			}   
			else if (document.Paie.formule[1].checked)
			{
				//	alert("3 mois");
				//document.Paie.rebilling.disabled = false;
			}	
			else if (document.Paie.formule[2].checked)
			{
				//	alert("6 mois");
				//document.Paie.rebilling.disabled = false;
			}
			else
			{	
			        //alert("1 an")
			        //document.Paie.rebilling.disabled = false;
			}
		}
		else
		{
			//paiement cheque
			document.Paie.rebilling.checked = false;
		        //document.Paie.rebilling.disabled = true;
		}
	}
				
}

function detect1()
{
	if (document.Paie.formule[0].checked)
	{
		document.Paie.rebilling.checked = true;
	}	
}

function Popup(page,largeur,hauteur) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+", menubar=no,status=no,titlebar=no, resizable=yes");
}


/////////////ANNONCES RENCONTRES

function checkIt(x){
	switch(x.name){
			case "checkbox1":
				document.signup.checkbox2.checked=document.signup.checkbox3.checked=false;
				break;
			case "checkbox2":
				document.signup.checkbox1.checked=document.signup.checkbox3.checked=false;
				break;
			case "checkbox3":
				document.signup.checkbox1.checked=document.signup.checkbox2.checked=false;
				break;
	}
	//document.forms.signup.mag.value=x.value;
	return true;
}
						
function valid() {

 if (document.signup.Mag[1].checked)
 {

      if (document.signup.Nom.value == "")
      {
        alert("Veuillez entrer votre Nom.");
        document.signup.Nom.focus();
        return false;
      }

      if (document.signup.Prenom.value == "")
      {
        alert("Veuillez entrer votre Prénom.");
        document.signup.Prenom.focus();
        return false;
      }

      if (document.signup.Adresse.value == "")
      {
        alert("Veuillez entrer votre Adresse.");
        document.signup.Adresse.focus();
        return false;
      }

      if (document.signup.CodePostal.value == "")
      {
        alert("Veuillez entrer votre Code Postal.");
        document.signup.CodePostal.focus();
        return false;
      }

      if (document.signup.Ville.value == "")
      {
        alert("Veuillez entrer votre Ville.");
        document.signup.Ville.focus();
        return false;
      }

      if (document.signup.CODE.value == "")
      {
        alert("Veuillez entrer votre Nom de Code.");
        document.signup.CODE.focus();
        return false;
      }

 }
}