

/******************** Vérification du formulaire de recrutement ********************/
function verifApplication(f) {
	var champs = new Array(f.nom,f.prenom,f.mail);
	if(!verif_remplissage(champs))
		return false;

	majFirstOnly(f.nom);
	majFirstOnly(f.prenom);

	if(!verif_mail(f.mail))
		return false;

	var ext = new Array("doc", "pdf", "txt");
	if(!verif_file(f.cv, "votre cv", ext))
		return false;
	if(!verif_file(f.motiv, "votre lettre de motivation", ext))
		return false;

	return true;
}

/******************** Vérification du formulaire d'envoi à un ami ********************/
function verifSendFriend(f) {
	var champs = new Array(f.nom, f.ami, f.mail);
	if(!verif_remplissage(champs))
		return false;

	if(!verif_mail(f.mail))
		return false;

	return true;
}

/******************** Vérification du formulaire d'upload de photos ********************/
function verifUploadPhoto(f) {
	var champs = new Array(f.nom, f.mail);
	if(!verif_remplissage(champs))
		return false;

	var ext = new Array("jpg", "jpeg");
	if(!verif_file(f.photo, "Votre photo", ext))
		return false;

	return true;
}


function verifCommon(f) {
	var champs = new Array(f.mail,f.name,f.address,f.phone,f.birth_date);
	
	if(!verif_remplissage(champs))
		return false;
		
	if(!verif_mail(f.mail))
		return false;	
		
	if(!verif_tel(f.phone, "téléphone"))
		return false;
		
	if(!verif_liste(f.papers, "les papiers nécessaires pour un emploi en France"))
		return false;
		
	if(!verif_date(f.birth_date, "jj/mm/aaaa"))
		return false;	

	var ext = new Array("jpg", "jpeg");	
	if(!verif_file(f.photo, "votre photo récente", ext))
		return false;
}