var menu_coords = {"popup1" : 156, "popup2" : 326, "popup3" : 510};
function menu_act (name, mode)
{var fr = parent.botFr; //get the lower frame object
	if (name && (!fr || !fr[name] || !fr[name]._op)) return;
	if (mode == 1) {
		var x = fr.CodeThat.getScrollX() + menu_coords[name];
		var y = fr.CodeThat.getScrollY() + 1;
		for (var i in menu_coords)
		{fr[i].clearTimer(); fr[i].hide();}
		fr[name].popupAt(x, y)}
	else if (!mode) {fr[name].clearTimer();fr[name].setTimer();}}


// DEFINIZIONE VARIABILI

// Definizione dello stile quando ci si posiziona su ciascuna delle voci del menù principale

var MENU_OVER_01 = {color:"black", bgcolor:"#DEE7F7"};
var MENU_OVER_02 = {color:"black", bgcolor:"#DEE7F7"};
var MENU_OVER_03 = {color:"black", bgcolor:"#DEE7F7"};
var MENU_OVER_04 = {color:"black", bgcolor:"#DEE7F7"};

// Definizione delle azioni quando si clicca su ciascuna delle voci del menù principale

var ACTION_01 = {url:"news/news/default.htm", target:"botFr"};
var ACTION_02 = {over:"menu_act('popup1',1)", out:"menu_act('popup1',0)"};
var ACTION_03 = {over:"menu_act('popup2',1)", out:"menu_act('popup2',0)"};
var ACTION_04 = {over:"menu_act('popup3',1)", out:"menu_act('popup3',0)"};
var ACTION_05 = {over:"menu_act('popup4',1)", out:"menu_act('popup4',0)"};

// Definizione delle voci del menù principale

var MenuDef = {type:"bar", style:{css:"top", bgcolor:"#E9E9E9", size:[350,16], imgspace:5, direction:"h",
itemoffset:{x:0, y:0},bar:{size:[0,50],dir:"v"}, shadow:{color:"white", width:2},
border:{color:"#777D83", width:1}}, itemover:{color:"red", bgcolor:"#E9E9E9",
border:{color:"#777D83", width:1}}, 
separator:{style:{size:[108,1], bgcolor:"silver"}}, 
position:{pos:[30,20], align:"left", valign:"top"}, defaction:{title:""},

items: [ 
    {
	text:"Le ultime NEWS",
	   style:{css:"top", bgcolor:"#E9E9E9", size:[155,16], imgdir:{src:"img/news.gif",
	   width:14, height:14}, itemoffset:{x:0, y:0}},
	   styleover:MENU_OVER_01, action:ACTION_01, styleon:{bgcolor:"black"}, 
         menu:{style:{bgcolor:"#E9E9E9", direction:"v", 
	   imgendoff:{src:"img/arr_off.gif", width:0, height:0}, 
         imgendon:{src:"img/arr_on.gif", width:0, height:0}, itemoffset:{x:1, y:1}, opacity:100}, 
	   position:{anchor:"sw", anchor_side:"nw"}}},
    {
	text:"Dal nostro Ordine",
	   style:{css:"tendine", bgcolor:"#E9E9E9", size:[170,16], imgdir:{src:"img/il_nostro_ordine.gif",
	   width:14, height:14}, itemoffset:{x:0, y:0}},
	   styleover:MENU_OVER_02, action:ACTION_02, styleon:{bgcolor:"black"}, 
	   menu:{style:{css:"tendine", bgcolor:"#E9E9E9", direction:"v",
	   bar:{src:"img/il_nostro_ordine_bar.gif", bgcolor:"black", size:[22,162]}, opacity:100, border:{color:"#294D88"}}, 
         position:{anchor:"sw", anchor_side:"nw"}}},
    {
        text:"Attività ed Eventi",
	   style:{css:"tendine",bgcolor:"#E9E9E9", size:[184,16], imgdir:{src:"img/attivita.gif",
	   width:14, height:14}, itemoffset:{x:0, y:0}},
	   styleover:MENU_OVER_03, action:ACTION_03, styleon:{bgcolor:"black"}, 
	   menu:{style:{css:"tendine", bgcolor:"#E9E9E9", direction:"v",
   	   bar:{src:"img/attivita_bar.gif", bgcolor:"black", size:[22,112]}, opacity:100, border:{color:"#294D88"}},
	   position:{anchor:"sw", anchor_side:"nw"}}},
    
    {
        text:"Links utili",
	   style:{css:"tendine",bgcolor:"#E9E9E9", size:[151,16], imgdir:{src:"img/links_utili.gif",
	   width:14, height:14}, itemoffset:{x:0, y:0}}, 
 	   styleover:MENU_OVER_04, action:ACTION_04, styleon:{bgcolor:"black"}, 
	   menu:{style:{css:"tendine", bgcolor:"#E9E9E9", direction:"v",
         bar:{src:"img/file_bar.gif", bgcolor:"black", size:[22,160]}, opacity:100, border:{color:"#294D88"}}, 
         position:{anchor:"sw", anchor_side:"nw"}}}
]}
