//menu
function mostra(idx){
	if (document.getElementById(idx)){
		document.getElementById(idx).style.display = 'block';
	}
}

function nascondi(idx){
	if (document.getElementById(idx)){
		document.getElementById(idx).style.display = 'none';
	}
}


function hoverMenu() {
 	var menuChilds = document.getElementById('menuSx').getElementsByTagName('DIV');
	for ( var i=0; i<menuChilds.length; i++) {
		if(menuChilds[i].className == 'menu2L') {
			menuChilds[i].getElementsByTagName('A')[0].onmouseover = function() {
				this.parentNode.className = 'menu2L on';
			}
			menuChilds[i].getElementsByTagName('A')[0].onmouseout = function() {
				this.parentNode.className = 'menu2L';
			}
		}
	}
 }

function cTabs(a) {
	b=a.parentNode.className;
	if (b=="singleTab") {
		/*a.parentNode.style.backgroundImage="url(/GruppoSACE/content/i/rightTabOnSml.gif)"; EZIO */
		/*a.parentNode.getElementsByTagName('DIV')[0].style.backgroundImage="url(/GruppoSACE/content/i/leftTabOnSml.gif)"; EZIO */
		c=a;
	} 
}
function rTabs() {
/*c.parentNode.style.backgroundImage="url(/GruppoSACE/content/i/rightTabOff.gif)"; EZIO */
/*c.parentNode.getElementsByTagName('DIV')[0].style.backgroundImage="url(/GruppoSACE/content/i/leftTabOff.gif)"; EZIO */
} 

/* Apri e chiudi - Mappa del sito*/

function rC(n) {
nodo = n.parentNode.getElementsByTagName('UL')[0];
image = n.getElementsByTagName('IMG')[0];
if (nodo.style.display=="block") {nodo.style.display="none"; image.src ="/GruppoSACE/content/i/ico_piu.gif"; n.title="Espandi la voce menu"} 
else { nodo.style.display="block", image.src ="/GruppoSACE/content/i/ico_meno.gif";  n.title="Comprimi la voce menu"}
return false;
}


function addFlash(path,altezza,larghezza,transp,variabili){
/* document.write('<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="'+larghezza+'" height="'+altezza+'" id="'+name+'">');*/
document.write('<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="'+larghezza+'" height="'+altezza+'" wmode="transparent" id="flash'+larghezza+'">');
document.write('<param name="bgcolor" value="#ffffff">');
document.write('<param name="movie" value="'+path+'" />');
document.write('<param name="quality" value="high" />');

 if(transp=='yes'){
			document.write('<param name="wmode" value="transparent" />');
			}
if(variabili!=''){
			document.write('<param name="flashvars" value="'+variabili+'">');
			}

document.write('<embed src="'+path+'" quality="high" width="'+larghezza+'" height="'+altezza+'" name="'+name+'" type="application/x-shockwave-flash"  ');
			   
if(transp=='yes'){
			document.write('wmode="transparent" ');
			}
if(variabili!=''){
			document.write('flashvars="'+variabili+'" ');
			}			   
document.write('pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>');

}


/* PRELOAD IMMAGINI */

function preLoad() { 
  var d=document; 
  if(d.images){ 
  	if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preLoad.arguments; 
	for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


/* POUPUP */

function popup( url, width, height) {
var outStr = 'height=' + height + ',width=' + width;
var sname="glossario";
outStr = outStr + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,top=0,left=0';
window.open(url, sname, outStr);
window.blur(sname);
}


function openPop(url,width,height,nome) {
var outStr = 'height='+height+',width='+width+',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,top=0,left=0';
var sname= nome;
window.open(url, sname, outStr);
window.blur(sname);
}

/* RELOAD change LANG */
function change(aa) {
		window.open('?lang='+aa,'_self');
}

//HOVER NAV GLOSSARIO
function hoverNav() {
 	var menuChilds = document.getElementById('navGloss').getElementsByTagName('DIV');
	for ( var i=0; i<menuChilds.length; i++) {
		if(menuChilds[i].className == 'word') {
			menuChilds[i].getElementsByTagName('A')[0].onmouseover = function() {
				this.parentNode.className = 'wordHover';
			}
			menuChilds[i].getElementsByTagName('A')[0].onmouseout = function() {
				this.parentNode.className = 'word';
			}
		}
	}
 }
 
//Change language
function viewLanguage() {
	document.getElementById('flagChooseLang').style.display = "block";
}

function hideLanguage() {
	document.getElementById('flagChooseLang').style.display = "none";
}
