dw1=""
menu2=""
posDef1=0
var titolo
dw2=""

function scriviMenuSinistra(){
dw='<img src="img/sezioni/up_'+nav[sezione][1]+'.jpg" width="237" height="122" alt="" border="0">'
scrLayer('upSezione',dw)

dw='<a href="'+nav[sezione][2]+'"><img src="img/link_big.gif" width="15" height="15" alt="" border="0"><img src="img/nada.gif" width="6" height="1" alt="" border="0"><img src="img/sezioni/txt_'+nav[sezione][1]+'.gif" alt="" border="0"></a>'
scrLayer('sezione',dw)
dw=""
for (i=0; i<nav[sezione][4].length; i++){
if(nav[sezione][4][i][0]==pagina){
//dw+="<b>"+nav[sezione][4][i][1]+"</b><br>"
dwTitolo='<IMG src="img/link_big.gif" width="15" height="15" alt="" border="0" align="absbottom">&nbsp;<span class="titolo">'+nav[sezione][4][i][1]+'</span>'
scrLayer('titolo',dwTitolo)
}
else{
dw+='<a href="'+nav[sezione][4][i][2]+'" class="linkmenulaterale"><br><br><img src="img/link_icon.gif" alt="" border="0"><img src="img/nada.gif" width="4" height="7" alt="" border="0">'+nav[sezione][4][i][1]+'</a><br><img src="img/nada.gif" width="44" height="18" alt="" border="0">'
}

}
scrLayer('menuSinistra',dw)
}

function scriviMenu(){

var dw='<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap>'
space='<img src="img/nada.gif" width="44" height="1" alt="" border="0">'
pos=24

for (i=0; i<nav.length; i++){
pos+=nav[i][3]
dw+='<a onmouseover="javascript:apriMenu('+nav[i][0]+')" href="'+nav[i][2]+'"><img src="img/menu/menu_'+nav[i][1]+'.gif" width="'+nav[i][3]+'" height="25" alt="" border="0"></a>'+space
}
dw+='<br><img src="img/nada.gif" width="600" height="1" alt="" border="0"></td></tr></table>'
scrLayer('menu',dw)
if (sezione !=66)scriviMenuSinistra()

}




function apriMenu(voceOpen){
   
    pos=248
    
    for (i=0; i<nav.length; i++){
    pos+=nav[i][3]+44
        if (nav[i][0]==voceOpen){
        pos-=nav[i][3]
        posDef=pos-54
        dw='<table border="0" cellpadding="0" cellspacing="0"><tr><td>'+
        '<tr><td valign="bottom"><a onmouseover="javascript:scrLayer(\'menu2\',dw1);scrLayer(\'menuSelezionato\',dw1)"><img src="img/nada.gif" width="'+(nav[i][3])+'" height="5" alt="" border="0"></a><br><img src="img/nada.gif" width="1" height="7" alt="" border="0"><br>'
            for (z=0; z<nav[i][4].length; z++){
            
            dw+='<img src="img/nada.gif" width="'+(nav[i][3])+'" height="3" alt="" border="0"><br><img src="img/menu/quadrato.gif" width="6" height="6" alt="" border="0"><img src="img/nada.gif" width="5" height="1" alt="" border="0"><a href="'+nav[i][4][z][2]+'" class="linkmenu">'+nav[i][4][z][1]+'</a><br>'
            }
        }
    }
    dw+='<img src="img/nada.gif" width="8" height="17" alt="" border="0"></td><td><img src="img/nada.gif" width="15" height="120" alt="" border="0"></td></tr></table>'
    scrLayer('menu2',dw,posDef)
    scrLayer('menuSelezionato','<img src="img/menu/quadrato.gif" width="6" height="6" alt="" border="0">',posDef)
    
}

function scrLayer(divL,content,leftPos) {
	if (document.all){
    if(leftPos)window.document.all[divL].style.left=leftPos
		window.document.all[divL].innerHTML = content;
	}
	if (document.layers){ 
		divL=eval('document.'+divL)
		if(leftPos)divL.style.left=leftPos
        divL.document.write(content); divL.document.close(); 
	}

	if (document.getElementById && !document.all) {
		over = document.getElementById([divL]);
        if(leftPos)over.style.left=leftPos
		range = document.createRange();
		range.setStartBefore(over);
		domfrag = range.createContextualFragment(content);
		while (over.hasChildNodes()) {
			over.removeChild(over.lastChild);
		}
		over.appendChild(domfrag);
	}
}