function check_password()

{

	if (document.Fpassword.password.value != "") {

		document.Fpassword.submit();

	}

	else {

		alert('Veuillez saisir votre identifiant !');

		document.Fpassword.password.focus();

	}

}



function check_inscription()

{

	ok = true;

	if ((document.Finscription.profession.selectedIndex == 0) && (ok)) {

		alert('Veuillez saisir votre profession !');

		document.Finscription.profession.focus();

		ok = false;

	}
	if ((document.Finscription.nom.value == "") && (ok)) {

		alert('Veuillez saisir votre nom !');

		document.Finscription.nom.focus();

		ok = false;

	}

	

	if ((document.Finscription.prenom.value == "") && (ok)) {

		alert('Veuillez saisir votre prénom !');

		document.Finscription.prenom.focus();

		ok = false;

	}

	

	if ((document.Finscription.ville.value == "") && (ok)) {

		alert('Veuillez saisir votre ville !');

		document.Finscription.ville.focus();

		ok = false;

	}

	

	if ((document.Finscription.cp.value == "") && (ok)) {

		alert('Veuillez saisir votre code postal !');

		document.Finscription.cp.focus();

		ok = false;

	}

	

	if ((document.Finscription.num.value == "") && (ok)) {

		alert('Veuillez saisir votre numéro de rue !');

		document.Finscription.num.focus();

		ok = false;

	}



	

	if ((document.Finscription.rue.value == "") && (ok)) {

		alert('Veuillez saisir votre rue !');

		document.Finscription.rue.focus();

		ok = false;

	}

	

	if ((document.Finscription.telephone.value == "") && (ok)) {

		alert('Veuillez saisir votre téléphone !');

		document.Finscription.telephone.focus();

		ok = false;

	}

	

	if ((!valid_email (document.Finscription.email.value,'Votre adresse email semble incorrecte!')) && (ok)){

		ok = false;

		document.laforme.email.focus();

	}

	

	if (ok) document.Finscription.submit()



		

}



function valid_email (emailStr,message) {

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(message)

	return false

}

var user=matchArray[1]

var domain=matchArray[2]



if (user.match(userPat)==null) {

    alert(message)

    return false

}



var IPArray=domain.match(ipDomainPat)

if (IPArray!=null) {

	  for (var i=1;i<=4;i++) {

	    if (IPArray[i]>255) {

	        alert(message)

		return false

	    }

    }

    return true

}



var domainArray=domain.match(domainPat)

if (domainArray==null) {

	alert(message)

    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(message)

   return false

}



if (len<2) {

   var errStr=message

   alert(errStr)

   return false

}



if (emailStr.indexOf("'") != -1) {

   var errStr=message

   alert(errStr)

   return false

}





return true;

}