function setLinkStyle( currCategory ) {
	document.getElementById(currCategory).className = "highlight"
	if ( currCategory != 29){
		document.getElementById(29).className = "newColorMl"
	}
	if ( currCategory != 28) {
		
		document.getElementById(28).className = "newColorEv"
	}
	if ( currCategory == 29){
		document.getElementById(29).className = "newColorMlOv"
	}
	if ( currCategory == 28) {
		
		document.getElementById(28).className = "newColorEvOv"
	}
}

function setFatherLinkStyle( currCategory, fatherCategory ) {
	document.getElementById(currCategory).className = "arrowstyle"
	document.getElementById(fatherCategory).className = "highlight"
	if ( currCategory != 29){
		document.getElementById(29).className = "newColorMl"
	}
	if ( currCategory != 28) {
		
		document.getElementById(28).className = "newColorEv"
	}
	if ( currCategory == 29){
		document.getElementById(29).className = "newColorMlOv"
	}
	if ( currCategory == 28) {
		
		document.getElementById(28).className = "newColorEvOv"
	}
}

function captaId( currCategory, fatherCategory ) {
	if ( fatherCategory != 29 && currCategory == 29){
		document.getElementById(29).className = "newColorMlHover"
	}
	if ( fatherCategory == 29 && currCategory == 29){
		document.getElementById(29).className = "newColorMlOv"
	}


	if ( fatherCategory != 28 && currCategory == 28) {
		
		document.getElementById(28).className = "newColorEvHover"
	}
	if ( fatherCategory == 28 && currCategory == 28) {
		
		document.getElementById(28).className = "newColorEvOv"
	}
}

function ritornaId( currCategory, fatherCategory ) {
	if ( fatherCategory != 29 && currCategory != 29){
		document.getElementById(29).className = "newColorMl"
	}
	if ( fatherCategory != 29 && currCategory == 29){
		document.getElementById(29).className = "newColorMl"
	}
	if ( fatherCategory == 29 && currCategory != 29){
		document.getElementById(29).className = "newColorMlOv"
	}
	if ( fatherCategory == 29 && currCategory == 29){
		document.getElementById(29).className = "newColorMlOv"
	}


	if ( fatherCategory != 28 && currCategory != 28){
		document.getElementById(28).className = "newColorEv"
	}
	if ( fatherCategory != 28 && currCategory == 28){
		document.getElementById(28).className = "newColorEv"
	}
	if ( fatherCategory == 28 && currCategory != 28){
		document.getElementById(28).className = "newColorEvOv"
	}
	if ( fatherCategory == 28 && currCategory == 28){
		document.getElementById(28).className = "newColorEvOv"
	}
}

function setOrphanLinkStyle( fatherCategory ) {
	document.getElementById(fatherCategory).className = "highlight"
}

function funziaFlash(path,width,height,trans,params){
	var flashObj,transParam,transEmbed
	transParam = (!trans)?'':'<param name="wmode" value="transparent" />'
	transEmbed = (!trans)?'':'wmode="transparent"'
	params = (params==undefined)?'':'?'+params
	path = path+params
	flashObj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+path+'" />'+transParam+'<param name="quality" value="high" /><embed '+transEmbed+' src="'+path+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>'
	document.write(flashObj)
	//alert(flashObj)
}

function hideMenu () {
	myMenu01 = document.getElementById('first');
	myMenu01.style.visibility = "hidden";
	myMenu01.style.display = "none";
	myMenu02 = document.getElementById('second');
	myMenu02.style.visibility = "hidden";
	myMenu02.style.display = "none";
	myMenu03 = document.getElementById('third');
	myMenu03.style.visibility = "hidden";
	myMenu03.style.display = "none";
}

function showMenu (idDiv) {
	myMenu = document.getElementById(idDiv);
	myMenu.style.visibility = "visible";
	myMenu.style.display = "block";
}

function showOverlayer () {
	myOvr01 = document.getElementById('fstabs');
	myOvr01.style.visibility = "visible";
	myOvr01.style.display = "block";
	myOvr02 = document.getElementById('scdabs');
	myOvr02.style.visibility = "visible";
	myOvr02.style.display = "block";
	myOvr03 = document.getElementById('trdabs');
	myOvr03.style.visibility = "visible";
	myOvr03.style.display = "block";
}

function hideOverlayer (idDiv) {
	myOvr = document.getElementById(idDiv);
	myOvr.style.visibility = "hidden";
	myOvr.style.display = "none";
}

var oldFatherID = "";
function showChildInMenu( fatherID ) {
	//remove actual showed child
	links = document.getElementsByName( oldFatherID );
	for (x in links) {
		if( links[x].style != null ) {
			links[x].style.visibility = "hidden";
			links[x].style.display = "none";
		}
	}
	
	//add new chilfd to show
	links = document.getElementsByName( fatherID );
	for (x in links) {
		if( links[x].style != null ) {
			links[x].style.visibility = "visible";
			links[x].style.display = "block";
		}
	}
	oldFatherID = fatherID;
}