
/********************************************************************************************/
/*	On/Off
/********************************************************************************************/

function onoff(FNTname, FNTid, FNTaction) {
	
	cpt=0;
	
	while (document.getElementById(FNTname+cpt)) {
		Element.hide(FNTname+cpt);
		if (document.getElementById('bt_'+FNTname+cpt)) document.getElementById('bt_'+FNTname+cpt).className = '';
		cpt++;
	}
	
	if (FNTid != -1) {
		
		if (document.getElementById('bt_'+FNTname+FNTid)) document.getElementById('bt_'+FNTname+FNTid).className = 'selected';
		if (FNTaction != 'restore'){ 
			new Element.show(FNTname+FNTid);
		}
	}
	
}
		
/********************************************************************************************/
/*	Taille du texte (#tools)
/********************************************************************************************/
var t;			
t = 1;

function changeFontSize() {
	if (t > 1.3) t = 1;
	else t = t + 0.1;
	//alert(document.getElementsByName("changesize").length);
	// for (var i=0; i < document.getElementsByName("changesize").length; i++) {
	// 		document.getElementsByName("changesize")[i].style.fontSize = t + "em";
	// 	}
	document.getElementById("cnt").style.fontSize = t + "em";
		
} 	

/********************************************************************************************/
/*	Desciption Outils (#tools)
/********************************************************************************************/
	
var baseopacity=0

	function showtext(thetext){
	if (!document.getElementById)
	return
	textcontainerobj=document.getElementById("description")
	browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	document.getElementById("description").innerHTML=thetext
	highlighting=setInterval("gradualfade(textcontainerobj)",50)
	}

	function hidetext(){
	cleartimer()
	instantset(baseopacity)
	}

	function instantset(degree){
	if (browserdetect=="mozilla")
	textcontainerobj.style.MozOpacity=degree/100
	else if (browserdetect=="ie")
	textcontainerobj.filters.alpha.opacity=degree
	else if (document.getElementById && baseopacity==0)
	document.getElementById("description").innerHTML=""
	}

	function cleartimer(){
	if (window.highlighting) clearInterval(highlighting)
	}

	function gradualfade(cur2){
	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
	cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 1)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
	cur2.filters.alpha.opacity+=20
	else if (window.highlighting)
	clearInterval(highlighting)
	
}	
