<!--
NS4=(document.layers);
IE4=((navigator.appName.indexOf("Explorer")!=-1&&navigator.appVersion.indexOf("4.0")!=-1)&&navigator.userAgent.indexOf("Opera")==-1)?true:false;
ver4=(NS4 || IE4);
IE5=(IE4 && navigator.appVersion.indexOf("5.")!=-1);
OP=(navigator.userAgent.indexOf('Opera') != -1)? true : false;
NS6=(navigator.appName=="Netscape"&&navigator.appVersion.substr(0,1)=="5")? true : false;
if(NS6) NS4=false;
isMac=(navigator.appVersion.indexOf("Mac") != -1);
isMenu=( NS4 || (IE4 && !isMac) || (IE5 && isMac));
function Apri(){return};
function Chiudi(){return};
if (!ver4) event=null;
// -->

<!--

// PROGRAMMI - 1
boxMenu1 = new Array(
184,
115,
"PALINSESTO",	     			    		"palinsesto.cfm",0,
"VI SEGNALIAMO",	    	    			"elenco.cfm?Q_PROG_ID=356&Q_TIP_ID=243",0,
"ASCOLTA LIVE",	       						"ascolta.cfm",0,
"NOVITA'",									"elenco.cfm?Q_PROG_ID=356&Q_TIP_ID=244",0,
"CONCERTO",									"elenco.cfm?Q_PROG_ID=356&Q_TIP_ID=261",0,
"PERCORSI DI VERSI",                        "elenco.cfm?Q_PROG_ID=356&Q_TIP_ID=1102",0
)

// MAGAZINE -2
boxMenu2 = new Array(
258,
115,
"LIBRI",	         	 					"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=233",0,
"RIVISTE",	   	       						"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=235",0,
"COMPACT DISC",	         					"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=236",0,
"DVD",	         							"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=237",0,
"OPERA",	         						"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=238",0,
"CONCERTI",	      		   					"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=239",0,
"RADIO E TV",	         					"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=240",0,
"INTERNET",	         						"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=241",0,
"STRUMENTI E HI-FI",	         			"elenco.cfm?Q_PROG_ID=229&Q_TIP_ID=803",0
)

// LE SCHEDE -3
boxMenu3 = new Array(
324,
115,
"FORMAT",	        	 					"elenco.cfm?Q_PROG_ID=357&Q_TIP_ID=246",0,
"OPERA LIRICA",	       						"elenco_alfabetico.cfm?Q_PROG_ID=357&Q_TIP_ID=247",0,
"MUSICA VOCALE",	        				"elenco_alfabetico.cfm?Q_PROG_ID=357&Q_TIP_ID=248",0,
"SINFONICA",			        			"elenco_alfabetico.cfm?Q_PROG_ID=357&Q_TIP_ID=249",0,
"DA CAMERA",		        				"elenco_alfabetico.cfm?Q_PROG_ID=357&Q_TIP_ID=250",0
)

// CARNET -4
boxMenu4 = new Array(
379,
115,
"OPERA",	        	 					"elenco.cfm?Q_PROG_ID=358&Q_TIP_ID=251",0,
"CONCERTI",		       						"elenco.cfm?Q_PROG_ID=358&Q_TIP_ID=252",0,
"FESTIVAL",	        						"elenco.cfm?Q_PROG_ID=358&Q_TIP_ID=253",0,
"TRASMISSIONI",	        					"elenco.cfm?Q_PROG_ID=358&Q_TIP_ID=254",0
)

// CLUB FD -5
boxMenu5 = new Array(
506,
115,
"NEWSLETTER",	       	 					"newsletter.cfm",0,
"SONDAGGI",	        						"sondaggio.cfm",0,
"FORUM",	    		    				"forum_el.cfm",0
)

// LINKS -6
boxMenu6 = new Array(
566,
115,
"PERSONE",	       	 						"elenco_alfabetico.cfm?Q_PROG_ID=360&Q_TIP_ID=255",0,
"PERIODI",	       	 						"elenco_alfabetico.cfm?Q_PROG_ID=360&Q_TIP_ID=256",0,
"STRUMENTI",								"elenco_alfabetico.cfm?Q_PROG_ID=360&Q_TIP_ID=257",0,
"ISTITUZIONI",	     						"elenco_alfabetico.cfm?Q_PROG_ID=360&Q_TIP_ID=258",0,
"DIDATTICA",	    		    			"elenco_alfabetico.cfm?Q_PROG_ID=360&Q_TIP_ID=259",0
)

// CONTATTI -7
boxMenu7 = new Array(
600,
115,
"INDIRIZZI",								"/filodiffusione/indirizzi.cfm",0,
"PROPOSTE",									"suggerimenti.cfm",0
)

// LANGUAGES -8
boxMenu8 = new Array(
662,
115,
"ENGLISH",	       	 					"english.cfm",0,
"FRANCAISE",							"francaise.cfm",0,
"DEUTSCH",								"deutsch.cfm",0,
"LADINO",								"ladino.cfm",0,
"SLOVENO",								"sloveno.cfm",0,
"ESPANOL",								"espanol.cfm",0,
"RUSSKIJ",								"russkij.cfm",0,
"ELLENIKA",								"ellenika.cfm",0,
"POLSKI",								"polski.cfm",0,
"HEBRAIC",								"hebraic.cfm",0,
"JAPANESE",								"japanese.cfm",0,
"CHINESE",								"chinese.cfm",0,
"NORSK",								"norsk.cfm",0,
"HRVATSKI",								"hrvatski.cfm",0
)

// -->

<!--
// Impostazioni
NumeroMenu = 8;				// Indica il numero di menu impostati in m_dati
larghezzaMenu = 120;		// Indica la larghezza in pixel del box del menu a tendina
if (NS4) larghezzaMenu=140;
fontDim = "9"; 			// Dimensione del FONT di menu espresso in pixel
fontBold = false;			// Stile del testo: TRUE per il GRASSETTO; FALSE per stile NORMALE
fontItalic = false;			// Stile del testo: TRUE per il CORSIVO; FALSE per stile NORMALE
fontFam = "Arial, Helvetica, Verdana";		// Caratteri predefiniti per le voci di menu
coloreFontOff = "#000000";		// Colore del testo del menu quando non è selezionato
coloreFontOn = "#FFFFFF";		// Colore del testo del menu selezionato
coloreSfondoOff = "#FFFFFF";		// Colore di sfondo delle voci di menu quando non sono selezionate
coloreSfondoOn = "#FF9900";		// Colore di sfondo delle voci di menu quando il mouse vi è sopra
larghezzaBordo = 1;			// Dimensione in pixel dello spessore esterno del box di menu
coloreBordo = "#000000";		// Colore del bordo esterno
separatore = 1;				// Spessore della linea di separazione interna tra le voci di menu
coloreSeparatore = "#000000";		// Colore della linea di separazione interna
imgPath = "images/";		// Indica il percorso dei file le GIF
clickMenu = true;			// Imposta la modalità di apertura del menu: TRUE con un click; FALSE a sfioramento
clickSub = false;			// Imposta la modalità di apertura dei sotto-menu: TRUE con un click; FALSE a sfioramento

imgDist = (NS4) ? 2 : 6;
levelTerm = (NS4) ? "</layer>" : "</div>";
bold = (fontBold) ? "bold" : "plain";
altNS = fontDim - 10;

str_img = "<img align=right vspace=" + imgDist + " src=\"" + imgPath + "freccia.gif\" width=7 height=7 border=0>";
str_pnt = "<img align=right vspace=9 src=\"" + imgPath + "pnt.gif\" width=1 height=1 border=0>";
str_Style = "position:absolute;width:" + larghezzaMenu + "px;border:" + larghezzaBordo + "px solid " + coloreBordo + ";background:" + coloreSfondoOff + ";color:" + coloreFontOff + ";font-family:" + fontFam + ";line-height:19px;font-size:" + fontDim + "px;visibility:hidden;cursor:hand;font-weight:" + bold;
strIncStyle = (NS4) ? "<style>.menuitems{background:none;padding-left:5px;padding-right:3px;padding-top:3px;font-weight:" + bold + "}.box{" + str_Style + "}</style>" : "<style>.menuitems{background:" + coloreSfondoOff + ";padding-left:5px;padding-right:3px}</style>";
document.write(strIncStyle);

menuAperto = "";
menuSubAperto = "";
menuOn = ""
clickOpen = "";
var win = null;
var xPosiz, yPosiz, clickFlag, clickS;

function CostrMenu() {
	strDiv = "";
	for (m_Count=1;m_Count<NumeroMenu+1;m_Count++) {
		mLung = eval("boxMenu" + m_Count + ".length");
		i = 2;
		riga = 1;
		if (NS4) {
			var numMenu = (mLung - i) / 3;
			strDiv = strDiv + "<layer clip=\"" + larghezzaMenu + "," + ((numMenu * (18 + altNS)) + numMenu + 1) + "\" name='Menu" + m_Count + "' top=0 left=" + (mLung * 30) + " z-index=100 bgColor=000000 visibility=hidden>";
		} else {
			strDiv = strDiv + "<div id='Menu" + m_Count + "' style=\"" + str_Style + "\">";
		}
		while (i < mLung) {
			str_url = (eval("boxMenu" + m_Count + "[" + (i + 2) + "]") == 1) ? "" : eval("boxMenu" + m_Count + "[" + (i + 1) + "]");
			separatoreM = ((i + 3) < mLung) ? "style='border-bottom:" + separatore + "px solid " + coloreSeparatore + "'" : "";
			var mSubS = eval("boxMenu" + m_Count + "[" + (i + 2) + "]");
			if (NS4) {
				strDiv = strDiv + "<layer name='Main" + m_Count + "_" + riga + "' top=" + ((riga * (19 + altNS)) - (18 + altNS)) + " left=1 width=" + (larghezzaMenu - 2) + " height=" + (18 + altNS) + " z-index=102 bgColor='" + coloreSfondoOff + "' onmouseover=\"Accendi(this," + mSubS + ");\" onmouseout=\"Spegni(this);\">";
				if (mSubS == 1) { CostrMenuDue(m_Count,riga); strDiv = strDiv + "<layer class=\"menuitems\" onclick=\"go_cmd('" + str_url + "')\">" + str_img; } else { strDiv = strDiv + "<layer class=\"menuitems\" z-index=101><p align=left>"; }
				strDiv = strDiv + "<font face=\"" + fontFam + "\" point-size=\"" + (fontDim - 3) + "\" color='" + coloreFontOff + "'>" + eval("boxMenu" + m_Count + "[" + i + "]") + "</font></layer></layer>";
			} else {
				strDiv = strDiv + "<div class='menuitems' id=Main" + m_Count + "_" + riga + " " + separatoreM + " onmouseover=\"Accendi('Main" + m_Count + "_" + riga + "'," + mSubS + ")\" onmouseout=\"Spegni('Main" + m_Count + "_" + riga + "')\"";
				if (mSubS == 1) { CostrMenuDue(m_Count,riga); strDiv = strDiv + ">" + str_img; } else { strDiv = strDiv + " onclick=\"go_cmd('" + str_url + "')\">" + str_pnt + " "; }
				strDiv = strDiv + eval("boxMenu" + m_Count + "[" + i + "]") + "</div>";
			}
			i = i + 3;
			riga++;
		}
		strDiv = strDiv + levelTerm;
	}
	document.write(strDiv);
}

function CostrMenuDue(livello,popDue) {
		strDiv_Due = "";
		mLung_Due = eval("boxMenu" + livello + "_" + popDue + ".length");
		j = 0;
		riga_Due = 1;
		var numMenu_Due = mLung_Due / 3;
		if (NS4) {
			strDiv_Due = strDiv_Due + "<layer clip=\"" + larghezzaMenu + "," + ((numMenu_Due * (18 + altNS)) + numMenu_Due + 1) + "\" name=\"Menu" + livello + "_" + popDue + "\" top=0 left=" + (mLung_Due * 30) + " z-index=110 bgColor=000000 visibility=hidden>";	
		} else {
			strDiv_Due = strDiv_Due + "<div id=\"Menu" + livello + "_" + popDue + "\" style=\"" + str_Style + ";z-index:1\">";
		}
		while (j < mLung_Due) {
			separatore_Due = ((j + 3) < mLung_Due) ? "style='border-bottom:" + separatore + "px solid " + coloreSeparatore + "'" : "";
			str_url_Due = eval("boxMenu" + livello + "_" + popDue + "[" + (j + 1) + "]");
				if (NS4) {
					strDiv_Due = strDiv_Due + "<layer name='Second" + livello + "_" + popDue + "_" + riga_Due + "' top=" + ((riga_Due * (19 + altNS)) - (18 + altNS)) + " left=1 width=" + (larghezzaMenu - 2) + " height=" + (18 + altNS) + " z-index=112 bgcolor=" + coloreSfondoOff + " onmouseover=\"AccendiDue(this);\" onmouseout=\"Spegni(this);\"><div class=\"menuitems\"><font face=\"" + fontFam + "\" point-size=\"" + (fontDim - 2) + "\" color='" + coloreFontOff + "'>" + eval("boxMenu" + livello + "_" + popDue + "[" + j + "]") + "</font></div></layer>";
				} else {
					strDiv_Due = strDiv_Due + "<div class='menuitems'  id=Second" + livello + "_" + popDue + "_" +  riga_Due + " " + separatore_Due + " onmouseover=\"AccendiDue('Second" + livello + "_" + popDue + "_" +  riga_Due + "')\" onmouseout=\"Spegni('Second" + livello + "_" + popDue + "_" + riga_Due + "')\" onclick=\"go_cmd('" + str_url_Due + "')\">" + str_pnt + eval("boxMenu" + livello + "_" + popDue + "[" + j + "]") + "</div>";
				}
			j = j + 3;
			riga_Due++;
		}
		strDiv_Due = strDiv_Due + levelTerm;
		document.write(strDiv_Due);
}

function hideAll(){
	if (menuAperto!="")
		if (NS4) { document.layers[menuAperto].visibility='hidden'; } else { Menu = document.getElementById(menuAperto); Menu.style.visibility='hidden'; }
	if (menuSubAperto!="")
		if (NS4) { document.layers[menuSubAperto].visibility='hidden'; } else { Menu = document.getElementById(menuSubAperto); Menu.style.visibility='hidden'; }
	menuAperto = "";
}

function HideMenu(m_open,lev){
	if (m_open != "") {
		if (NS4) {
			document.layers[m_open].visibility="hidden";	
		} else {
			Menu = document.getElementById(m_open);
			Menu.style.visibility='hidden';
		}
		if (lev == 1) { 
			menuAperto = "";
		} else {
			menuSubAperto = "";
		}
	}
}
 	
function SetUpEvents() {
	if (NS4) window.document.captureEvents(Event.MOUSEDOWN);
	window.document.onmousedown = clicked;
}

function Apri(popUp,e){
	clickOpen = popUp;
	popUp = "Menu" + popUp;
	larg=760;

	if (menuAperto != popUp) { hideAll(); }

	var Menu = (NS4) ? null : document.getElementById(popUp);

	if ((!clickMenu && e==0) || (clickMenu && e==1 || clickS)) {
		if (OP || NS6 || NS4) {
			if (window.innerWidth <= larg) xPosiz=eval("box" + popUp + "[0]");
			if (window.innerWidth > larg) xPosiz=((window.innerWidth - larg) / 2) + eval("box" + popUp + "[0]");
			if (xPosiz + larghezzaMenu > window.innerWidth) xPosiz= window.innerWidth - (larghezzaMenu + 1);
			if (NS4) {
				document.layers[popUp].top = (eval("box" + popUp + "[1]") != null) ? eval("box" + popUp + "[1]") - 5 : event.clientY;
			} else {
				Menu.style.top=(eval("box" + popUp + "[1]") != null) ? eval("box" + popUp + "[1]") - 5 : event.clientY;
			}
		}

		if (IE4){
			
			if (document.body.clientWidth <= larg) xPosiz=eval("box" + popUp + "[0]");
			if (document.body.clientWidth > larg) xPosiz=((document.body.clientWidth - larg) / 2) + eval("box" + popUp + "[0]");
			if (xPosiz + larghezzaMenu > document.body.clientWidth) xPosiz=document.body.clientWidth - (larghezzaMenu + 1);
			Menu.style.top=(eval("box" + popUp + "[1]") != null) ? eval("box" + popUp + "[1]") : event.clientY;
		}
		if (OP || NS6 || IE4) {
			Menu.style.left = xPosiz;
			Menu.style.visibility='visible';
		} else {
			document.layers[popUp].left=xPosiz - 6;
			document.layers[popUp].visibility="visible";		
		}
		menuAperto = popUp;
		clickS = true;
	}
}

function Chiudi(){ clickOpen=""; }

function Accendi(popMenu,sec){
	if (popMenu!=menuOn) {
		HideMenu(menuSubAperto,2);
	}
	if (NS4) {
		popMenu.bgColor = coloreSfondoOn;		
		menuOn = popMenu.name;

		if (sec==1 && !clickSub) apriSubNS(menuOn);
	} else {
		var hMenu = document.getElementById(popMenu);
		hMenu.style.background=coloreSfondoOn;
		hMenu.style.color=coloreFontOn;
		menuOn = popMenu;
	
		if (sec==1 && !clickSub) apriSub(menuOn);
	}
}

function AccendiDue(popMenuSec){
	if (NS4) {
		popMenuSec.bgColor = coloreSfondoOn;		
		menuOn = popMenuSec.name;
	} else {
		var sMenu = document.getElementById(popMenuSec);
		sMenu.style.background=coloreSfondoOn;
		sMenu.style.color=coloreFontOn;
		menuOn = popMenuSec;
	}
}

function apriSub(menuT){
	var SubMenu = document.getElementById("Menu" + menuT.substr(4));
	var smArr = menuT.substr(4).split("_"); 
	yPos = smArr[1];
	yPos = (yPos.valueOf() * 20) - 18;
	yPos_2 = (eval("boxMenu" + menuT.substr(4).substr(0,1) + "[1]") != null) ? eval("boxMenu" + menuT.substr(4).substr(0,1) + "[1]") : event.clientY;
	SubMenu.style.top = yPos_2 + yPos;
		
	xPos = (larghezzaMenu - 15);
	xPos_2 = eval("boxMenu" + smArr[0] + "[0]")
		
	if (OP || NS6) finestraWidth = window.innerWidth;
	if (IE4) finestraWidth = document.body.clientWidth;
    
	xPosiz=xPos + xPos_2;
	if (finestraWidth <= 620) xPosiz=xPos + xPos_2;
	if (finestraWidth > 620) xPosiz=((finestraWidth - 620) / 2) + xPos + xPos_2;
	if (xPosiz + larghezzaMenu > finestraWidth) {
		if (finestraWidth <= 620) {
			xPosiz=xPos_2 - (larghezzaMenu - 15);
		} else {
		xPosiz=((finestraWidth - 620) / 2) + xPos_2 - (larghezzaMenu - 15);
		}
	}
	SubMenu.style.left = xPosiz;
	SubMenu.style.visibility='visible';
	menuSubAperto = "Menu" + menuT.substr(4);
}

function apriSubNS(menuTNS) {
	var SubMenu = "Menu" + menuTNS.substr(4);
	var smArr = menuTNS.substr(4).split("_"); 
	
	yPos = smArr[1];
	yPos = (yPos.valueOf() * 20) - 18;
	yPos_2 = (eval("boxMenu" + smArr[0] + "[1]") != null) ? eval("boxMenu" + smArr[0] + "[1]") : event.clientY;
    
	document.layers[SubMenu].top = yPos_2 + yPos;
				
	xPos = (larghezzaMenu - 21);
	xPos_2 = eval("boxMenu" + menuTNS.substr(4).substr(0,1) + "[0]")

	if (window.innerWidth <= 620) xPosiz=xPos + xPos_2;
	if (window.innerWidth > 620) xPosiz=((window.innerWidth - 620) / 2) + xPos + xPos_2;
	if (xPosiz + larghezzaMenu > window.innerWidth) {
		if (window.innerWidth <= 620) {
			xPosiz=xPos_2 - (larghezzaMenu - 21);
		} else {
			xPosiz=((window.innerWidth - 620) / 2) + xPos_2 - (larghezzaMenu - 21);
		}
	}

	document.layers[SubMenu].left=xPosiz;
	document.layers[SubMenu].visibility="visible";
	menuSubAperto = SubMenu;
}

function Spegni(popMenuOut){
	if (NS4) {
		popMenuOut.bgColor=coloreSfondoOff;
	} else {
		var lowMenu = document.getElementById(popMenuOut);
		lowMenu.style.background=coloreSfondoOff;
		lowMenu.style.color=coloreFontOff;
	}
	menuOn="";
}

function go_cmd(url){
    
	if (url.substr(0,1) == "*") {
		var sUrl = url.split(";");	
		Finestra(sUrl[1],sUrl[2],sUrl[3],sUrl[4],sUrl[5]);
	} else {
		window.location=url;
	}
}

function Finestra(Pagina, Nome, Width, Height, Parametri) {
	Left = (screen.width) ? (screen.width-Width)/2 : 0;
	Top = (screen.height) ? (screen.height-Height)/2 : 0;
	Parametri = "width="+Width+",height="+Height+",top="+Top+",left="+Left + "," + Parametri;
	win = window.open(Pagina,Nome,Parametri);
	if (NS4) win.window.focus();
}

function clicked() {
	clickFlag = false;
	if (menuAperto!="") {
		clickFlag = true;
		if (menuOn!="") {
			var subArray = menuOn.split("_");
			var itemNS = parseInt(subArray[1]);
			itemNS = (itemNS == 1) ? 3 : (itemNS * 3);
			var childSW = (menuOn.substr(0,1) == "M") ? eval("boxMenu" + subArray[0].substr(4) + "[" + (itemNS + 1) + "]") : eval("boxMenu" + subArray[0].substr(6) + "_" + subArray[1] + "[" + ((subArray[2] * 3) - 1) + "]");
			var urlNS = (menuOn.substr(0,1) == "M") ? eval("boxMenu" + subArray[0].substr(4) + "[" + itemNS + "]") : eval("boxMenu" + subArray[0].substr(6) + "_" + subArray[1] + "[" + ((subArray[2] * 2) - 1) + "]");
		}

		if (NS4 && menuOn!="" && childSW == 0) go_cmd(urlNS);

		if (menuOn=="") { clickS=false; hideAll(); }

		if (clickSub && NS4 && menuOn!="" && childSW==1) apriSubNS(menuOn);
		if (clickSub && !NS4 && menuOn!="" && menuOn.substr(0,1)!="S" && childSW==1) apriSub(menuOn);
	}
	if (clickOpen!="" && menuAperto=="" && !clickFlag) {
		Apri(clickOpen,1);
	}
	if (NS4) return(true);
}

CostrMenu();
SetUpEvents();

// -->

<!--
window.onerror = null;
browserNome = navigator.appName;
browserVersione = parseInt(navigator.appVersion);

if (browserNome == "Netscape" && browserVersione >= 3) { 
   ctrlVersione = "ok";
} else if (browserNome == "Microsoft Internet Explorer" && browserVersione >= 3) {
   ctrlVersione = "ok";
} else {
   ctrlVersione = "ko";
}

// -->


