<!-- fonction pour editer a partir d un id recupere dans une liste-->
function editer(lien, obj,typeFenetre) {
	if (!getObjectStyle)
		return;

	if (theObj = getObjectById(obj)) 
	{
		var id = theObj.options[theObj.selectedIndex].value;
		afficherFenetre(lien+id, typeFenetre);
	}	
}

function editerSource(lien, obj) {
	if (!getObjectStyle)
		return;

	if (theObj = getObjectById(obj)) 
	{
		var id = theObj.options[theObj.selectedIndex].value;
		window.location = lien+id;
	}	
}

function editerCongres(lien, obj) {
	if (!getObjectStyle)
		return;

	if (theObj = getObjectById(obj)) 
	{
		var id = theObj.options[theObj.selectedIndex].value;
		window.location = lien+id;
	}	
}





function editerPeriodique(lien, obj) {
	if (!getObjectStyle)
		return;

	if (theObj = getObjectById(obj)) 
	{
		var id = theObj.options[theObj.selectedIndex].value;
		window.location = lien+id;
	}	
}

<!-- fonction pour supprimer a partir d un id recupere dans une liste -->	
function actionSansPopUp(lien, obj, confirmation) {	
        if (!getObjectStyle)
            return;
	if (theObj = getObjectById(obj)) 
	{
		var id = theObj.options[theObj.selectedIndex].value;
		var ok;
                if(confirmation!=''){
                    ok=confirm(confirmation);
                }else{
                    ok=true;
                }
		if(ok) {
			window.location=lien+id;
		}
	}
}

<!-- fonction pour supprimer a partir d un id recupere dans une liste -->	
function actionSansPopUpSansObjectStyle(lien, id, confirmation) {	
		var ok;
                if(confirmation!=''){
                    ok=confirm(confirmation);
                }else{
                    ok=true;
                }
		if(ok) {
			window.location=lien+id;
		}
}

<!-- fonction pour supprimer a partir d un id recupere dans une liste -->	
function supprimer(lien, obj, confirmation, typeFenetre) {
	if (!getObjectStyle)
		return;
	if (theObj = getObjectById(obj)) 
	{
		var id = theObj.options[theObj.selectedIndex].value;
		var ok;
		ok=confirm(confirmation);
		if(ok) {
			afficherFenetre(lien+id, typeFenetre);
		}

	}
}

<!-- A SUPPRIMER A TERME -->
<!-- demande de confirmation pour valider un formulaire -->
function confirmerFormulaire(formulaire) {
	formulaire.submit();
	<!--rechargerPageMere();-->
}

<!-- modifier une valeur dans un formulaire et le soumettre -->
function modifierAppliquerFormulaire(nomformulaire,nomelement,nouvelleValeur) {
	
	var formulaire = document.forms[nomformulaire];
	var element = document.forms[nomformulaire].elements[nomelement];
	
	//on change la valeur
	element.value = nouvelleValeur;
	
	formulaire.submit();
}

function telecharger(lien) {
	window.open(lien);
}

function plusDeResultats(nomformulaire, nomelement) {
	formulaire = document.forms[nomformulaire];
	document.forms[nomformulaire].elements[nomelement].value = 'true';
	formulaire.submit();
}

<!-- pagination : modifier le numero du panneau et le numero de la page et soumettre le formulaire -->
function paginerFormulaire(nomformulaire,panneau,page,sp) {
	var formulaire = document.forms[nomformulaire];
	var elementpanneau = document.forms[nomformulaire].elements[panneau];
	var elementpage = document.forms[nomformulaire].elements[page];
	var numpanneau = parseInt(elementpanneau.value);
	
	
	//on change le numero du panneau en fonction suivant/precedent : sp
	if(sp =="S") {
		numpanneau+=1;
		//on change le numero de la page en fonction du panneau
		elementpage.value = ((numpanneau-1)*10 + 1);
	}
	if(sp == "P") {
		numpanneau-=1
		//on change le numero de la page en fonction du panneau
		elementpage.value = (numpanneau*10);
	}
	elementpanneau.value = numpanneau;
	
	//on soumet le formulaire
	formulaire.submit();
}

//fonction test correction transfererTermeDeuxListes
function deplacer_elements(de, vers, messagePasDeSelection, search) {
	var F = document.AjouterListeForm;
	var elements1 = de;
	var elements2 = vers;
	 
	if (F.elements[elements1].options.selectedIndex >= 0) {
		/* boucle tant qu'il reste des �l�ments s�lectionn�s */
		while (F.elements[elements1].options.selectedIndex >= 0) {
			/* index de l'�l�ment s�lectionn� */
			index = F.elements[elements1].options.selectedIndex;
			/* /texte de l'�l�ment s�lectionn� */
			texte = F.elements[elements1].options[index].text;
			/* valeur de l'�l�ment s�lectionn� */
			valeur = F.elements[elements1].options[index].value;
			/* suppression de l'�l�ment s�lectionn� dans la liste d'origine */
			F.elements[elements1].options[index] = null;
			/* cr�ation de l'�l�ment dans la liste accueillante */
			var user = new Option(texte, valeur);
			nb_elements = F.elements[elements2].options.length; // nbre d'�l�ments dans la liste accueillante
			F.elements[elements2].options[nb_elements] = user;
		}
	}
	else
		alert(messagePasDeSelection);
	return(false);
} 

<!-- fonction pour transferer un terme d une liste vers une autre liste -->
function transfererTermeDeuxListes(id1, id2, messagePasDeSelection,search) {
	var liste1 = getObjectById(id1);
	var liste2 = getObjectById(id2);
	var search = getObjectById(search);
	if(liste1.options.selectedIndex >= 0){
		while(liste1.options.selectedIndex >= 0) {
			var o = new Option(liste1.options[liste1.options.selectedIndex].text,liste1.options[liste1.options.selectedIndex].value);
			liste2.options[liste2.options.length] = o;
			liste1.options[liste1.options.selectedIndex] = null;
			search.value = null;
		}
	}
	else {
			alert(messagePasDeSelection);
	}
}


<!-- fonction pour transferer un terme d une liste vers deux autres listes -->
<!-- ne sert plus à priori !! -->
function ajouterTermeTroisListes(id1, id2, messagePasDeSelection,search) {
	var liste1 = getObjectById(id1);
	var liste2 = getObjectById(id2);
	var search = getObjectById(search);
	if(liste1.options.selectedIndex >= 0){
                while(liste1.options.selectedIndex >= 0) {
                        var o = new Option(liste1.options[liste1.options.selectedIndex].text,liste1.options[liste1.options.selectedIndex].value);
                        liste2.options[liste2.options.length] = o;
                        liste1.options[liste1.options.selectedIndex] = null;
                        search.value = null;
                }
	}
	else {
		alert(messagePasDeSelection);
	}
}

<!-- fonction pour supprimer un terme de deux listes vers une autre -->
<!-- ne sert plus à priori !! -->
function supprimerTermeTroisListes(id1, id2, messagePasDeSelection) {
	var liste1 = getObjectById(id1);
	var liste2 = getObjectById(id2);

	if(liste2.options.selectedIndex >= 0) {
		while(liste2.options.selectedIndex >= 0) {
			var o = new Option(liste2.options[liste2.options.selectedIndex].text,liste2.options[liste2.options.selectedIndex].value);
			liste1.options[liste1.options.length] = o;
			liste2.options[liste2.selectedIndex] = null;
		}
	}
	else {
		alert(messagePasDeSelection);
	}
}

function activeDesactiveChangementAdmin(radio)
{
	for (var i=0; i<radio.length;i++) {
        if (radio[i].checked) {
        	if(radio[i].value == "4")
        		{
            	afficherElement('changeadmin');      	
            	}
            else {
				cacherElement('changeadmin');
				}
            
         }
    }
}

function cacherElement(id) {
  if (document.layers)
    document[id].visibility = 'hide';
  else if (document.all)
    document.all[id].style.visibility = 'hidden';
  else if (document.getElementById)
    document.getElementById(id).style.visibility = 'hidden';
}

function afficherElement(id) {
  if (document.layers)
    document[id].visibility = 'show';
  else if (document.all)
    document.all[id].style.visibility = 'visible';
  else if (document.getElementById)
    document.getElementById(id).style.visibility = 'visible';
}

function nodeClick(eSrc, id, open, closed ) { 
	var eSpan = document.getElementById('span'+id);
	eSpan.className = (eSpan.className=='clsShow') ? 'clsHide' : 'clsShow';
	var eImg = document.getElementById('img'+id);
	if( eSpan.className=='clsHide' ) {
	eImg.src = ('/webKinedoc/tree-menu/' + open);
	} else {
	eImg.src = ('/webKinedoc/tree-menu/' + closed);
	}
}

function nodeClick2(eSrc, id ) { 
	var eSpan = getObjectById('span'+id);
	eSpan.className = (eSpan.className=='clsShow') ? 'clsHide' : 'clsShow';
	var eImg = getObjectById('img'+id);
	if( eSpan.className=='clsHide' ) {
	eImg.src = ('/webKinedoc/tree-menu/mac_closed_arrow.gif');
	} else {
	eImg.src = ('/webKinedoc/tree-menu/mac_open_arrow.gif');
	}
}



function ajouterTerme(chaine, id) {
  trouve=false;
  i=0;
   while( i < parent.document.getElementById('listeThesaurus').options.length && !trouve)
    {
       if(parent.document.getElementById('listeThesaurus').options[i].value ==id ){
          trouve=true;
          alert('Terme d�j� selectionn�!');
          return;
       }     
       i++;           
    }
    if (!trouve){
       	new_option = new   Option(chaine,id);
		parent.document.getElementById('listeThesaurus').options[parent.document.getElementById('listeThesaurus').options.length]=new_option;
    }
    if(parent.document.getElementById('listeThesaurus').options.length == 0){
       	new_option = new   Option(chaine,id);
		parent.document.getElementById('listeThesaurus').options[parent.document.getElementById('listeThesaurus').options.length]=new_option;    
    }
} 