function showCommand(idLevel) { 
	document.getElementById('comandi_'+idLevel).className = "comandiShow";
}
function hideCommand(idLevel) { 
	document.getElementById('comandi_'+idLevel).className = "comandi";
}
function hideShowDir(idLevel) { 
	if (document.getElementById('cartella_'+idLevel).className == "hidden") { 
		document.getElementById('cartella_'+idLevel).className = "show";
	} else { 
		document.getElementById('cartella_'+idLevel).className = "hidden";
	}
}
function removeEntry(idLevel) { 
	var idLevelSplitted	= idLevel.split('_')
	var id			= idLevelSplitted[1];
	var section		= idLevelSplitted[0];
	var confirmationMessage = "Sei sicuro di voler rimuovere l'elemento?";

	if (confirm(confirmationMessage)){
		location.href="?action=delete&id="+id+"&section="+section;
	} 
}
function insertEntry(idLevel) { 
	var idLevelSplitted	= idLevel.split('_')
	var id			= idLevelSplitted[1];
	var section		= idLevelSplitted[0];

	location.href="?action=insert&id="+id+"&section="+section;
}
function modifyEntry(idLevel) { 
	var idLevelSplitted	= idLevel.split('_')
	var id			= idLevelSplitted[1];
	var section		= idLevelSplitted[0];

	location.href="?action=modify&id="+id+"&section="+section;
}
function removeFile(idFile) { 
	var idFileSplitted	= idFile.split('%20;')
	var section		= idFileSplitted[0];
	var id			= idFileSplitted[1];
	var nameFile		= idFileSplitted[2];

	var confirmationMessage = "Sei sicuro di voler rimuovere il file "+nameFile+"?";

	if (confirm(confirmationMessage)){
		location.href="?action=deleteFile&section="+section+"&file="+idFile;
	} 
}
function changeSelectedCategories(from, to) { 

	selectValue = document.getElementById(from).value;
	selectToChange = document.getElementById(to).value;
	alert('SELEZIONATO IL VALORE '+document.getElementById(from).id+' '+selectValue);
	/*
	var div = document.getElementById('container');
	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			selectToChange.innerHTML = o.responseText;
		}
	};
	var handleFailure = function(o){

		if(o.responseText !== undefined){
			selectToChange.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
		}
	};
	var callback =
	{
  		success:handleSuccess,
  		failure:handleFailure,
	};
	var sUrl = "inc/postSelect.php";
	var postData = "username=anonymous&userid=0";
	function makeRequest(){
		var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
	}
	*/
}

