// JavaScript Document
function form_chercheur(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
     if(thisForm.equipe.value=='' && thisForm.unite.value=='' && thisForm.serv_dept.value=='') {
         alert('Sélectionez une équipe ou une unité ou un service hospitalier');
         thisForm.equipe.focus();
         return false;
    }
    if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.courriel.value=='') {
         alert('Indiquez le mail');
         thisForm.courriel.focus();
         return false;
    }
  /*  if(thisForm.mdp.value=='') {
         alert('Indiquez un mot de passe');
         thisForm.mdp.focus();
         return false;
    }*/
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}
function form_chercheur_modif(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
     if(thisForm.equipe.value=='' && thisForm.unite.value=='' && thisForm.serv_dept.value=='' && thisForm.plateforme.value=='') {
         alert('Sélectionez une équipe ou une unité ou un service hospitalier ou une une plate-forme');
         thisForm.equipe.focus();
         return false;
    }
    if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.courriel.value=='') {
         alert('Indiquez le mail');
         thisForm.courriel.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}
// le même mais en saisie depuis le site (mpd obligatoire)
function form_chercheur2(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
     if(thisForm.equipe.value=='' && thisForm.unite.value=='' && thisForm.serv_dept.value=='' && thisForm.plateforme.value=='') {
         alert('Sélectionez une équipe ou une unité ou un service hospitalier ou une une plate-forme');
         thisForm.equipe.focus();
         return false;
    }
    if(thisForm.courriel.value=='') {
         alert('Indiquez le mail');
         thisForm.courriel.focus();
         return false;
    }
   if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}

// le même mais en saisie depuis le site (mpd obligatoire)
function form_ita(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
 /*    if(thisForm.equipe.value=='' && thisForm.unite.value=='' && thisForm.serv_dept.value=='') {
         alert('Sélectionez une équipe ou une unité ou un service hospitalier');
         thisForm.equipe.focus();
         return false;
    }*/
    if(thisForm.courriel.value=='') {
         alert('Indiquez le mail');
         thisForm.courriel.focus();
         return false;
    }
   if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
}
// le même mais en saisie depuis le site (mpd obligatoire)
function form_ita2(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
 /*    if(thisForm.equipe.value=='' && thisForm.unite.value=='' && thisForm.serv_dept.value=='') {
         alert('Sélectionez une équipe ou une unité ou un service hospitalier');
         thisForm.equipe.focus();
         return false;
    }*/
    if(thisForm.courriel.value=='') {
         alert('Indiquez le mail');
         thisForm.courriel.focus();
         return false;
    }
   if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
	
}
// le même mais en saisie depuis le site (mpd obligatoire)
function form_ita_modif(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
 /*    if(thisForm.equipe.value=='' && thisForm.unite.value=='' && thisForm.serv_dept.value=='') {
         alert('Sélectionez une équipe ou une unité ou un service hospitalier');
         thisForm.equipe.focus();
         return false;
    }*/
    if(thisForm.courriel.value=='') {
         alert('Indiquez le mail');
         thisForm.courriel.focus();
         return false;
    }
   if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}

function form_etudiant(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
    if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}
function form_etudiant2(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Prénom obligatoire');
         thisForm.prenom.focus();
		 return false;
    }
    if(thisForm.grade.value=='') {
         alert('Indiquez le grade');
         thisForm.grade.focus();
         return false;
    }
    if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
	else {
		thisForm.submit();
	}
}

function form_equipe(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
     if(thisForm.code_affec.value=='') {
         alert('Sélectionnez une unité de rattachement');
         thisForm.code_affec.focus();
         return false;
    }
     if(thisForm.chef_eq.value=='') {
         alert('Sélectionnez le nom du responsable');
         thisForm.chef_eq.focus();
         return false;
    }
    if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
	else {
		thisForm.submit();
	}
}

function form_equipe2(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Nom obligatoire');
         thisForm.nom.focus();
		 return false;
    }
     if(thisForm.code_affec.value=='') {
         alert('Sélectionnez une unité de rattachement');
         thisForm.code_affec.focus();
         return false;
    }
     if(thisForm.chef_eq.value=='') {
         alert('Sélectionnez le nom du responsable');
         thisForm.chef_eq.focus();
         return false;
    }
    if(thisForm.redacteur.value=='') {
         alert('Indiquez votre login (rédacteur)');
         thisForm.redacteur.focus();
         return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}


function form_unite2(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Intitulé obligatoire');
         thisForm.nom.focus();
		 return false;
    }
    if(thisForm.mdp.value != thisForm.mdp2.value) {
         alert('les deux mots de passe ne sont pas identiques');
         thisForm.mdp.focus();
         return false;
    }
}



function form_ident(thisForm) {
    if(thisForm.user_name.value=='') {
         alert('Saisissez votre indentifiant');
         thisForm.user_name.focus();
		 return false;
    }
    if(thisForm.password.value=='') {
         alert('Saisissez votre mot de passe');
         thisForm.password.focus();
		 return false;
    }
	else {
		thisForm.submit();
	}
}

function form_publi_1(thisForm) {
    if(thisForm.auteur.value=='') {
         alert('Auteur obligatoire');
         thisForm.auteur.focus();
		 return false;
    }
    if(thisForm.titre.value=='') {
         alert('Titre obligatoire');
         thisForm.titre.focus();
		 return false;
    }
     if(thisForm.annee.value=='') {
         alert('Année obligatoire');
         thisForm.annee.focus();
		 return false;
    }
   if(thisForm.reference.value=='' && thisForm.reference2.value=='') {
         alert('Référence obligatoire');
         thisForm.reference.focus();
		 return false;
    }
     if(thisForm.redacteur.value=='') {
         alert('Nom du rédacteur obligatoire');
         thisForm.redacteur.focus();
		 return false;
    }
}

//Fin de la fonction
