<!--
function tradColorcaptcha(txtcolor){
	var m_arrColorUserFR=new Array()    // tableau des couleurs traduites
	var m_arrColor=new Array()    // tableau des couleurs Anglais
	
	m_arrColor[0] = "green"
	m_arrColor[1] = "blue"
	m_arrColor[2] = "red"
	m_arrColor[3] = "black"
	m_arrColor[4] = "yellow"


	m_arrColorUserFR[0] = "vert"
	m_arrColorUserFR[1] = "bleue"
	m_arrColorUserFR[2] = "rouge"
	m_arrColorUserFR[3] = "noir"
	m_arrColorUserFR[4] = "jaune"
	
	for(i=0;i<=4;i++){
		if(m_arrColorUserFR[i]==txtcolor.toLowerCase()){
			return m_arrColor[i];
		}
	}
	return false;
}
function validCheck(num_line,f){
	var frm=document.f;
	if(frm._id.length){
		for(i=0;i<frm._id.length;i++){
			if(i==num_line)continue;
			frm._id[i].checked=false;
		}
	}
}

function GoForm(nom,prenom,adrr1,rg,cp,ville,mail,tel,login,pswd1,pswd2,f,maxlongtxt,maxlongpswd){
	//alert(nom+','+mail+','+tel+','+f);
	if (!maxlongtxt){maxlongtxt=250}
	var ok=true;var frm=document.forms[f];
	if(nom!=0){
		if(frm[nom].value.length<2 || frm[nom].value.charCodeAt(0)==32){
			alert("Veuillez saisir un nom!")
			frm[nom].value="";
			frm[nom].focus();
			ok=false;return;
		}
	}
	if(prenom!=0){
		if(frm[prenom].value.length<2 || frm[prenom].value.charCodeAt(0)==32){
			alert("Veuillez saisir un prénom!")
			frm[prenom].value="";
			frm[prenom].focus();
			ok=false;return;
		}
	}
	if(adrr1!=0){
		if(frm[adrr1].value.length<2 || frm[adrr1].value.charCodeAt(0)==32){
			alert("Veuillez saisir une adresse!")
			frm[adrr1].value="";
			frm[adrr1].focus();
			ok=false;return;
		}
	}
	if(rg!=0){
		if(frm[rg].value<1){
			alert("Choisissez une région!")
			frm[rg].focus();
			ok=false;return;
		}
	}
	if(cp!=0){
		if(frm[cp].value.length<2 || frm[cp].value.charCodeAt(0)==32){
			alert("Veuillez saisir un code postal!")
			frm[cp].value="";
			frm[cp].focus();
			ok=false;return;
		}
	}
	if(ville!=0){
		if(frm[ville].value.length<2 || frm[ville].value.charCodeAt(0)==32){
			alert("Veuillez saisir une ville!")
			frm[ville].value="";
			frm[ville].focus();
			ok=false;return;
		}
	}
	if(mail!=0){
		if(frm[mail].value.length<2 || frm[mail].value.indexOf('@')<1){
			alert("Une adresse e-mail valide est requise")
			frm[mail].value="";
			frm[mail].focus();
			ok=false;return;
		}
	}
	if(login!=0){
		if(frm[login].value.length<2 || frm[login].value.charCodeAt(0)==32){
			alert("Veuillez saisir un pseudo!")
			frm[login].value="";
			frm[login].focus();
			ok=false;return;
		}
		if(maxlongpswd>0)ok=verifLength(login,frm,maxlongpswd);
	}
	if(pswd1!=0){
		if(frm[pswd1].value.length<2 || frm[pswd1].value.charCodeAt(0)==32){
			alert("Veuillez saisir un mot de passe!")
			frm[pswd1].value="";
			frm[pswd1].focus();
			ok=false;return;
		}
		if(maxlongpswd>0)ok=verifLength(pswd1,frm,maxlongpswd);
	}
	if(pswd2!=0){
		if(frm[pswd2].value.length<2 || frm[pswd2].value.charCodeAt(0)==32){
			alert("Confirmez le mot de passe!")
			frm[pswd2].value="";
			frm[pswd2].focus();
			ok=false;return;
		}
		if(frm[pswd1].value != frm[pswd2].value){
			alert("les mots de passe sont différents!")
			frm[pswd2].value="";
			frm[pswd2].focus();
			ok=false;return;
		}
	}
	if(tel!=0){
		if(frm[tel].value.length<2 || frm[tel].value.charCodeAt(0)==32){
			alert("Veuillez saisir un numéro de téléphone!")
			frm[tel].value="";
			frm[tel].focus();
			ok=false;return;
		}
	}
	if(maxlongtxt>0){
		for(i=0;i<GoForm.arguments.length-1;i++){
		//alert(GoForm.arguments[i]);
			if(isNaN(GoForm.arguments[i]) && GoForm.arguments[i] !=f){
				if(frm[GoForm.arguments[i]].value !=''){
					ok=verifLength(GoForm.arguments[i],frm,maxlongtxt);
					if(!ok){
						break;
						return false;
					}
				}
			}
		}
	}
	
	if(ok){
		frm.submit();
	}
}

function verifLength(chp,f,maxlong){
	frm=document.forms[f];
	var ok=true;
	if(frm[chp].value.length>maxlong){
		alert("Saisie maximum de " + maxlong +" caractères!\nVotre texte comporte : "+frm[chp].value.length+ " caractères!\n" +(frm[chp].value.length-maxlong) + " caractères vont être supprimés automatiquement.")
		frm[chp].value=frm[chp].value.substring(0,maxlong-1);
		frm[chp].style.background='#FFFCCF';
		ok=false;
	}
	return ok;
}

function GoFormAmi(f,maxlongtxt){
	//alert(nom+','+mail+','+tel+','+f);
	if (!maxlongtxt){maxlongtxt=300}
	var ok=true;var frm=document.forms[f];
	if(frm['anom'].value.length<2 || frm['anom'].value.charCodeAt(0)==32){
		alert("Veuillez saisir votre nom!")
		frm['anom'].value="";
		frm['anom'].focus();
		ok=false;return;
	}
	if(frm['amail'].value.length<2 || frm['amail'].value.indexOf('@')<1){
		alert("Une adresse e-mail valide est requise")
		frm['amail'].value="";
		frm['amail'].focus();
		ok=false;return;
	}
	if(frm['bnom'].value.length<2 || frm['bnom'].value.charCodeAt(0)==32){
		alert("Veuillez saisir le nom de votre ami!")
		frm['bnom'].value="";
		frm['bnom'].focus();
		ok=false;return;
	}
	if(frm['bmail'].value.length<2 || frm['bmail'].value.indexOf('@')<1){
		alert("Une adresse e-mail valide pour votre ami est requise")
		frm['bmail'].value="";
		frm['bmail'].focus();
		ok=false;return;
	}
	if(frm['message'].value.length > maxlongtxt){
		alert("Votre message est un peu long! Pas plus de 300 caractères!")
		frm['message'].focus();
		ok=false;return;
	}
	if(frm['CaptchaBox'].value.length<2 || frm['CaptchaBox'].value.charCodeAt(0)==32){
		alert("Veuillez saisir la valeur de contrôle demandée!")
		frm['CaptchaBox'].focus();
		ok=false;return;
	}
	//alert(tradColorcaptcha(frm['CaptchaBox'].value));
	if(tradColorcaptcha(frm['CaptchaBox'].value)){
		frm['CaptchaBox'].value=tradColorcaptcha(frm['CaptchaBox'].value);
	}
	if(ok){
		frm.submit();
	}
}
//-->

