function create_index(who, sect)
{
	onerror="";
	document.write("<table border=0 width=120 cellpadding=0 cellspacing=0 align=left>");
	document.write("<tr>");
	document.write("<td><img src=../images/pixel.gif width=115 height=140 border=0 vspace=0 hspace=0></td>");
	document.write("</tr>");

	if (who!='')
	{	
		document.write("<tr>");
		document.write("	<td width=120 align=right>");
		if (sect!='personale')
		{
			document.write("	<a href="+who+"_personale.html onmouseover=mark('personale','"+sect+"') onmouseout=no_mark('"+sect+"')>");
			document.write("		<img src=images/personale.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
			document.write("	</a>");
			document.write("	<img name=personale src=images/unmarked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
		}
		else
		{
			document.write("	<img src=images/personale.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
			document.write("	<img name=personale src=images/marked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
		}
		document.write("	</td>");
		document.write("</tr>");
	
		if ((who=='nicola') || (who=='marco') || (who=='matteo') || (who=='fabio'))
		{
			document.write("<script language='Javascript1.1' src=scripts/select.js></script>");						
			document.write("<tr>");
			document.write("	<td width=120 align=right>");
			if (sect!='curriculum')
			{
				document.write("		<a href="+who+"_curriculum.html onmouseover=mark('curriculum','"+sect+"') onmouseout=no_mark('"+sect+"')>");
				document.write("			<img src=images/curriculum.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
				document.write("		</a>");
				document.write("		<img name=curriculum src=images/unmarked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
			}
			else
			{	
				document.write("	<img src=images/curriculum.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
				document.write("	<img name=curriculum src=images/marked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
			}
			document.write("	</td>");
			document.write("</tr>");
			document.write("<tr>");
			document.write("	<td width=120 align=right>");
			if (sect!='portfolio')
			{
				document.write("		<a href="+who+"_portfolio.html onmouseover=mark('portfolio','"+sect+"') onmouseout=no_mark('"+sect+"')>");
				document.write("		<img src=images/portfolio.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
				document.write("		</a>");
				document.write("			<img name=portfolio src=images/unmarked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
			}
			else
			{
				document.write("		<img src=images/portfolio.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
				document.write("		<img name=portfolio src=images/marked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
			}
			document.write("	</td>");
			document.write("</tr>");
//			document.write("<tr>");
//			document.write("	<td width=120 align=right>");
//			if (sect!='posizione')
//			{
//				document.write("		<a href="+who+"_posizione.html onmouseover=mark('posizione','"+sect+"') onmouseout=no_mark('"+sect+"')>");
//				document.write("		<img src=images/posizione.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");
//				document.write("		</a>");
//				document.write("		<img name=posizione src=images/unmarked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
//			}
//			else
//			{
//				document.write("		<img src=images/posizione.gif width=70 height=40 border=0 vspace=0 hspace=0 align=right>");				
//				document.write("		<img name=posizione src=images/marked.gif width=40 height=40 border=0 vspace=0 hspace=0 align=right>");
//			}

//			document.write("	</td>");
//			document.write("</tr>");
		}
	}
	document.write("</table>");
}

function create_menu(what, who, section)
{
	onerror="";
	document.write("<html>");
	document.write("<head>");
	document.write("<meta name=\"author\" content=\"Nicola 'niKoRn' Bianchi\">");
	document.write("<link rel=stylesheet type=text/css href=../scripts/stile.css>");
	document.write("<link rel=stylesheet type=text/css href=scripts/stile.css>");
	document.write("<title>RCLab - Laboratorio per le reti civiche - "+what+"</title>");
 	document.write("<script language='Javascript1.1' src=../scripts/functions.js></script>");
	document.write("<script language='Javascript1.1' src=../scripts/loadimages.js></script>");

	document.write("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 background=../images/bckg.gif>");

	document.write("<table border=0 width=770 cellspacing=0 cellpadding=0>");
	document.write("<tr>");
	document.write("	<td rowspan=3 height=100 width=100>");
	document.write("		<a href=../default.html onmouseover=activate('home') onmouseout=deactivate()>");
	document.write("			<img src=../images/camerlata.gif border=0 vspace=0 hspace=0>");
	document.write("		</a>");
	document.write("	</td>");
	document.write("	<td height=25 width=400>");
	document.write("		<img src=../images/linea_or.gif border=0 width=400 height=25 vspace=0 hspace=0>");
	document.write("	</td>");
	document.write("	<td rowspan=3 width=270 height=100>");
	document.write("		<img name=luce src=images/luce.gif border=0 width=100 height=100 vspace=0 hspace=0 align=left>");
	document.write("		<img name=descr src=images/descr.gif border=0 width=170 height=100 vspace=0 hspace=0>");
	document.write("	</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("	<td valign=top height=37 width=400>");

	if (what!='Servizi')
	{
		document.write("		<a href=../servizi/default.html onmouseover=activate('servizi') onmouseout=deactivate()>");
		document.write("			<img src=../images/servizi.gif width=133 height=34 border=0 vspace=0 hspace=0 align=left>");
		document.write("		</a>");
	}

	if (what!='Azienda')
	{
		document.write("		<a href=../azienda/default.html onmouseover=activate('azienda') onmouseout=deactivate()>");
		document.write("			<img src=../images/azienda.gif width=133 height=34 border=0 vspace=0 hspace=0 align=left>");
		document.write("		</a>");
	}

	if (what!='Portfolio')
	{
		document.write("		<a href=../portfolio/default.html onmouseover=activate('portfolio') onmouseout=deactivate()>");
		document.write("			<img src=../images/portfolio.gif width=133 height=34 border=0 vspace=0 hspace=0 align=left>");
		document.write("		</a>");
	}

	if (what!='Staff')
	{
		document.write("		<a href=../staff/default.html onmouseover=activate('staff') onmouseout=deactivate()>");
		document.write("			<img src=../images/staff.gif width=133 height=34 border=0 vspace=0 hspace=0 align=left>");
		document.write("		</a>");
	}
	
	document.write("	</td>");
	document.write("</tr>");

	document.write("<tr>");
	document.write("	<td width=400 height=39>");
	document.write("<img src=../images/linea_or_2.gif border=0 vspace=0 hspace=0 height=36 width=60 align=left>");

	if ((what=='staff') | (who!=''))
	{
		document.write("<a href=default.html>");
		document.write("	<img src=images/back.gif border=0 vspace=0 hspace=0 height=36 width=130 align=left>");
		document.write("</a>");
		document.write("<img src=../images/linea_or_2.gif border=0 vspace=0 hspace=0 height=36 width=30 align=left>");
	}
	document.write("	</td>");
	document.write("</tr>");
	document.write("</table>");

	create_index(who, section);

	var what2=what;
	if (who!='')
		if ((who=='nicola') || (who=='marco') || (who=='matteo') || (who=='fabio'))
			what2='stage'
		else
			what2='editors';
	
	document.write("<table border=0 width=600 cellpadding=5 cellspacing=0>");
	document.write("<tr>");
	document.write("	<td height=30 background=images/sottolinea.gif colspan=3><tt><q>"+what2+"</q>");

	if ((what=='staff') || (who!=''))
	{
		document.write(" - <s>"+who+"</s>");
	}

	document.write("</tt></td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("	<td colspan=3 height=20>&nbsp;</td>");
	document.write("</tr>");
	document.write("</table>");
}
