//-------------------------------------------------------
//--- Propriétés = Digital-Création
//--- Auteur = F.Noton 02/06/2005
//--- Description. : Regroupe toutes les alertes javascript utilisateurs
//-------------------------------------------------------

	/************** Verif formulaire de recherche externe ****************************/
	/*function VerifRecherche(form)  {    
		if ((form.filiere.value=='nok') && (form.niveau.value=='nok') && (form.etab.value=='nok')) {		
			alert(lang[34]);		
			form.filiere.focus();		
			return(false);
		}*/

	/************** Verif avant suppression d'un utilisateur ****************************/
	function SupprimUser(url)  {    
		ans = window.confirm(lang[0]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewUser(form)  {    
		if ( form.nom.value=='' ) {		
			alert(lang[4]);		
			form.nom.focus();		
			return(false);
		}
		if ( form.prenom.value=='' ) {		
			alert(lang[32]);		
			form.prenom.focus();		
			return(false);
		}
		if ( form.email.value=='' ) {		
			alert(lang[14]);		
			form.email.focus();		
			return(false);
		}
		if ( form.login.value=='' ) {		
			alert(lang[1]);		
			form.login.focus();		
			return(false);
		}	
		if ( form.pass.value=='' ) {		
			alert(lang[2]);		
			form.pass.focus();		
			return(false);
		}
		if( form.id_groupe.value==0){
			alert(lang[30]);	
			form.id_groupe.focus();	
			return(false);
		}
		/*if ( form.pass2.value=='' ) {		
			alert(lang[3]);		
			form.pass2.focus();		
			return(false);
		} 
		if ( form.pass.value != form.pass2.value) {		
			alert(lang[5]);		
			form.pass2.focus();		
			return(false);
		}
		
		var id_groupe = "";
		for (i=0; i < form.id_groupe.length; i++){  
			if(form.id_groupe[i].selected==true){
				return(true);
				form.id_groupe.focus();	
				break;
			}
			if(i==form.id_groupe.length-1){
				alert(lang[30]);	
				form.id_groupe.focus();	
				return(false);
			}
		}*/
	}

	function VerifModifUser(form) {		
		if ( form.nom.value=='' ) {		
			alert(lang[4]);		
			form.nom.focus();		
			return(false);
		}
		if ( form.prenom.value=='' ) {		
			alert(lang[32]);		
			form.prenom.focus();		
			return(false);
		}
		if ( form.email.value=='' ) {		
			alert(lang[14]);		
			form.email.focus();		
			return(false);
		}
		if ( form.login.value=='' ) {		
			alert(lang[1]);		
			form.login.focus();		
			return(false);
		}
		if( form.id_groupe.value==0){
			alert(lang[30]);	
			form.id_groupe.focus();	
			return(false);
		}
		/*var id_groupe = "";
		for (i=0; i < form.id_groupe.length; i++){  
			if(form.id_groupe[i].selected==true){
				return(true);
				form.id_groupe.focus();	
				break;
			}
			if(i==form.id_groupe.length-1){
				alert(lang[30]);	
				form.id_groupe.focus();	
				return(false);
			}
		}*/

	}


	/************** Verification Javascript pour les formulaires groupes ****************************/
	function SupprimGrp(url)  {    
		ans = window.confirm(lang[11]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewGrp(form)  {    
		if ( form.nom_grp.value=='' ) {		
			alert(lang[12]);		
			form.nom_grp.focus();		
			return(false);
		}	
		if ( form.adresse.value=='' ) {		
			alert(lang[55]);		
			form.adresse.focus();		
			return(false);
		}	
		if ( form.phone.value=='' ) {		
			alert(lang[56]);		
			form.phone.focus();		
			return(false);
		}	
		if ( form.email.value=='' ) {		
			alert(lang[14]);		
			form.email.focus();		
			return(false);
		}	
		if ( form.contact.value==0 ) {		
			alert(lang[57]);		
			form.contact.focus();		
			return(false);
		}	
		if (( form.hebergement.checked == false )&&( form.patrimoine.checked == false )&&( form.naturel.checked == false )&&( form.artisanat.checked == false )) {		
			alert(lang[58]);		
			form.hebergement.focus();		
			return(false);
		}		
	}
	
	function VerifCoordonnees(form)  {    
		if ( form.nom_grp.value=='' ) {		
			alert(lang[12]);		
			form.nom_grp.focus();		
			return(false);
		}	
		if ( form.adresse.value=='' ) {		
			alert(lang[55]);		
			form.adresse.focus();		
			return(false);
		}	
		if ( form.phone.value=='' ) {		
			alert(lang[56]);		
			form.phone.focus();		
			return(false);
		}	
		if ( form.email.value=='' ) {		
			alert(lang[14]);		
			form.email.focus();		
			return(false);
		}	
		if ( form.contact.value==0 ) {		
			alert(lang[57]);		
			form.contact.focus();		
			return(false);
		}	
	}
	function VerifDesc(form)  {  
		form.description_grp.value=oEdit1.getHTMLBody();
		if ( form.description_grp.value=='' ) {		
			alert(lang[13]);		
			form.description_grp.focus();		
			return(false);
		}
	}
		function VerifHora(form)  {  
		form.horaires.value=oEdit1.getHTMLBody();
		if ( form.horaires.value=='' ) {		
			alert(lang[13]);		
			form.horaires.focus();		
			return(false);
		}
	}
		function VerifTarifs(form)  {  
		form.tarifs.value=oEdit1.getHTMLBody();
		if ( form.tarifs.value=='' ) {		
			alert(lang[13]);		
			form.tarifs.focus();		
			return(false);
		}
	}
	
	
	/************** Verification Javascript pour les formulaires Actualités ****************************/
	function SupprimActu(url)  {    
		ans = window.confirm(lang[15]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewActu(form)  {    
		if ( form.titre.value=='' ) {		
			alert(lang[16]);		
			form.titre.focus();		
			return(false);
		}	
		if ( form.minimsg.value=='' ) {		
			alert(lang[46]);		
			form.minimsg.focus();		
			return(false);
		} 
		form.msg.value=oEdit1.getHTMLBody();
		if ( form.msg.value=='' ) {		
			alert(lang[17]);		
			form.msg.focus();		
			return(false);
		}
		if (( form.ecotourisme.checked == false )&&( form.actionmenees.checked == false )&&( form.agemedia.checked == false )) {		
			alert(lang[47]);		
			form.ecotourisme.focus();		
			return(false);
		} 
		
	}


	/************** Verification Javascript pour les formulaires Messagerie ****************************/
	function SupprimMess(url)  {    
		ans = window.confirm(lang[18]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewMess(form)  {    
		if ( form.to_userid.value==0 ) {		
			alert(lang[19]);		
			form.to_userid.focus();		
			return(false);
		}	
		if ( form.sujet.value=='' ) {		
			alert(lang[20]);		
			form.sujet.focus();		
			return(false);
		}
		form.msg_text.value=oEdit1.getHTMLBody();
		if ( form.msg_text.value=='' ) {		
			alert(lang[21]);		
			form.msg_text.focus();		
			return(false);
		} 
	}
	
/************** Verification Javascript pour la galerie photos ****************************/
	function DeleteAlbu(url)  {    
		ans = window.confirm(lang[39]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewAlbu(form)  {    
		if ( form.nom.value=='' ) {		
			alert(lang[40]);		
			form.nom.focus();		
			return(false);
		}	
		
		if ( form.id_groupe.value==0 ) {		
			alert(lang[40]);		
			form.id_groupe.focus();		
			return(false);
		}	
		
		/*var id_groupe = "";
		for (i=0; i < form.id_groupe.length; i++){  
			if(form.id_groupe[i].selected==true){
				return(true);
				form.id_groupe.focus();	
				break;
			}
			if(i==form.id_groupe.length-1){
				alert(lang[30]);	
				form.id_groupe.focus();	
				return(false);
			}
		}
		
		if ( form.descrip.value=='' ) {		
			alert(lang[37]);		
			form.descrip.focus();		
			return(false);
		}*/

		/*var verifSociete= "nok";
		for (i=0; i<form.societe.length; i++){  
			if(form.societe[i].checked == true){
				verifSociete = "ok";
				break;
			}
		}
		if(verifSociete == "nok"){
			alert(lang[33]);	
			form.nom.focus();	
			return(false);
		}*/
	}

	function VerifAddPho(form) {	
		if ( form.titre.value=='' ) {		
			alert(lang[41]);		
			form.titre.focus();		
			return(false);
		}	
		if ( form.descrip.value=='' ) {		
			alert(lang[42]);		
			form.descrip.focus();		
			return(false);
		}
		if ( form.chemin_fichier.value=='' ) {		
			alert(lang[43]);		
			form.chemin_fichier.focus();		
			return(false);
		}
		if ( form.idalbum.value==0 ) {		
			alert(lang[44]);		
			form.idalbum.focus();		
			return(false);
		}
	}
	
	function VerifModPho(form) {	
		if ( form.titre.value=='' ) {		
			alert(lang[41]);		
			form.titre.focus();		
			return(false);
		}	
		if ( form.descrip.value=='' ) {		
			alert(lang[42]);		
			form.descrip.focus();		
			return(false);
		}
		if ( form.idalbum.value==0 ) {		
			alert(lang[44]);		
			form.idalbum.focus();		
			return(false);
		}
	}


	/************************************************/
	function DeletePho(url)  {    
		ans = window.confirm(lang[45]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
/************** Verification Javascript pour la galerie photos ****************************/
	
	function VerifAddPhoPerso(form) {	
		if ( form.titre.value=='' ) {		
			alert(lang[41]);		
			form.titre.focus();		
			return(false);
		}	
		if ( form.chemin_fichier.value=='' ) {		
			alert(lang[43]);		
			form.chemin_fichier.focus();		
			return(false);
		}
		if ( form.largIMG.value==0 ) {		
			alert(lang[60]);		
			form.largIMG.focus();		
			return(false);
		}
		if ( form.hautIMG.value==0 ) {		
			alert(lang[59]);		
			form.hautIMG.focus();		
			return(false);
		}
	}
	
	function DeletePhoPerso(url)  {    
		ans = window.confirm(lang[45]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}

	/************** Verification Javascript pour les formulaires du module EDITION ****************************/
	function SupprimEditionPage(url)  {    
		ans = window.confirm(lang[24]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifEditionPage(form)  {    
		
		form.contenu.value=oEdit1.getHTMLBody();
		if ( form.contenu.value=='' ) {		
			alert(lang[26]);		
			form.contenu.focus();		
			return(false);
		}
	}

	/************** Verification Javascript pour les formulaires Categorie forum ****************************/
	function SupprimCatFo(url)  {    
		ans = window.confirm(lang[24]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewCatFo(form)  {    
		if ( form.titre.value=='' ) {		
			alert(lang[25]);		
			form.titre.focus();		
			return(false);
		}	
		if ( form.descrip.value=='' ) {		
			alert(lang[26]);		
			form.descrip.focus();		
			return(false);
		}
	}
	
	/************** Verification Javascript pour les formulaires de gestion des forums ****************************/
	function SupprimFo(url)  {    
		ans = window.confirm(lang[35]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewFo(form)  {    
		if ( form.titre.value=='' ) {		
			alert(lang[36]);		
			form.titre.focus();		
			return(false);
		}	
		if ( form.descrip.value=='' ) {		
			alert(lang[37]);		
			form.descrip.focus();		
			return(false);
		}
		if ( form.idcat.value==0 ) {		
			alert(lang[38]);		
			form.idcat.focus();		
			return(false);
		}
		
		var id_groupe = "";
		for (i=0; i < form.id_groupe.length; i++){  
			if(form.id_groupe[i].selected==true){
				return(true);
				form.id_groupe.focus();	
				break;
			}
			if(i==form.id_groupe.length-1){
				alert(lang[30]);	
				form.id_groupe.focus();	
				return(false);
			}
		}
	}


	/************** Verification Javascript pour les formulaires du livre d'or ****************************/
	function SupprimMessLivre(url)  {    
		ans = window.confirm(lang[48]);    
		if(ans)	{      
			window.location.href=url;    
		}  
	}
	
	function VerifNewMessLivre(form)  {    
		if ( form.posteur.value==0 ) {		
			alert(lang[49]);		
			form.posteur.focus();		
			return(false);
		}	
		if ( form.pays.value=='' ) {		
			alert(lang[50]);		
			form.pays.focus();		
			return(false);
		}
		if ( form.ville.value=='' ) {		
			alert(lang[51]);		
			form.ville.focus();		
			return(false);
		} 
		if ( form.prestataire.value=='' ) {		
			alert(lang[52]);		
			form.prestataire.focus();		
			return(false);
		}
		if ( form.titre.value=='' ) {		
			alert(lang[53]);		
			form.titre.focus();		
			return(false);
		}
		if ( form.msg.value=='' ) {		
			alert(lang[54]);		
			form.msg.focus();		
			return(false);
		}
	}


/*************************************************************************************************************************/
/*********************************** non utilisé pour l'instant **********************************************************/
/*************************************************************************************************************************/
	
	function VerifSearch(form) {	
		if ( form.search.value=="" ) {		
			alert (lang[0]);		
			form.search.focus();		
			return ;	
		}	
		form.submit();
	}
	
	/*********************************************************/
	function VerifPost(form) {	
		if ( form.author.value=="" ) {		
			alert (lang[1]);		
			form.author.focus();		
			return ;	
		}	
		if ( form.subject.value=="" ) {		
			alert (lang[2]);		
			form.subject.focus();		
			return ;	
		}	
		if ( form.body.value=="" ) {		
			alert (lang[3]);		
			form.body.focus();		
			return ;	
		}	
		form.submit();
	}
	
	/*********************************************************/
	function VerifSearch(form) {	
		if ( form.search.value=="" ) {		
			alert (lang[0]);		
			form.search.focus();		
			return ;	
		}	
		form.submit();
	}
	
	/*********************************************************/
	function ValiderFormFiche(form){   
		if (form.nom.value == "" )   {       
			alert (lang[4]);       
			form.nom.focus();       
			return;   
		}      
		if (form.prenom.value == "" )   {       
			alert (lang[5]);       
			form.prenom.focus();       
			return;   
		}      
		if (form.adresse.value == "" )   {       
			alert (lang[6]);       
			form.adresse.focus();       
			return;   
		}      
		if (form.cp.value == "" )   {       
			alert (lang[7]);       
			form.cp.focus();       
			return;   
		}      
		if (form.ville.value == "" )   {       
			alert (lang[8]);       
			form.ville.focus();       
			return;   
		}      
		if (form.login.value == "" )   {       
			alert (lang[9]);       
			form.login.focus();       
			return;   
		}   
		if (form.pwd.value == "" )   {       
			alert (lang[10]);       
			form.pwd.focus();       
			return;   
		}   
		if (form.pwd2.value == "" )   {       
			alert (lang[11]);       
			form.pwd2.focus();       
			return;   
		}   
		if (form.pwd.value != form.pwd2.value)   {       
			alert (lang[12]);       
			form.pwd2.focus();       
			return;   
		}   
		form.submit();
	}

	/*********************************************************/
	function ValiderFormQuestion(form){   
		if (form.prenom.value == "" )   {       
			alert (lang[5]);       
			form.prenom.focus();       
			return;   
		}   
		if (form.nom.value == "" )   {       
			alert (lang[4]);       
			form.nom.focus();       
			return;   
		}   
		if (form.subject.value == "" )   {       
			alert (lang[2]);       
			form.subject.focus();       
			return;   
		}   
		if (form.message.value == "" )   {
			alert (lang[3]);       
			form.message.focus();       
			return;   
		}   
		form.submit();
	}

	/*********************************************************/
	function ValiderFormMsg(form){   
		if (form.object_wm.value == "" )   {       
			alert (lang[2]);       
			form.object_wm.focus();       
			return;   
		}   	
		if (form.Message.value == "" )   {       
			alert (lang[3]);       
			form.Message.focus();       
			return;   
		}   
		form.submit();
	}

	/*********************************************************/  
	function ValiderFormPlanning(form)  {    
		if (form.fichier.value == "" )    {	   
			alert (lang[14]);	   
			form.fichier.focus();	   
			return;    
		}    
		form.submit();  
	}
	
	/*********************************************************/  
	function ValiderFormFile(form)  {    
		if (form.titre.value == "" )    {	   
			alert (lang[15]);	   
			form.titre.focus();	   
			return;    
		}        
		if (form.fichier.value == "" )    {	   
			alert (lang[16]);	   
			form.fichier.focus();	   
			return;    
		}    
		form.submit();  
	}
	
	/*********************************************************/
	function ValiderFormComment(form)  {    
		if (form.comment.value == "" )    {	   
			alert (lang[17]);	   
			form.comment.focus();	   
			return;    
		}    
		form.submit();  
	}
	
	/*********************************************************/  
	function DeleteFile(url)  {    
		ans=window.confirm(lang[18]);    
		if(ans)	{      
			window.location.replace(url);    
		}  
	}
	
	/*********************************************************/
	function openWindow(theURL,winName,features) {  
		window.open(theURL,winName,features);
	}
	
	/*********************************************************/
	function DeleteMessage(url){    
		ans=window.confirm(lang[19]);    
		if(ans){ window.location.replace(url);}
	}


/*********************************************************/
function setPointer(theRow, theAction, theDefaultColor, thePointerColor) {
    var theCells = null;

    if ( thePointerColor == '' || typeof(theRow.style) == 'undefined' ) {
        return false;
    }

    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor = thePointerColor;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()) {
        if (theAction == 'out') {
            newColor = theDefaultColor;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
};






/***********************************************************************/
/**
* modifications Eric Villard <evillard@nef.fr>
* ajout de fonctions javascript
*/

/**
* change the action of a form
* @param	string	theForm		name of the form
* @param	string	theAction	new action
*/
function changeFormAction (theForm, theAction ) {
	theForm.action = theAction;
	theForm.submit();
}

/**
* select or deselect all the options in a select tag of a form
* @param	object	name	the select tag
* @param	boolean	flag	true : select, false : deselect
*/
function selectAll(name, flag) {
	lim = name.length;
	for (var i=0; i<lim; i++) {
		name.options[i].selected=flag;
	}
}

/**
* fonctions de validations des formulaires de gestion d'évaluations annexes
*/
// création d'évaluations
function validerCreeval(form){   
	if (form.text0.value == "" )   {       
		alert (lang[20]);    
		form.text0.focus();       
		return;   
	}     
	if (form.textarea1.value == "" )   {       
		alert (lang[21]);       
		form.textarea1.focus();       
		return;   
	}     
	form.submit();
}
// modification d'évaluations
function validerModifeval(form){ 
	if (form.LEval.value == 0 )   {       
		alert (lang[22]);    
		form.LEval.focus();       
		return;   
	}      
	if (form.text0.value == "" )   {       
		alert (lang[20]);    
		form.text0.focus();       
		return;   
	}     
	if (form.textarea1.value == "" )   {       
		alert (lang[21]);       
		form.textarea1.focus();       
		return;   
	}     
	form.submit();
}
// suppression d'évaluations
function validerSuppreval(form){ 
	if (form.elements[0].value == "" )   {       
		alert (lang[23]);     
		return;   
	}     
	form.submit();
}
// assignation d'évaluations
function validerAssigneval(form){ 
	if (form.elements[1].value == "" )   {       
		alert (lang[24]);          
		return;   
	}    
	if (form.elements[4].value == "" )   {       
		alert (lang[25]);          
		return;   
	} 
	form.submit();
}
// suppression de session
function validerSupprSession(form){ 
	if (form.elements[1].value == 0 )   {       
		alert (lang[26]);          
		return;   
	}    
	if (form.elements[2].value == "" )   {       
		alert (lang[27]);           
		return;   
	} 
	form.submit();
}
// création de rapports d'évaluations
function validerCrerap(form){ 
	// évaluations
	if (form.LEval.value == 0 )   {       
		alert (lang[22]);    
		form.LEval.focus();       
		return;   
	}
	// stagiaire
	if (form.LStagiaire.value == 0 )   {       
		alert (lang[26]);    
		form.LStagiaire.focus();       
		return;   
	} 
	// tuteur
	if (form.LTuteur.value == 1 )   {       
		alert (lang[28]);    
		form.LTuteur.focus();       
		return;   
	} 
	// date
	// jour 
	if (form.text1.value == "" )   {       
		alert (lang[29]);  
		form.text1.focus();       
		return;   
	} else if (parseInt(form.text1.value) > 31 || parseInt(form.text1.value) < 1 || isNaN(parseInt(form.text1.value))) {
		alert (lang[30]); 
		form.text1.value = "";
		form.text1.focus();       
		return;  
	}
	// mois
	if (form.text2.value == "" )   {       
		alert (lang[31]);  
		form.text2.focus();       
		return;   
	} else if (parseInt(form.text2.value) > 12 || parseInt(form.text2.value) < 1 || isNaN(parseInt(form.text2.value))) {
		alert (lang[32]);
		form.text2.value = ""; 
		form.text2.focus();       
		return;  
	}
	// année
	if (form.text3.value == "" )   {       
		alert (lang[33]);  
		form.text3.focus();       
		return;   
	} else if (parseInt(form.text3.value) < 1900 || isNaN(parseInt(form.text3.value))) {
		alert (lang[34]); 
		form.text3.value = ""; 
		form.text3.focus();       
		return;  
	}
	// temps
	// heures
	if (form.text5.value == "" || parseInt(form.text5.value) < 0)   {       
		form.text5.value = 0;  
	} else if (isNaN(parseInt(form.text5.value))) {
		alert (lang[35]); 
		form.text5.value = ""; 
		form.text5.focus();       
		return;  
	}
	// minutes
	if (form.text6.value == "" || parseInt(form.text6.value) < 0)   {       
		form.text6.value = 0; 
	} else if (isNaN(parseInt(form.text6.value))) {
		alert (lang[36]); 
		form.text6.value = ""; 
		form.text6.focus();       
		return;  
	} else if (parseInt(form.text6.value) > 59) {
		form.text5.value = parseInt(form.text5.value)+1;
		form.text6.value = parseInt(form.text6.value)-60; 
	}
	form.submit();
}
// création de rapports d'évaluations
function validerModifrap(form){
	// stagiaire
	if (form.LStagiaire.value == 0 )   {       
		alert (lang[26]);    
		form.LStagiaire.focus();       
		return;   
	} 
	// évaluations
	if (form.LEval.value == 0 )   {       
		alert (lang[22]);    
		form.LEval.focus();       
		return;   
	} 
	// tuteur
	if (form.LTuteur.value == 1 )   {       
		alert (lang[28]);    
		form.LTuteur.focus();       
		return;   
	}
	// date
	// jour 
	if (form.text1.value == "" )   {       
		alert (lang[29]);  
		form.text1.focus();       
		return;   
	} else if (parseInt(form.text1.value) > 31 || parseInt(form.text1.value) < 1 || isNaN(parseInt(form.text1.value))) {
		alert (lang[30]); 
		form.text1.value = "";
		form.text1.focus();       
		return;  
	}
	// mois
	if (form.text2.value == "" )   {       
		alert (lang[31]);  
		form.text2.focus();       
		return;   
	} else if (parseInt(form.text2.value) > 12 || parseInt(form.text2.value) < 1 || isNaN(parseInt(form.text2.value))) {
		alert (lang[32]);
		form.text2.value = ""; 
		form.text2.focus();       
		return;  
	}
	// année
	if (form.text3.value == "" )   {       
		alert (lang[33]);  
		form.text3.focus();       
		return;   
	} else if (parseInt(form.text3.value) < 1900 || isNaN(parseInt(form.text3.value))) {
		alert (lang[34]); 
		form.text3.value = ""; 
		form.text3.focus();       
		return;  
	}
	// temps
	// heures
	if (form.text5.value == "" || parseInt(form.text5.value) < 0)   {       
		form.text5.value = 0;  
	} else if (isNaN(parseInt(form.text5.value))) {
		alert (lang[35]); 
		form.text5.value = ""; 
		form.text5.focus();       
		return;  
	}
	// minutes
	if (form.text6.value == "" || parseInt(form.text6.value) < 0)   {       
		form.text6.value = 0; 
	} else if (isNaN(parseInt(form.text6.value))) {
		alert (lang[36]); 
		form.text6.value = ""; 
		form.text6.focus();       
		return;  
	} else if (parseInt(form.text6.value) > 59) {
		form.text5.value = parseInt(form.text5.value)+1;
		form.text6.value = parseInt(form.text6.value)-60; 
	}
	form.submit();
}
// suppression d'évaluations
function validerSupprrap(form){ 
	if (form.elements[1].value == 0 )   {       
		alert (lang[26]);          
		return;   
	}  
	if (form.elements[2].value == "" )   {       
		alert (lang[37]);          
		return;   
	}     
	form.submit();
}

	/*********************************************************/
	function ValidCreateDirectory(form) {
		if ( form.directory.value == '' ) {
			alert(lang[40]);
			form.directory.focus();
			return(false);
		}
		form.submit();
	}
	
	/*********************************************************/
	function VerifMail(form) {
		var adresse = form.email.value	;	
		if (adresse == "" )   {       
			alert (lang[55]);       
			form.email.focus();       
			return;   
		}  
		var place   = adresse.indexOf("@",1);
		var point   = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1)) {
			return(true);
		} else {
			alert(lang[54]);
			form.email.focus();
			return(false);    
		}
	}
	
	/*********************************************************/
	function ValiderFormInscr(form){   
		if (form.nom.value == "" )   {       
			alert (lang[4]);       
			form.nom.focus();       
			return;   
		}      
		if (form.prenom.value == "" )   {       
			alert (lang[5]);       
			form.prenom.focus();       
			return;   
		}      
		if ( ! VerifMail(form) ) {
			return;
		}
		if (form.adresse.value == "" )   {       
			alert (lang[6]);       
			form.adresse.focus();       
			return;   
		}      
		if (form.cp.value == "" )   {       
			alert (lang[7]);       
			form.cp.focus();       
			return;   
		}      
		if (form.ville.value == "" )   {       
			alert (lang[8]);       
			form.ville.focus();       
			return;   
		}      
		form.submit();
	}	
	
	/*********************************************************/
	function verifcode(form) {
		if ( form.code.value == '' ) {
			alert(lang[49]);
			form.code.focus();
			return(false);
		}
		form.submit();
	}	