////////////////////////////////////////////////////////////////////////////////
// CeAS.js
//
// CeAS s.r.l. - Script standard per la gestione del framework Web (2001)
//
// Autore: Sesto Simone
//

// Colori
// var colBackButton = "#bae2f3";
var colBackButton = "#fbb533";
var colSelButton = "#000000";
var colGrayButton = "#bae2f3"; //"#ababab";

var sBaseDir;

////////////////////////////////////////////////////////////////////////////////
// Page.js
//
// Script di definizione per l'oggetto pagina
//

function jPage(v_sTitle, v_sBanner){
	this.sBanner = v_sBanner;
	this.sTitle = v_sTitle;
	this.oButtons = null;
	this.oMenu = null;
	this.oContent = null;
	this.oSearch = null;
	this.PrintUpper = jPage_PrintUpper;
	this.PrintLower = jPage_PrintLower;
	this.Print = jPage_Print;
}

function jPage_PrintUpper(){
	document.writeln("<table border=0 width=100% align=center cellspacing=0 cellpadding=0>");
	//Banner
	document.writeln("<tr>");
	document.writeln("<td colspan=3 height=120 background=\"" + sBaseDir + "Immagini\\new_banner.jpg\" valign=bottom>");
	document.writeln("<table border=0 width=100%><tr>");
	document.writeln("<td width=80%>");
	document.writeln("</td>");
	document.writeln("<td>");
document.writeln("<table border=0>");
document.writeln("<tr>");
document.writeln("	<td>");
document.writeln("		<div ID=\"clContainer\">");
document.writeln("			 <div ID=\"tipHome\" class=\"clAppear\">");
document.writeln("			 	  <p><b>Home</b></p>");
document.writeln("			 </div>");
document.writeln("			 <div ID=\"tipInfo\" class=\"clAppear\">");
document.writeln("			 	  <p><b>Info</b></p>");
document.writeln("			 </div>");
document.writeln("			 <div ID=\"tipCont\" class=\"clAppear\">");
document.writeln("			 	  <p><b>Contatti</b></p>");
document.writeln("			 </div>");
document.writeln("		</div>");
document.writeln("		<map NAME=\"tbar\">");
document.writeln("			 <area shape=circle href=\"" + sBaseDir + "index.htm\" coords=\"38,34,16\" ONMOUSEOVER=\"if(oHome != null) oHome.show();\" ONMOUSEOUT=\"if(oHome != null) oHome.hide();\">");
document.writeln("			 <area shape=circle href=\"" + sBaseDir + "Info.htm\" coords=\"82,34,16\" ONMOUSEOVER=\"if(oInfo != null) oInfo.show();\" ONMOUSEOUT=\"if(oInfo != null) oInfo.hide();\">");
document.writeln("			 <area shape=circle href=\"" + sBaseDir + "Contatti.htm\" coords=\"126,34,16\" ONMOUSEOVER=\"if(oCont != null) oCont.show();\" ONMOUSEOUT=\"if(oCont != null) oCont.hide();\">");
document.writeln("		</map>");
document.writeln("		<img src=\"" + sBaseDir + "Immagini/tbar.jpg\" usemap=\"#tbar\" width=\"158\"  height=\"50\" alt=\"\" border=\"0\">");
document.writeln("	</td>");
document.writeln("</tr>");
document.writeln("</table>");
	document.writeln("</td>");
	document.writeln("</tr><tr>");
	document.writeln("<td colspan=2 align=center>");
	document.writeln("<h1>" + this.sTitle + "</h1>");
	document.writeln("</td>");
	document.writeln("</tr></table>");
	document.writeln("</td>");
	document.writeln("</tr>");
	
	//Seconda Riga
	document.writeln("<tr height=49>");
//	document.writeln("<td width=60 background= \"" + sBaseDir + "Immagini\\search.jpg\">");
	document.writeln("<td width=60 background= \"" + sBaseDir + "Immagini\\search.jpg\"><form METHOD=get action=\"/cgi-bin/ceas_search.cgi\">");
	document.writeln("<table width=100%><tr>");
	document.writeln("<td><img src=\"" + sBaseDir + "Immagini/lens_white.jpg\" width=\"20\" height=\"20\" alt=\"\" border=\"0\"></td>");
	document.writeln("<td><input name=\"search_text\" type=text size=10 maxlenght=50></td><td><input type=submit size=2 value=\"Go\"></td>");
	document.writeln("</tr></table></form>");

	document.writeln("</td>");
	
	document.writeln("<td width=20 background= \"" + sBaseDir + "Immagini\\square.jpg\">");
	document.writeln("</td>");
	
	document.writeln("<td valign=top>");
	if(this.oButtons != null)
		this.oButtons.Print();
	document.writeln("</td>");
	document.writeln("</tr>");
	
	//Terza Riga
	document.writeln("<tr>");
	document.writeln("<td valign=top width=150 background= \"" + sBaseDir + "Immagini\\menu.jpg\">");
	if(this.oMenu != null)
		this.oMenu.Print();	
	document.writeln("</td>");
	
	document.writeln("<td width=20 background= \"" + sBaseDir + "Immagini\\right_menu.jpg\">");
	document.writeln("</td>");
	
	document.writeln("<td>");
	if(this.oContent != null)
		this.oContent.PrintUpper();
}

function jPage_PrintLower(){
	// dopo il contenuto
	document.writeln("</td>");
	document.writeln("</tr>");

	document.writeln("</table>");

}

function jPage_Print(){
	this.PrintUpper();
	this.PrintLower();
}

////////////////////////////////////////////////////////////////////////////////
// List.js
//
// Oggetto Lista, gli oggetti listati devono avere
//	oNext

function jList(){
	this.m_oFirst = null;
	this.m_oLast = null;
	
	this.Add = jList_Add;
	this.Remove = jList_Remove;
	this.Item = jList_Item;
	this.Count = 0;
}

function jList_Add(v_oObject){
	if(this.m_oFirst == null){
		this.m_oFirst = v_oObject;
		this.m_oLast = v_oObject;	
	}
	else{
		this.m_oLast.oNext = v_oObject;
		this.m_oLast = v_oObject;
		v_oObject.oNext = null;	
	}
	this.Count++;
	
	return v_oObject;
}

function jList_Remove(v_lIndex){
	if(v_lIndex > this.Count)
		return;
	
	var oRemoved;
	var oPreLast;
	
	if(v_lIndex == 1){
		oRemoved = this.m_oFirst;
		this.m_oFirst = this.m_oFirst.oNext;
		oRemoved.oNext = null;
	}
	else{
		oPreRemoved = jList_Item(v_lIndex - 1);
		
		if(v_lIndex == this.Count){
			oRemoved = this.m_oLast;
			this.m_oLast = oPreRemoved;
			oPreRemoved.oNext = null;
		}
		else{
			oRemoved = jList_Item(v_lIndex);
			oPreRemoved.oNext = oRemoved.oNext;
			oRemoved.oNext = null;			 
		}		
	}
	this.Count--;	
}

function jList_Item(v_lIndex){
	var i;
	var oResult;
	
	oResult = this.m_oFirst;
	
	if(v_lIndex <= this.Count)
		for(i=1; i<=this.Count; i++)
			if(i == v_lIndex)
				return oResult;
			else
				oResult = oResult.oNext;
	
	return null;														
}

////////////////////////////////////////////////////////////////////////////////
// Button.js
//
// Barra Pulsanti
//
// Oggetto Button


function JButton(v_sCaption, v_sLink){
	this.Caption = v_sCaption;
	this.Link = v_sLink;
	
	this.Enabled = true;
	this.Grayed = false;
	
	this.Print = JButton_Print;
	this.PrintUpper = JButton_PrintUpper;
	this.PrintLower = JButton_PrintLower;
	
	this.oNext = null;
}

function JButton_Print(){
	if(!this.Enabled){
		document.writeln("<td bgcolor=" + colSelButton + " width=14% align=center valign=middle>");
		document.writeln("<p class=buttonFont><b><font color=#ffffff>" + this.Caption + "</font></b></p>");
		document.writeln("</td>");
	    return;
	}
	if(this.Grayed){
		document.writeln("<td bgcolor=" + colGrayButton + " width=14% align=center valign=middle>");
		document.writeln("<p class=buttonFont><b><a href=\"" + sBaseDir + this.Link +  "\">" + this.Caption + "</a></b></p>");
		document.writeln("</td>");
		return;
	}
	document.writeln("<td bgcolor=" + colBackButton + " width=14% align=center valign=middle>");
	document.writeln("<p class=buttonFont><b><a href=\"" + sBaseDir + this.Link +  "\">" + this.Caption + "</a></b></p>");
	document.writeln("</td>");
}

function JButton_PrintUpper(){

}

function JButton_PrintLower(){
	
}

// Oggetto Buttons
function JButtons(){
	this.m_oList = new jList();
	
	this.Add = JButtons_Add;
	this.Remove = JButtons_Remove;
	this.Item = JButtons_Item;
	this.Count = JButtons_Count;

	this.Print = JButtons_Print;
	this.PrintUpper = JButtons_PrintUpper;
	this.PrintLower = JButtons_PrintLower;
	
	this.MaxLineButtons = 10;

}

function JButtons_Print(){
	document.writeln("<table width=100% height=30>");
	document.writeln("<tr>");
	
	var oButton;
	var iNumButtons;
	
	oButton = this.m_oList.m_oFirst;
	
	iNumButtons = 0;
	while(oButton != null){
		oButton.Print();
		oButton = oButton.oNext;
		if(++iNumButtons == this.MaxLineButtons){
			document.writeln("</tr>");
			document.writeln("<tr>");
		}
	}
	
	document.writeln("</tr>");
	document.writeln("</table>");
}

function JButtons_PrintUpper(){

}

function JButtons_PrintLower(){
	
}

function JButtons_Add(v_sCaption, v_sLink){
	return this.m_oList.Add(new JButton(v_sCaption, v_sLink));
}

function JButtons_Remove(v_lIndex){
	this.m_oList.Remove(v_lIndex);
}

function JButtons_Item(v_lIndex){
	return this.m_oList.Item(v_lIndex);
}

function JButtons_Count(){
	return this.m_oList.Count;
}

////////////////////////////////////////////////////////////////////////////////
// Menu.js
//
// Gestione menu
//

// Menu Item

function JItem(v_sCaption, v_sLink){
	this.Caption = v_sCaption;
	this.Link = v_sLink;
	
	this.Enabled = true;
	this.Expanded = false;
	this.LeftGap = 0;
	
	this.Print = JItem_Print;
	this.PrintUpper = JItem_PrintUpper;
	this.PrintLower = JItem_PrintLower;
	
	this.oSubMenu = null;
	
	this.SubItem = JItem_SubItem;

	this.oNext = null;
}

function JItem_SubItem(v_sCaption, v_sLink){
	if(this.oSubMenu == null)
		this.oSubMenu = new JMenu();
		
	return this.oSubMenu.Add(v_sCaption, v_sLink);
}

function JItem_Print(){
	document.writeln("<tr>");
	if(this.LeftGap != 0){
		document.writeln("<td width=" + this.LeftGap + ">");
		document.writeln("</td>");
	}
	if(this.Expanded){
		if(this.Enabled){
			document.writeln("<td bgcolor="+ colGrayButton + ">");
			document.writeln("<p class=menuFont><b><a href=\"" + sBaseDir + this.Link +  "\">" + this.Caption + "</a></b></p>");
		}
		else{
			document.writeln("<td bgcolor="+ colBackButton + ">");
			document.writeln("<p class=menuFont><b>" + this.Caption + "</b></p>");
		}
	}
	else{
		if(this.Enabled){
			document.writeln("<td>");
			document.writeln("<p class=menuFont><b><a href=\"" + sBaseDir + this.Link +  "\">" + this.Caption + "</a></b></p>");
		}
		else{
			document.writeln("<td bgcolor=" + colBackButton + ">");
			document.writeln("<p class=menuFont><b>" + this.Caption + "</b></p>");
		}
	}
	document.writeln("</td>");
	document.writeln("</tr>");
	if(this.oSubMenu != null && this.Expanded){
		document.writeln("<tr>");
		document.writeln("<td>");
		this.oSubMenu.Print();
		document.writeln("</td>");
		document.writeln("</tr>");
	}
	
}

function JItem_PrintUpper(){

}

function JItem_PrintLower(){
	
}

// Oggetto Menu
function JMenu(){
	this.m_oList = new jList();
	
	this.Print = JMenu_Print;
	this.PrintUpper = JMenu_PrintUpper;
	this.PrintLower = JMenu_PrintLower;
	
	this.LeftGap = 0;
	
	this.Add = JMenu_Add;
	this.Remove = JMenu_Remove;
	this.Item = JMenu_Item;
	this.Count = JMenu_Count;
}

function JMenu_Print(){
	document.writeln("<table width=100% height=100%>");
	
	var oItem;
	
	oItem = this.m_oList.m_oFirst;
	
	while(oItem != null){
		oItem.LeftGap = this.LeftGap;
		oItem.Print();
		oItem = oItem.oNext;	
	}
	
	document.writeln("</table>");
}

function JMenu_PrintUpper(){

}

function JMenu_PrintLower(){
	
}

function JMenu_Add(v_sCaption, v_sLink){
	return this.m_oList.Add(new JItem(v_sCaption, v_sLink));
}

function JMenu_Remove(v_lIndex){
	this.m_oList.Remove(v_lIndex);
}

function JMenu_Item(v_lIndex){
	return this.m_oList.Item(v_lIndex);
}

function JMenu_Count(){
	return this.m_oList.Count;
}

////////////////////////////////////////////////////////////////////////////////
// StdButtons.js
//
// Pulsanti Standard
//

function StdButtons(sButton, bEnabled, bGrayed){
	var oStdButtons;
	var oButton;

	oStdButtons = new JButtons();
	
	oStdButtons.MaxLineButtons = 4;

	oButton = oStdButtons.Add("Info", "Info.htm");
	if(sButton == "Info"){
		oButton.Enabled = bEnabled;
		oButton.Grayed = bGrayed;		
	}
	oButton = oStdButtons.Add("Contatti", "Contatti.htm");
	if(sButton == "Contatti"){
		oButton.Enabled = bEnabled;
		oButton.Grayed = bGrayed;		
	}
	oButton = oStdButtons.Add("Str. Civili", "strutt_civ.html");
	if(sButton == "Strutture Civili"){
		oButton.Enabled = bEnabled;
		oButton.Grayed = bGrayed;		
	}
	oButton = oStdButtons.Add("Str. Industriali", "strutt_ind.html");
	if(sButton == "Strutture Industriali"){
		oButton.Enabled = bEnabled;
		oButton.Grayed = bGrayed;		
	}
//	oButton = oStdButtons.Add("", "Calcolo.htm");
//	if(sButton == "Calcolo"){
//		oButton.Enabled = bEnabled;
//		oButton.Grayed = bGrayed;		
//	}
//	oButton = oStdButtons.Add("", "prog_infrastrutture.htm");
//	if(sButton == "Infrastrutture"){
//		oButton.Enabled = bEnabled;
//		oButton.Grayed = bGrayed;		
//	}
//	oButton = oStdButtons.Add("", "prog_geotecnica.htm");
//	if(sButton == "Geotecnica"){
//		oButton.Enabled = bEnabled;
//		oButton.Grayed = bGrayed;		
//	}
//	oButton = oStdButtons.Add("", "Software.htm");
//	if(sButton == "Software"){
//		oButton.Enabled = bEnabled;
//		oButton.Grayed = bGrayed;		
//	}
	
	return oStdButtons;
}

////////////////////////////////////////////////////////////////////////////////
// StdMenu.js
//
// Definizione dei menu
//

function MenuInfo(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oSubMenu;
	var oSubSubMenu;
	var oItem;
	var oSubItem;
	
	oMenu = new JMenu();
	
	oItem = oMenu.Add("Organizzazione", "info_organizzazione.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
	oSubItem = oItem.SubItem("Staff", "info_staff.htm");

	oItem.SubItem("Organigramma", "info_organigramma.htm");
	oItem.SubItem("Attrezzature", "info_attrezzature.htm");
	oItem.SubItem("Collab. Esterne", "info_collaborazioni.htm");
	oItem.SubItem("Finzi Associati", "Collaborazione.htm");
	oItem.oSubMenu.LeftGap = 10;
	
	oItem = oMenu.Add("Sistema Qualità", "info_sistema_qualita.htm");
	if(lMenu == 2){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
	
	oItem = oMenu.Add("Schede Progetto", "info_referenze.htm");
	if(lMenu == 3){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
	oItem.SubItem("Strutture Civili", "refe_civile.htm");
	oItem.SubItem("Strutture Industriali", "refe_industria.htm");
	oItem.SubItem("Infrastrutture", "refe_infrastrutture.htm");
	oItem.SubItem("Geotecnica", "refe_geotecnica.htm");
//	oItem.SubItem("Calcolo Strutturale", "refe_calcolo.htm");
//	oItem.SubItem("Software Strutturale", "refe_software.htm");
	oItem.oSubMenu.LeftGap = 5;

	return oMenu;
}

function MenuReference(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oSubMenu;
	var oSubSubMenu;
	var oItem;
	var oSubItem;
	
	oMenu = new JMenu();
	
	oItem = oMenu.Add("Str. Industriali", "strutt_ind.html");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	} else {
	  	oItem.Enabled = true;
		oItem.Expanded = false;
	}
	
	oItem.SubItem("Energia", "strutt_ind.html#energia");
	oItem.SubItem("Stabilimenti", "strutt_ind.html#stabilimenti");
	oItem.SubItem("Infrastrutture", "strutt_ind.html#infrastrutture");
	oItem.oSubMenu.LeftGap = 10;
	
	oItem = oMenu.Add("Str. Civili", "strutt_civ.html");
	if(lMenu == 2){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	} else {
	  	oItem.Enabled = true;
		oItem.Expanded = false;
	}

	oItem.SubItem("Stadi", "strutt_civ.html#stadi");
	oItem.SubItem("Residenziale", "strutt_civ.html#residenziale");
	oItem.SubItem("Uffici", "strutt_civ.html#uffici");
	oItem.SubItem("Ospedali", "strutt_civ.html#ospedali");
	oItem.SubItem("Aeroporti", "strutt_civ.html#aeroporti");
	oItem.SubItem("Monumenti", "strutt_civ.html#monumenti");
	oItem.SubItem("Collaudi", "strutt_civ.html#collaudi");
	oItem.oSubMenu.LeftGap = 10;

	oItem = oMenu.Add("CeAS", "Collaborazione.htm");
	if(lMenu == 3){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	} else {
	  	oItem.Enabled = true;
		oItem.Expanded = false;
	}
	oItem.SubItem("Cooperazione", "coop_finzi.htm");
	oItem.oSubMenu.LeftGap = 10;
	
	return oMenu;

}

function MenuContatti(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oSubMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Elenco", "cont_all.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}

	return oMenu;
}

function MenuProgetti(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oMain;
	var oItem;
	
	oMenu = new JMenu();
	oMain = oMenu.Add("Progettazione", "Progetti.htm");
	oMain.Enabled = false;
	oMain.Expanded = true;

	oItem = oMain.SubItem("Strutture Civili", "prog_civili.htm");
//	oItem.SubItem("Referenze", "refe_civile.htm");
	if(lMenu == 2){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;
		oMain.Enabled = true;
	}
	oItem = oMain.SubItem("Strutture Industriali", "prog_industriali.htm");
//	oItem.SubItem("Referenze", "refe_industria.htm");
	if(lMenu == 3){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
		oMain.Enabled = true;
	}
	oItem = oMain.SubItem("Geotecnica", "prog_geotecnica.htm");
//	oItem.SubItem("Referenze", "refe_geotecnica.htm");
	if(lMenu == 4){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
		oMain.Enabled = true;
	}
	oItem = oMain.SubItem("Infrastrutture", "prog_infrastrutture.htm");
//	oItem.SubItem("Referenze", "refe_infrastrutture.htm");
	if(lMenu == 5){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
		oMain.Enabled = true;
	}

	return oMenu;
}

function MenuCivili_ex(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Strutture Civili", "prog_civili.htm");
	oItem.SubItem("Schede Progetto", "refe_civile.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;
		oMenu.Enabled = true;
	}
	oItem.oSubMenu.LeftGap = 10;
	
	return oMenu;
}

function MenuIndustriali(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Strutture Industriali", "prog_industriali.htm");
	oItem.SubItem("Schede Progetto", "refe_industria.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
		oMenu.Enabled = true;
	}
	oItem.oSubMenu.LeftGap = 10;
	
	return oMenu;
}

function MenuGeotecnica(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Geotecnica", "prog_geotecnica.htm");
	oItem.SubItem("Schede Progetto", "refe_geotecnica.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
		oMenu.Enabled = true;
	}
	oItem.oSubMenu.LeftGap = 10;
	
	return oMenu;
}

function MenuInfrastrutture(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Infrastrutture", "prog_infrastrutture.htm");
	oItem.SubItem("Schede Progetto", "refe_infrastrutture.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
		oMenu.Enabled = true;
	}
	oItem.oSubMenu.LeftGap = 10;
	
	return oMenu;
}

function MenuCalcolo(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oSubMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Calcolo", "Calcolo.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
	oItem.SubItem("Ricerca", "coop_ricerca.htm");
//	oItem.SubItem("GEOSAP", "svil_geosap.htm");
	oItem.oSubMenu.LeftGap = 10;

	return oMenu;
}

function MenuSoftware(lMenu, bEnabled, bExpanded){
	var oMenu;
	var oSubMenu;
	var oItem;
	
	oMenu = new JMenu();
	oItem = oMenu.Add("Sviluppo", "soft_sviluppo.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
//	oItem.SubItem("XFinest", "svil_xfinest.htm");
	oItem.SubItem("Paratie", "paratie_index.htm");
//	oItem.SubItem("6DOFS", "svil_6dofs.htm");
	oItem.oSubMenu.LeftGap = 10;
	
	oItem = oMenu.Add("Distribuzione", "soft_distribuzione.htm");
	if(lMenu == 2){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
//	oItem.SubItem("Download", "soft_download.htm");
//	oItem.oSubMenu.LeftGap = 10;

	return oMenu;
}

function MenuFinzi(lMenu, bEnabled, bExpanded){
	var oMenu;
	
	oMenu = new JMenu();

	oItem = oMenu.Add("Organizzazione", "info_organizzazione.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}

	oItem = oMenu.Add("Finzi Associati", "Collaborazione.htm");
	if(lMenu == 1){
		oItem.Enabled = bEnabled;
		oItem.Expanded = bExpanded;	
	}
	
	oItem.SubItem("Collaborazione", "coop_finzi.htm");
	oItem.oSubMenu.LeftGap = 10;
	
	
	return oMenu;
}

function EndBanner(iColSpan){
	document.write("<tr>");
	if(iColSpan == 0)
		document.write("<td valign=middle bgcolor=" + colBackButton + ">");
	else
		document.write("<td valign=middle colspan=" + iColSpan + " bgcolor=" + colBackButton + ">");
	document.write("<a href=\"mailto:info@finziassociati.it\"><img src=\""+ sBaseDir + "Immagini/minilogo.jpg\" width=\"134\" height=\"20\" alt=\"\" border=\"0\"></a>");
	document.write("</td>");
	document.write("</tr>");
}

var cGrayed = true;
var cEnabled = true;
var cExpanded = true;

////////////////////////////////////////////////////////////////////
// Toolbar
//

var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
var dom = document.getElementById?1:0;
var browser=((n || ie || dom) && parseInt(navigator.appVersion)>=4);
var oHome;
var oInfo;
var oCont;

function textZone(obj,nest){
	nest=(!nest) ? "":'document.'+nest+'.'										
	this.css=dom? document.getElementById(obj).style:ie?document.all[obj].style:n?eval(nest+"document.layers." +obj):0;
	this.show = textZone_show;
	this.hide = textZone_hide;
}

function textZone_show(){if(dom && parseInt(navigator.appVersion) >= 5)this.css.top="-13"; this.css.visibility="visible"; }
function textZone_hide(){if(dom && parseInt(navigator.appVersion) >= 5)this.css.top="0"; this.css.visibility="hidden"; }

function init(){
	oHome = new textZone('tipHome','clContainer');
	oInfo = new textZone('tipInfo','clContainer');
	oCont = new textZone('tipCont','clContainer');
	oHome.hide();
	oInfo.hide();
	oCont.hide();
}
