// JavaScript Document
	function getEl(id){
		element = document.getElementById(id);
		return element;
	}
	
	function hideEl(id){
		var element = getEl(id);
		element.style.display = 'none';
	}
	
	function showEl(id){
		var element = getEl(id);
		element.style.display = '';
	}
	
	function frecciaDx(id){
		var img = 'img_' + id;
		document.getElementById(img).src = '../immagini/dx.png';		
	}

	
	function ShowHide(sid){
		var el = 'info_' + sid;
		var img = 'img_' + sid;
		if(getEl(el).style.display == 'none'){
			showEl(el);
			document.getElementById(img).src = '../immagini/giu.png';
		}else{
			hideEl(el);
			document.getElementById(img).src = '../immagini/dx.png';
		}
	}
	
	function nascondi_altri(nome_TAG, num_id, nome_TAG_IMG){ // nome_TAG deve contenere il prefisso dei tag DIV che desideriamo nascondere, 
														   // mentre num_id deve contenere il numero del tag div su cui abbiamo cliccato
		var el = nome_TAG + num_id;
		var el_attivo = getEl(el);
		var container = document.getElementsByTagName("div");
		for(i=0; i<container.length; i++){
			if(container[i].id.search(nome_TAG) != -1){
				if(container[i].id != el_attivo.id)
					hideEl(container[i].id);
			}
		}
		el = nome_TAG_IMG + num_id;
		el_attivo = getEl(el);
		container = document.getElementsByTagName("img");
		for(i=0; i<container.length; i++){
			if(container[i].id.search(nome_TAG_IMG) != -1){
				if(container[i].id != el_attivo.id)
					document.getElementById(container[i].id).src = '../immagini/dx.png';
			}
		}

	}

