/* 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;
	}
}

function hauteurFenetre() {
	if (typeof(window.innerHeight) == 'number')
		return window.innerHeight-350;
	if (document.body && document.body.clientHeight)
		return document.body.clientHeight-150;
	if (document.documentElement && document.documentElement.clientHeight)
		return document.documentElement.clientHeight-150;
}
	
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;
}

