/* résumé de texte */
function AfficherMasquer(id) {
	if (document.getElementById(id).className == 'MasquerTxt') {
		document.getElementById(id).className = 'MontrerTxt';
		document.getElementById('ancre_'+id).innerHTML=cacher;
	} else {
		document.getElementById(id).className = 'MasquerTxt';
		document.getElementById('ancre_'+id).innerHTML=afficher;
	}
}

/* compteur de texte */
function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
	} else {
		countfield.value = maxlimit - field.value.length;
	}
}

var pphauteurwin=350;
if (typeof(window.innerHeight) == 'number') {
	pphauteurwin = window.innerHeight;
} else {
	if (document.body && document.body.clientHeight) {
		pphauteurwin = document.body.clientHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		pphauteurwin = document.documentElement.clientHeight;
	}
}
var pphauteurwin = pphauteurwin-200;
if (pphauteurwin<350)
	pphauteurwin=350;

function SetCheckboxes(bool,nom_form,nom_element) {
	cases = document.forms[nom_form].elements[nom_element];
	for(i=0; i<cases.length; i++)
		cases[i].checked=bool;
}
function SetOptions(bool,nom_element){
	var nb=document.getElementById(nom_element).options.length;
	for(i=0;i<nb;i++)
		document.getElementById(nom_element).options[i].selected=bool;
}
