//Accordion

var idOpen= new Array();

function onOff (id)
{
	var obj = document.getElementById('b'+id);
	
	if ( obj.style.display == 'none'){
		obj.style.display = 'block';
		document.getElementById('ent'+id).style.background = '#f0c300';
		document.getElementById('box'+id).style.background = '#ffe38c';
		document.getElementById('lib'+id).style.color = '#bf8e00'; 		
		document.getElementById('d'+id).src = 'page/commune/img/deplier3.gif';
		idOpen[id] = true;
		
	} else {
		obj.style.display = 'none';
		document.getElementById('d'+id).src = 'page/commune/img/deplier2.gif';
		idOpen[id] = false;
	}
}

function roll(id)
{
	if ( !idOpen[id] ){
		var obj = document.getElementById('lib'+id);
		obj.style.color = '#bf8e00';
		document.getElementById('ent'+id).style.background = '#f0c300';
		document.getElementById('box'+id).style.background = '#ffe38c';		
		document.getElementById('d'+id).src = 'page/commune/img/deplier2.gif';
	}	
}

function rollout(id)
{
	if ( !idOpen[id] ){
		var obj = document.getElementById('lib'+id);
		obj.style.color = '#656565';
		document.getElementById('ent'+id).style.background = '#eeeeee';
		document.getElementById('box'+id).style.background = '#ffffff';		
		document.getElementById('d'+id).src = 'page/commune/img/deplier.gif';
	}	
}
