window.addEvent('domready', function() {
	
	if (document.getElementById('section_fiche'))
	{
		var section = document.getElementById('section_fiche').value;
	}
		
		if (document.getElementById('licence'))
	{
		var licence = document.getElementById('licence').value;
	}
	
	
// alert(licence);
if (typeof(section) != "undefined" || typeof(licence) != "undefined")
	{
	//alert(section);
	//alert(licence);
	if (section == 'ost' && licence == 0)
		{


	//create our Accordion instance
	var myAccordion = new Fx.Accordion($('accordion'), 'span.toogler', 'div.element', {
	display:1,
	onComplete: function(){
		var el = $(this.elements[this.previous]);
		if (el.offsetHeight > 0) el.setStyle('height', 'auto');  
		},
	onActive: function(toggle,content){                          
		 
	},
	onBackground: function(toggle,content){ 
		content.setStyle('height', content['offsetHeight']);  /* turn off auto */
		
	}
	});
		}


	else
		{
	//create our Accordion instance
	var myAccordion = new Fx.Accordion($('accordion'), 'span.toogler', 'div.element', {

	onComplete: function(){
		var el = $(this.elements[this.previous]);
		if (el.offsetHeight > 0) el.setStyle('height', 'auto');  
		},
	onActive: function(toggle,content){                          
		 
	},
	onBackground: function(toggle,content){ 
		content.setStyle('height', content['offsetHeight']);  /* turn off auto */
		
	}


	});
	
	}
}


//var el = $('myElement');
//color = el.getStyle('backgroundColor');
	/* $$('tr.lien_dl td').set('opacity', 1);
	// We are setting the opacity of the element to 0.5 and adding two events
	 $$('tr.lien_dl').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.set('morph', { // on change la méthode morph
				duration: 150, // on lui donne une durée de 1.5s
				transition: 'quad:in' // et un effet "elastique"
			}).morph({
				//'opacity': 1,
				'background-color': '#f3fdfb'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.set('morph', { // on change la méthode morph
				duration: 150, // on lui donne une durée de 1.5s
				transition: 'quad:in' // et un effet "elastique"
			}).morph({
				//'opacity': 0,
				'background-color': '#ffffff'
			});
		}
	}); */




});
