<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->


<!-- Begin
function validate(myForm) {
var invalid = " "; // Invalid character is a space
var minLength = 5; // Minimum length
var sexe = myForm.sexe.value; 
var age = myForm.age.value;
var rcheck = false;
// check for a value in both fields.

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)) {
	
	// check for minimum length
	if (myForm.passwd.value.length < minLength) {
		alert('Votre mot de passe doit être de ' + minLength + ' charactères minimum.')
		return false
		}
	// check for spaces
	if (myForm.passwd.value.indexOf(invalid) > -1) {
		alert("Les espaces ne sont pas autorisés.")
		return false
		}
	
	if (sexe == '') {
		alert('Veuillez rentrer votre sexe')
		return false
		}
	
	if (age == '') {
		alert('Veuillez rentrer votre tranche d\'âge')
		return false
		}	

	for (i=0; i<myForm.lien.length; i++) {
		if (myForm.lien[i].checked) {
			rcheck = true
			}
		}

	if (!rcheck) {
		alert('Comment avez-vous connu BE UP TV ?');
		return false
		}
	
	if (!myForm.conditions.checked) {
		alert('Veuillez prendre connaissance des conditions d\'utilisations')
		return false
		}
	
	if (myForm.site.value.indexOf(invalid) > -1) {
		alert("Les espaces ne sont pas autorisés dans le nom du site.")
		return false
		}
		
return (true)
}
else {
alert("L'adresse email n'est pas valide.")
return false
}

}
//  End -->

