//menu.js
var Menu={
	Home:{desc:"Home",href:"/",childs:{
		H:{desc:"Home",href:"index.html",childs:{}},
		L:{desc:"Login",href:"login.html",childs:{}},
		R:{desc:"Registrati",href:"register.html",childs:{}}
	}},
	Lotto:{desc:"Lotto",href:"/Lotto/",childs:{
		L0:{desc:"Intro",href:"index.html",childs:{}},
		L4:{desc:"Archivio",href:"Lotto_4.html",childs:{}},
		L1:{desc:"Verifica",href:"Lotto_1.html",childs:{}},
		L2:{desc:"Somma",href:"Lotto_2.html",childs:{}},
		L3:{desc:"Prodotto",href:"Lotto_3.html",childs:{}}
	}},
	Links:{desc:"Links",href:"/Links/",childs:{}},
	Dieta:{desc:"Dieta",href:"/Dieta/",childs:{
		D0:{desc:"Intro",href:"index.html",childs:{}},
		D1:{desc:"Piatti",href:"Dieta_1.html",childs:{}},
		D2:{desc:"Pasti",href:"Dieta_2.html",childs:{}},
		D3:{desc:"Giornate",href:"Dieta_3.html",childs:{}},
		D4:{desc:"Risultato",href:"Dieta_4.html",childs:{}}
	}}
}
//Inizializzazione
var sHtml="";
//Intestazione
sHtml+="<table border=1 cellspacing=0 cellpadding=0 width=800>";
sHtml+="<tr>";
sHtml+="<td>";
sHtml+="<img src=/img/adaca.it.png border=0>";
sHtml+="</td>";
sHtml+="<td>";
sHtml+="<a href='http://www.adaca.it'>";
sHtml+="<img src=/img/banner.png border=0>";
sHtml+="</a>";
sHtml+="</td>";
sHtml+="</tr>";
sHtml+="</table>";
//Impaginazione
sHtml+="<table border=0 cellspacing=0 cellpadding=0 width=800>\n";
sHtml+="<tr>";
sHtml+="<td colspan=5 width='100%'>";
sHtml+="</td>";
sHtml+="</tr>";
//Menu superiore
sHtml+="<tr>";
sHtml+="<td colspan=5 width='100%'>";
sHtml+="<table border=1 cellspacing=0 cellpadding=0 width='100%'>";
sHtml+="<tr>";
sHtml+="<td>";
sHtml+="<table border=0 cellspacing=0 cellpadding=0 width='100%'>";
sHtml+="<tr>";
sHtml+="<td align=left class=menus>&nbsp;";
var pCurrSection=null;
for(var p in Menu){
	if(MENU_Section==p){
		sHtml+=Menu[p].desc;
		pCurrSection=p;
	}
	else{
		sHtml+="<a href='"+Menu[p].href+"' class='menus'>"+Menu[p].desc+"</a>";
	}
	sHtml+="&nbsp;|&nbsp;";
}
sHtml+="&nbsp;</td>";
sHtml+="<td align=right class=menus>";
sHtml+=new Date().toLocaleString();
sHtml+="</td>";
sHtml+="</tr>";
sHtml+="</table>";
sHtml+="</td>";
sHtml+="</tr>";
sHtml+="</table>";
sHtml+="</td>";
sHtml+="</tr>";
//Fine menu superiore
sHtml+="<tr>";
sHtml+="<td align=left valign=top width=80 class=menus>";
sHtml+="<img src='/img/null.gif' width=80 height=0>";
//Menu laterale sinistro
var pCurrPage=null;
if(pCurrSection){
	sHtml+="<table border=1 cellspacing=0 cellpadding=0 width='100%'>";
	sHtml+="<tr><td align=left class=menus>";
	var subMenu=Menu[pCurrSection].childs;
	for(var p in subMenu){
		if(MENU_Page==p){
			sHtml+=subMenu[p].desc+"<br>";
			pCurrPage=p;
		}
		else{
			sHtml+="<a href='"+subMenu[p].href+"' class='menus'>"+subMenu[p].desc+"</a><br>";
		}
	}
	sHtml+="</td></tr>";
	if(window.visitor && visitor.K_UTENTE){
		sHtml+="<tr><td align=left class=menus><br>&nbsp;Utente:<br>"+visitor.nome+"</td></tr>";
	}
	sHtml+="</table>";
}
sHtml+="</td>";
sHtml+="<td width=1>";
sHtml+="<img src='/img/null.gif' width=0 height=480>";
sHtml+="</td>";
//Contenuto della pagina
sHtml+="<td align=center valign=top width=640>";
document.write(sHtml);
