
  function inscription() {
	if (document.contact.lastname.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.firstname.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.company.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
	
		
	if (document.contact.adress2.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.ville.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.zipcode.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.pays.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.phone.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.fax.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		
	if (document.contact.hemail.value.length == 0){
		window.alert("All fields must be filled in");
		return false;
		}
		

	return true;
}

function inscription2(){
		
		if (document.contact.lastname.value.toString().length < 1) {
			window.alert('Please enter your lastname');
			document.contact.lastname.focus();
			return false;
		}
		if (document.contact.firstname.value.toString().length < 1) {
			window.alert('Please enter your firstname');
			document.contact.firstname.focus();
			return false;
		}
		
		if (document.contact.company.value.toString().length < 1) {
			window.alert('Please enter your company');
			document.contact.company.focus();
			return false;
		}
		if (document.contact.adress2.value.toString().length < 1) {
			window.alert('Please enter your adress');
			document.contact.adress2.focus();
			return false;
		}
		if (document.contact.zipcode.value.toString().length < 1) {
			window.alert('Please enter your zip code');
			document.contact.zipcode.focus();
			return false;
		}
		if (document.contact.ville.value.toString().length < 1) {
			window.alert('Please enter your city');
			document.contact.ville.focus();
			return false;
		}
		
		if (document.contact.pays.value.toString().length < 1) {
			window.alert('Please select your country');
			document.contact.pays.focus();
			return false;
		}
		if (document.contact.phone.value.toString().length < 1) {
			window.alert('Please enter your phone number');
			document.contact.phone.focus();
			return false;
		}
		if (document.contact.fax.value.toString().length < 1) {
			window.alert('Please enter your fax number');
			document.contact.fax.focus();
			return false;
		}
		
		if (document.contact.hemail.value.toString().length < 1) {
			window.alert('Please enter your email address');
			document.contact.hemail.focus();
			return false;
		}
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.hemail.value) == false){
		window.alert('Please enter a valid email address (e.g. myname@myisp.com)');
		document.contact.hemail.focus();
		return false;
		}
		
				return true;
	}
		
function pw(){
		
		if (document.contact.lastname.value.toString().length < 1) {
			window.alert('Please enter your lastname');
			document.contact.lastname.focus();
			return false;
		}
		if (document.contact.firstname.value.toString().length < 1) {
			window.alert('Please enter your firstname');
			document.contact.firstname.focus();
			return false;
		}
		if (document.contact.number.value.toString().length < 1) {
			window.alert('Please enter your subscription number');
			document.contact.number.focus();
			return false;
		}
		
		if (document.contact.phone.value.toString().length < 1) {
			window.alert('Please enter your phone number');
			document.contact.phone.focus();
			return false;
		}
		
		if (document.contact.hemail.value.toString().length < 1) {
			window.alert('Please enter your email address');
			document.contact.hemail.focus();
			return false;
		}
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.hemail.value) == false){
		window.alert('Please enter a valid email address (e.g. myname@myisp.com)');
		document.contact.hemail.focus();
		return false;
		}
		
		//if (document.contact.hemail.value.toString().indexOf('@') == -1) {
			//window.alert('Please enter a valid email address (e.g. myname@myisp.com)');
			//document.contact.hemail.focus();
			//return false;
		//}
		//if (document.contact.hemail.value.toString().indexOf(' ') > 0) {
			//window.alert('Please enter a valid (no spaces) email address (e.g. myname@myisp.com)');
			//document.contact.hemail.focus();
			//return false;
		//}
		//if (document.contact.hemail.value.toString().indexOf('.') < 1) {
			//window.alert('Please enter a valid email address (e.g. myname@myisp.com)');
			//document.contact.hemail.focus();
			//return false;
		//}
		
		return true;
	}
	
	function inscriptioncos(){

				var radioSelected = false;
		  for (i = 0;  i < contact.civilite.length;  i++)
		  {
			if (contact.civilite[i].checked)
				radioSelected = true;
		  }
		  if (!radioSelected)
		  {
			//alert("Veuillez indiquer votre \"civilite\".");
			alert("Veuillez indiquer votre civilité");
			return (false);
		  }

		if (document.contact.nom.value.toString().length < 1) {
			window.alert('Veuillez indiquer votre nom');
			document.contact.nom.focus();
			return false;
		}
		if (document.contact.prenom.value.toString().length < 1) {
			window.alert('Veuillez indiquer votre prénom');
			document.contact.prenom.focus();
			return false;
		}
		
		if (document.contact.societe.value.toString().length < 1) {
			window.alert('Veuillez indiquer votre société');
			document.contact.societe.focus();
			return false;
		}
		
		if (document.contact.email.value.toString().length < 1) {
			window.alert('Veuillez indiquer votre email');
			document.contact.email.focus();
			return false;
		}
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.email.value) == false){
		window.alert('Veuillez indiquer un email valide (ex: monnom@masociete.fr)');
		document.contact.email.focus();
		return false;
		}
		
		
		return true;
	}