// toggle visibility 

// funzione toggle (id elemento xhtml)
function toggle( apri, chiudi1, chiudi2,pulsante ){
	// se il browser è compatibile (document.getElementById ritorna true)
	
		// setta il target all'elemento selezionato
		target = document.getElementById( apri );
		
		// se non è visibile settalo a visibile
		target.style.display = "block";
		if (pulsante==0){
			document.getElementById(apri+"_out").style.display="none";
			document.getElementById(apri+"_over").style.display="block";
		}else{
			document.getElementById(apri+"_out").style.display="block";
			document.getElementById(apri+"_over").style.display="none";
		}
		
		
		target = document.getElementById( chiudi1 );
		// se non è visibile settalo a visibile
		target.style.display = "none";
		document.getElementById(chiudi1+"_out").style.display="block";
		document.getElementById(chiudi1+"_over").style.display="none";
		
		
		target = document.getElementById( chiudi2 );
		// se non è visibile settalo a visibile
		target.style.display = "none";
		document.getElementById(chiudi2+"_out").style.display="block";
		document.getElementById(chiudi2+"_over").style.display="none";
		
			
		// altrimenti settalo a invisibile
		
}

function toggle2( apri, chiudi1, chiudi2 ){
	// se il browser è compatibile (document.getElementById ritorna true)
	
		// setta il target all'elemento selezionato
		target = document.getElementById( apri );
		target_link=document.getElementById('a_'+apri );
		// se non è visibile settalo a visibile
		target.style.display = "inline";
		opacityTween = new OpacityTween(document.getElementById(apri),Tween.regularEaseInOut, 0, 100, 1); 
		opacityTween.start();
		target_link.style.color="#DF250C";
		
		target = document.getElementById( chiudi1 );
		// se non è visibile settalo a visibile
		target.style.display = "none";
		target_link=document.getElementById('a_'+chiudi1 );
		target_link.style.color="#000000";
		
		target = document.getElementById( chiudi2 );
		// se non è visibile settalo a visibile
		target.style.display = "none";
		target_link=document.getElementById('a_'+chiudi2 );
		target_link.style.color="#000000";
			
		// altrimenti settalo a invisibile
		
}