//=====================================================================================
//	Ensemble de modules JavaScript
//_____________________________________________________________________________________
//	Envoi du nom du champ 
//	pour récupérer la valeur de retour
function selChamp(nc){
	document.getElementById('champ').value = nc;
}
//_____________________________________________________________________________________
//	Retour de la valeur
//  dans le champ nommé
function valRetour(ni) {
	var ch = window.opener.document.getElementById('champ').value;
	if(ch.indexOf(".asp",1)>0){
		window.opener.location.href = ch + "&fichier=" + ni;
		window.close();
	} else {
		var valEncours = window.opener.document.getElementById(ch).value;
		if (valEncours.charAt( valEncours.length - 1) == ",") {
			ni = valEncours + ni;
		}
		window.opener.document.getElementById(ch).value = ni;
		window.close();
	}
// Tester si page dans 'champ' et si page retour avec page.asp?fichier=  ni	
	
	
}
//_____________________________________________________________________________________
//	Appel du sélecteur
//  
function appel_select(oo,cc,cl) {
	var n_cl = ""
	if(cl != "") {n_cl = document.getElementById(cl).value;}
	window.open("exp_selecteur.asp?X=" + jsX_ + "&org=" + oo + "&cib=" + cc + "&classe=" + n_cl,"selecteur","height=600,width=980,scrollbars=yes");
}
//_____________________________________________________________________________________
//	Limiter l'image à 50 px de haut
//  ou 200 de large
function taille_img(im) {
	var hh = document.getElementById(im).height;
	var ww = document.getElementById(im).width;
	if(hh > 50) {
		document.getElementById(im).height = 50;
		ww = (ww * 50) / hh;
	}
	if(ww > 200) {
		document.getElementById(im).width = 200;
	}
}
//=====================================================================================
