/*************
   csf.js 	ver.7
   
   
   Gabriele Capecchi	22.9.2009
*/



/**************

	funzioni di inizilizzazione delle pagine
	
//*/

/*
	nPath == 0 : richiamata da pagine nella cartella principale
	nPath == 1 : richiamata da pagine in cartelle secondarie
	nPath == 2 : richiamata da pagine personali degli autori
	nPath == 3 : richiamata da pagine delle gallerie
//*/


// Funzione per inizializzare ogni pagina (da usare solo per la pagina: gallerie/index.htm)
function InizPagina( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	
	
	document.write("<TITLE>CENTRO SPERIMENTALE DI FOTOGRAFIA PRATO</TITLE>");
	document.write("<LINK href='", cPath, "csf_dati/csf_styles.css' rel=stylesheet>");
	document.write("<SCRIPT src='", cPath, "csf_dati/csf_gallerie.js' language='JavaScript'></SCRIPT>");
	
	// Per non fare visualizzare il menu per salvare le foto
	document.write("<META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
	
}


// Funzione per inizializzare ogni pagina (da usare solo per le pagine personali es: gabriele_capecchi/index.htm)
function InizPaginaAutore( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	
	
	document.write("<TITLE>CENTRO SPERIMENTALE DI FOTOGRAFIA PRATO</TITLE>");
	document.write("<LINK href='", cPath, "csf_dati/csf_styles.css' rel=stylesheet>");
	document.write("<SCRIPT src='", cPath, "csf_dati/csf_gallerie.js' language='JavaScript'></SCRIPT>");
	document.write("<SCRIPT src='autore.js' language='JavaScript'></SCRIPT>");
	
	// Per non fare visualizzare il menu per salvare le foto
	document.write("<META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
	
}


// Funzione per inizializzare ogni pagina (da usare solo per le pagine di ciascuna gallerie es: gabriele_capecchi/0/index.htm)
function InizPaginaGalleria( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	
	
	document.write("<TITLE>CENTRO SPERIMENTALE DI FOTOGRAFIA PRATO</TITLE>");
	document.write("<LINK href='", cPath, "csf_dati/csf_styles.css' rel=stylesheet>");
	document.write("<SCRIPT src='", cPath, "csf_dati/csf_gallerie.js' language='JavaScript'></SCRIPT>");
	document.write("<SCRIPT src='../autore.js' language='JavaScript'></SCRIPT>");
	document.write("<SCRIPT src='galleria.js' language='JavaScript'></SCRIPT>");
	
	// Per non fare visualizzare il menu per salvare le foto
	document.write("<META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
	
}



// Funzione per inizializzare ogni pagina (da usare per le pagine nella cartella principale e quelle delle sezione Parliamodi e Nostri lavori)
function InizPagina5( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	
	
	document.write("<TITLE>CENTRO SPERIMENTALE DI FOTOGRAFIA PRATO</TITLE>");
	document.write("<LINK href='", cPath, "csf_dati/csf_styles.css' rel=stylesheet>");
	
	// Per non fare visualizzare il menu per salvare le foto
	document.write("<META HTTP-EQUIV='imagetoolbar' CONTENT='no'>");
	
}








//INTESTAZIONE E PIEDIPAGINA
function Intestazione( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	
	
	document.write("<BODY topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0><A name=top>");
	
	//Tabella 1: vedi nota nella funzione PieDiPagina().
	//Attivare questa linea se si vuole un sfondo per il tutto diverso dal logo del CSF.
	//document.write("<TABLE cellpadding=0 bgcolor='#525252' border=0 width='100%'><TR><TD>");
	
	
	// intestazione con il logo CSF e FIAF
	document.write("<TABLE bgcolor=#525252 cellpadding=0 border='0' width='100%' height='100'><TBODY>");
	
	// attivare le seguenti due righe per non vedere il logo in testata
	document.write("<TR><TD valign='top'><IMG src='", cPath, "csf_dati/csf_intestazione5.jpg' border='0'></TD></TR>");
	document.write("<TR><TD bgcolor='#FFCC00'></TD></TR>");
	
	// attivare le seguenti 4 righe per vedere il logo FIAF in testata
	/*
	document.write("<TR><TD valign='top'><IMG src='", cPath, "csf_dati/csf_intestazione5.jpg' border='0'></TD>");
	document.write("    <TD valign='top' align='right'><A href='http://www.fiaf-net.it' target='_blank'>");
	document.write("        <IMG alt='http://www.fiaf-net.it' src='", cPath, "dati/fiaf5.jpg' border='0'></A></TD>");
	document.write("<TR bgcolor='#FFCC00'><TD colspan=2></TD></TR>");
	*/
	document.write("</TBODY></TABLE>");
	
}


//funzione per scrivere il pie di pagina del sito
function PieDiPagina(){
	
	// Attivare se si è attivata la tabella 1 nella funzione Intestazione().
	//document.write("</TD></TR></TABLE>");
	
	
	// Linee di codice da scrivere in modo dinamico per la tabella dei copyright
	document.write("<TABLE bgcolor=#525252 cellpadding=0 border='0' width='100%'><TBODY>");
	document.write("<TR><TD width='100%' bgcolor=#FFCC00></TD></TR>");
	document.write("<TR><TD width='100%' align='center'><FONT class='PiediPagina'>Copyright (c) 2005-2010 Centro Sperimentale di Fotografia Prato</FONT></TD></TR>");
	document.write("<TR><TD width='100%' align='center'><BR><FONT class='PiediPagina'>Contattaci per informazioni a</FONT> ");
	document.write("	<A class='EMailLink' href='mailto:info@centrosperimentale.it'>info@centrosperimentale.it</A>");
	document.write("	<FONT class='PiediPagina'><BR>e per problemi tecnici a</FONT> ");
	document.write("	<A class='EMailLink' href='mailto:webmaster@centrosperimentale.it'>webmaster@centrosperimentale.it</A></TD></TR>");
	document.write("</TBODY></TABLE>");
	
	
	document.write("</BODY>");
	
}









// Scrive i comandi per creare una tabella per il corpo del sito
function InitBody( nPath ){
	var cPath = "";
	// if( nPath == 0 ) { cPath = ""; }
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }

	
	// inizio della tabella con il corpo della pagina.
	document.write("<TABLE bgcolor=#424242 border='0' width='100%' cellpadding=0><TBODY>");
	
	//cella dove sono i link ai siti amici e le icone delle foto random.
	document.write("<TR><TD width='200' valign='top'>");
	BarraSinistra( nPath );
	document.write("</TD>");
	
	//inizio della cella dove sono le informazioni specifiche per ogni pagina
	document.write("<TD background='", cPath, "csf_dati/csf_logo_sfondo_BN_200x400.jpg' valign='top'>");	
}

function EndBody(){

  //fine della cella dove sono le informazioni specifiche per ogni pagina
  document.write("   </TD>");

  // fine della tabella con il corpo della pagina.
  document.write("</TR></TBODY></TABLE>");
}









// funzione per scrivere il menu verticale a sinistra e
function BarraSinistra( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	
	// inizia la tebella per la bassa a sinistra
	document.write("<TABLE border='0' width='100%' bgcolor='#424242' cellpadding=2><TBODY>");
	document.write("<TR><TD width='100%'>&nbsp;</TD></TR>");

	// visualizza il menu luminoso
	document.write("<TR><TD class=tdMainMenu><BR>");
	dispmmenu( nPath );
	document.write("</TD></TR>");
	
	// linea separatrice gialla
	document.write("<TR><TD width='100%'>&nbsp;</TD></TR>");
	document.write("<TR><TD width='100%'><HR color=#FFCC00></TD></TR>");
	document.write("<TR><TD width='100%'>&nbsp;</TD></TR>");

	// tre foto che cambiano ad ogni richiamo della pagina
	document.write("<TR><TD align=center width='100%'><FONT color=#AAAAAA size=3>alcune nostre foto</B><BR>&nbsp;</FONT></TD></TR>");
	document.write("<TR><TD align=center width='100%'>");
	FotoRandom( nPath );
	document.write("    </TD></TR>");
	document.write("<TR><TD width='100%'>&nbsp;</TD></TR>");
	
	// disattivare le seguenti 5 righe per non vedere il logo FIAF in basso sulla barra sinistra
	document.write("<TR><TD width='100%'><HR color=#FFCC00></TD></TR>");
	document.write("<TR><TD width='100%'>&nbsp;</TD></TR>");
	document.write("<TR><TD width=100% valign='top' align='center'><A href='http://www.fiaf-net.it' target='_blank'>");
	document.write("        <IMG alt='http://www.fiaf-net.it' src='", cPath, "csf_dati/fiaf5.jpg' border='0'></A></TD></TR>");
	document.write("<TR><TD width='100%'>&nbsp;</TD></TR>");

	// chiusura della tabella della barra sinistra.
	document.write("</TBODY></TABLE>");
	
}





var ff = -1;
var foto = new Array();
//				NOMEFILE					AUTORE					PAGINA LINK						TITOLO
FotoRandomObj("alessandro_cecconi_1.jpg", 	"alessandro_cecconi", 	"alessandro_cecconi/index.htm", 	" ");
FotoRandomObj("alessandro_myckaniuk_1.jpg", "alessandro_myckaniuk", "alessandro_myckaniuk/index.htm", 	" ");
FotoRandomObj("andrea_galli_1.jpg", 		"andrea_galli", 		"andrea_galli/index.htm", 			" ");
FotoRandomObj("andrea_galli_2.jpg", 		"andrea_galli", 		"andrea_galli/index.htm", 			" ");
FotoRandomObj("anna_donnoli_1.jpg", 		"anna_donnoli", 		"anna_donnoli/index.htm", 			" ");
FotoRandomObj("anna_donnoli_2.jpg", 		"anna_donnoli", 		"anna_donnoli/index.htm", 			" ");
FotoRandomObj("barbara_granchi_1.jpg", 		"barbara_granchi", 		"barbara_granchi/index.htm", 		" ");
FotoRandomObj("claudio_giusti_1.jpg", 		"claudio_giusti", 		"claudio_giusti/index.htm", 		" ");
FotoRandomObj("cristina_raffaelli_1.jpg", 	"cristina_raffaelli", 	"cristina_raffaelli/index.htm", 	" ");
FotoRandomObj("daniela_guasti_2.jpg", 		"daniela_guasti", 		"daniela_guasti/index.htm", 		" ");
FotoRandomObj("daniele_benigni_1.jpg", 		"daniele_benigni", 		"daniele_benigni/index.htm", 		" ");
FotoRandomObj("daniele_benigni_2.jpg", 		"daniele_benigni", 		"daniele_benigni/index.htm", 		" ");
FotoRandomObj("elena_lastrucci_1.jpg", 		"elena_lastrucci", 		"elena_lastrucci/index.htm", 		" ");
FotoRandomObj("elena_lastrucci_2.jpg", 		"elena_lastrucci", 		"elena_lastrucci/index.htm", 		" ");
FotoRandomObj("elena_lastrucci_3.jpg", 		"elena_lastrucci", 		"elena_lastrucci/index.htm", 		" ");
FotoRandomObj("emilio_pacetti_1.jpg", 		"emilio_pacetti", 		"emilio_pacetti/index.htm", 		" ");
FotoRandomObj("gabriele_capecchi_1.jpg", 	"gabriele_capecchi", 	"gabriele_capecchi/index.htm", 		" ");
FotoRandomObj("gabriele_capecchi_2.jpg", 	"gabriele_capecchi", 	"gabriele_capecchi/index.htm", 		" ");
FotoRandomObj("giuseppe_marchi_1.jpg", 		"giuseppe_marchi", 		"giuseppe_marchi/index.htm", 		" ");
FotoRandomObj("giuseppe_marchi_2.jpg", 		"giuseppe_marchi", 		"giuseppe_marchi/index.htm", 		" ");
FotoRandomObj("ippolito_manetti_1.jpg", 	"ippolito_manetti", 	"ippolito_manetti/index.htm", 		" ");
FotoRandomObj("leonardo_bertini_1.jpg", 	"leonardo_bertini", 	"leonardo_bertini/index.htm", 		" ");
FotoRandomObj("leonardo_bertini_2.jpg", 	"leonardo_bertini", 	"leonardo_bertini/index.htm", 		" ");
FotoRandomObj("leonardo_bertini_4.jpg", 	"leonardo_bertini", 	"leonardo_bertini/index.htm", 		" ");
FotoRandomObj("leonardo_bertini_5.jpg", 	"leonardo_bertini", 	"leonardo_bertini/index.htm", 		" ");
FotoRandomObj("lucia_montuschi_1.jpg", 		"lucia_montuschi", 		"lucia_montuschi/index.htm", 		" ");
FotoRandomObj("luisa_rastelli_1.jpg", 		"luisa_rastelli", 		"luisa_rastelli/index.htm", 		" ");
FotoRandomObj("luisa_rastelli_2.jpg", 		"luisa_rastelli", 		"luisa_rastelli/index.htm", 		" ");
FotoRandomObj("luisa_rastelli_3.jpg", 		"luisa_rastelli", 		"luisa_rastelli/index.htm", 		" ");
FotoRandomObj("marcello_massai_1.jpg", 		"marcello_massai", 		"marcello_massai/index.htm", 		" ");
FotoRandomObj("margherita_nuti_1.jpg", 		"margherita_nuti", 		"margherita_nuti/index.htm", 		" ");
FotoRandomObj("mario_romoli_1.jpg", 		"mario_romoli", 		"mario_romoli/index.htm", 			" ");
FotoRandomObj("mario_sclafani_1.jpg", 		"mario_sclafani", 		"mario_sclafani/index.htm", 		" ");
FotoRandomObj("mario_sclafani_2.jpg", 		"mario_sclafani", 		"mario_sclafani/index.htm", 		" ");
FotoRandomObj("massimo_conti_1.jpg", 		"massimo_conti", 		"massimo_conti/index.htm", 			" ");
FotoRandomObj("mauro_casi_1.jpg", 			"mauro_casi", 			"mauro_casi/index.htm", 			" ");
FotoRandomObj("mauro_casi_3.jpg", 			"mauro_casi", 			"mauro_casi/index.htm", 			" ");
FotoRandomObj("michele_bianchini_1.jpg", 	"michele_bianchini", 	"michele_bianchini/index.htm", 		" ");
FotoRandomObj("monica_vintaloro_1.jpg", 	"monica_vintaloro", 	"monica_vintaloro/index.htm", 		" ");
FotoRandomObj("nino_ceccatelli_1.jpg", 		"nino_ceccatelli", 		"nino_ceccatelli/index.htm", 		" ");
FotoRandomObj("nino_ceccatelli_2.jpg", 		"nino_ceccatelli", 		"nino_ceccatelli/index.htm", 		" ");
FotoRandomObj("nino_ceccatelli_3.jpg", 		"nino_ceccatelli", 		"nino_ceccatelli/index.htm", 		" ");
FotoRandomObj("oriana_ottanelli_1.jpg", 	"oriana_ottanelli", 	"oriana_ottanelli/index.htm", 		" ");
FotoRandomObj("paolo_borchi_1.jpg", 		"paolo_borchi", 		"paolo_borchi/index.htm", 			" ");
FotoRandomObj("paolo_cambursano_1.jpg", 	"paolo_cambursano", 	"paolo_cambursano/index.htm", 		" ");
FotoRandomObj("paolo_pacini_1.jpg", 		"paolo_pacini", 		"paolo_pacini/index.htm", 			" ");
FotoRandomObj("renzo_carlesi_1.jpg", 		"renzo_carlesi", 		"renzo_carlesi/index.htm", 			" ");
FotoRandomObj("renzo_carlesi_3.jpg", 		"renzo_carlesi", 		"renzo_carlesi/index.htm", 			" ");
FotoRandomObj("renzo_carlesi_4.jpg", 		"renzo_carlesi", 		"renzo_carlesi/index.htm", 			" ");
FotoRandomObj("renzo_carlesi_5.jpg", 		"renzo_carlesi", 		"renzo_carlesi/index.htm", 			" ");
FotoRandomObj("renzo_carlesi_6.jpg", 		"renzo_carlesi", 		"renzo_carlesi/index.htm", 			" ");
FotoRandomObj("riccardo_cocchi_1.jpg", 		"riccardo_cocchi", 		"riccardo_cocchi/index.htm", 		" ");
FotoRandomObj("riccardo_cocchi_2.jpg", 		"riccardo_cocchi", 		"riccardo_cocchi/index.htm", 		" ");
FotoRandomObj("riccardo_cocchi_3.jpg", 		"riccardo_cocchi", 		"riccardo_cocchi/index.htm", 		" ");
FotoRandomObj("riccardo_logli_1.jpg", 		"riccardo_logli", 		"riccardo_logli/index.htm", 		" ");
FotoRandomObj("roberto_sardi_1.jpg", 		"roberto_sardi", 		"roberto_sardi/index.htm", 			" ");
FotoRandomObj("romano_amicone_1.jpg", 		"romano_amicone", 		"romano_amicone/index.htm", 		" ");
FotoRandomObj("stefano_poli_1.jpg", 		"stefano_poli", 		"stefano_poli/index.htm", 			" ");
FotoRandomObj("stella_carbone_1.jpg", 		"stella_carbone", 		"stella_carbone/index.htm", 		" ");
FotoRandomObj("vanda_capacci_1.jpg", 		"vanda_capacci", 		"vanda_capacci/index.htm", 			" ");
FotoRandomObj("vanda_capacci_3.jpg", 		"vanda_capacci", 		"vanda_capacci/index.htm", 			" ");
FotoRandomObj("vanda_capacci_4.jpg", 		"vanda_capacci", 		"vanda_capacci/index.htm", 			" ");
FotoRandomObj("vanda_capacci_5.jpg", 		"vanda_capacci", 		"vanda_capacci/index.htm", 			" ");




function FotoRandomObj( cFile, cAutore, cLink, cTitolo ){
	foto[++ff] = new Object();
	foto[ff].nomefile = cFile;
	foto[ff].autore = cAutore;
	foto[ff].link = cLink;
}




// Disegna le tre foto sulla barra a sinistra.
function FotoRandom( nPath ){
	var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }

	var d, s, f, l, a;

	nNumFoto = foto.length-1;
	d = new Date();		// data e ora correnti sul pc dell'utente.

	s = d.getSeconds();	// numero di secondi dell'ora corrente
	if(s >= nNumFoto ){ s = s - nNumFoto ;};
	f = foto[s].nomefile;		// nome della foto corrispondente
	a = foto[s].autore;
	l = foto[s].link;
	document.write("<P><A class='FotoLink' href='", cPath, "csf_slideshow/zoom/", f, "' target='_blank'>");
	document.write("<IMG style='border-color:#FFCC00' src='", cPath, "csf_slideshow/anteprima/", f, "' border='1'></A><BR>");
	document.write("<A class='FotoLink' href='", cPath, "gallerie/", l, "' target='_parent'>", a, "</A></P>");

	s++;
	if(s >= nNumFoto ){ s = s - nNumFoto ;};
	f = foto[s].nomefile;		// nome della foto corrispondente
	a = foto[s].autore;
	l = foto[s].link;
	document.write("<P><A class='FotoLink' href='", cPath, "csf_slideshow/zoom/", f, "' target='_blank'>");
	document.write("<IMG style='border-color:#FFCC00' src='", cPath, "csf_slideshow/anteprima/", f, "' border='1'></A><BR>");
	document.write("<A class='FotoLink' href='", cPath, "gallerie/", l, "' target='_parent'>", a, "</A></P>");

	
	s++;
	if(s >= nNumFoto ){ s = s - nNumFoto ;};
	f = foto[s].nomefile;		// nome della foto corrispondente
	a = foto[s].autore;
	l = foto[s].link;
	document.write("<P><A class='FotoLink' href='", cPath, "csf_slideshow/zoom/", f, "' target='_blank'>");
	document.write("<IMG style='border-color:#FFCC00' src='", cPath, "csf_slideshow/anteprima/", f, "' border='1'></A><BR>");
	document.write("<A class='FotoLink' href='", cPath, "gallerie/", l, "' target='_parent'>", a, "</A></P>");


}








// barra del titolo per le pagine nella cartella principale
function TitoloBody(cTitolo){  
  document.write("<TABLE width='100%' border='0' cellpadding=0 bgcolor=#424242><TBODY><TR><TD align='left' height='30' width='100%'>");
  document.write("	<FONT color='#CCCCCC' face='arial' size='5'><B>", cTitolo, "</B></FONT>");
  document.write("</TD></TR></TBODY></TABLE>");
}


// barra del titolo per le pagine nelle cartelle secondarie 
function TitoloBody1(cTitolo){  
  document.write("<TABLE width='100%' border='0' cellpadding=0 bgcolor=#424242><TBODY><TR><TD align='left' height='30' width='100%'>");
  document.write("	<FONT color='#CCCCCC' face='arial' size='5'><B>", cTitolo, "</B></FONT>");
  document.write("</TD></TR></TBODY></TABLE>");
}


// barra del titolo per le pagine nelle cartelle secondarie dove compaiono sotto-sezioni (es. NEWS)
function TitoloBody2(cTitolo){  
  document.write("<TABLE width='100%' border='0' cellpadding=0 bgcolor=#AAAAAA><TBODY><TR><TD align='left' height='30' width='100%'>");
  document.write("	<FONT color='#FFFFFF' face='arial' size='4'><B>", cTitolo, "</B></FONT>");
  document.write("</TD></TR></TBODY></TABLE>");
}









/************************

	funzioni per la visualizzazione del contentuo delle pagine


*/
function ZoomParliamodi(){

	ZoomLavori();

	var dichiarazione = "Le immagini di questa pagina sono state trovate su internet quindi ritenute di pubblico dominio.";
	dichiarazione += "<BR>Se cosi non fosse i proprietari dei diritti possono comunicarcelo via e-mail a <BR>";
	dichiarazione += "<A class='BodyLink' href='mailto:info@centrosperimentale.it'>info@centrosperimentale.it</A> <BR>";
	dichiarazione += "e provvederemo prontamente a toglierle. <BR>";
	document.write("<BR><CENTER><FONT size='1'>", dichiarazione, "<BR>&nbsp;</FONT></CENTER>");
}




function ZoomLavori(){

	document.write("<TABLE width='100%' border=1 cellpadding=3><TBODY>");
	document.write("<TR><TD class=NostriLavori align=center valign=top height=", screen.height, ">");

	document.write("<TABLE border=0 cellpadding=3><TBODY><TR>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:PrimaFoto()'><IMG src='../csf_dati/primo.gif' border=0></A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:CambiaFoto(-1)'><IMG src='../csf_dati/precedente.gif' border=0></A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:auto()'><IMG src='../csf_dati/avvia.gif' name=imgStartStop border=0></A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:CambiaFoto(1)'><IMG src='../csf_dati/successivo.gif' border=0></A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:UltimaFoto()'><IMG src='../csf_dati/ultimo.gif' border=0></A></TD>");
	document.write("</TR><TR>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:PrimaFoto()'>Prima Foto</A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:CambiaFoto(-1)'>Foto Precedente</A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:auto()'><P id=pStartStop>Avvia Slideshow</P></A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:CambiaFoto(1)'>Foto Successiva</A></TD>");
	document.write("	<TD align=center valign=middle><A class=BodyLinkGal href='javascript:UltimaFoto()'>Ultima Foto</A></TD>");
	document.write("</TR></TBODY></TABLE>");

	document.write("<HR color='#FFCC00'>");

	document.write("<P><IMG src='",curPath,"/01.jpg' name=slideshow border=3></P>");
	document.write("<P id=pDidascalia>1 / "+aFoto.length+"<BR>",aFoto[0][1],"</P>");
	document.write("</TD></TR></TBODY></TABLE>");

}

var curFotoID = 0;
var delay = 4000;	//Time delay between Slides in milliseconds
var lock = false;	// false=manuale, true=automatico
var run;

function CambiaFoto(direction) {
	if (document.images) {
		curFotoID = curFotoID + direction;
		if (curFotoID > aFoto.length - 1) {
			curFotoID = 0;
		}
		if (curFotoID < 0) {
			curFotoID = aFoto.length - 1;
		}
		document.slideshow.src = curPath +"/"+ aFoto[curFotoID][0];
		document.getElementById("pDidascalia").innerHTML = curFotoID + 1 + " / " + aFoto.length + "<BR>" + aFoto[curFotoID][1];
	}
}

function PrimaFoto(){
	if (document.images) {
		curFotoID = 0;
		document.slideshow.src = curPath +"/"+ aFoto[curFotoID][0];
		document.getElementById("pDidascalia").innerHTML = curFotoID + 1 + " / " + aFoto.length + "<BR>" + aFoto[curFotoID][1];
	}
}

function UltimaFoto(){
	if (document.images) {
		curFotoID = aFoto.length - 1;
		document.slideshow.src = curPath +"/"+ aFoto[curFotoID][0];
		document.getElementById("pDidascalia").innerHTML = curFotoID + 1 + " / " + aFoto.length + "<BR>" + aFoto[curFotoID][1];
	}
}

function auto() {
	if (lock == true) {
		lock = false;
		window.clearInterval(run);
		document.getElementById("pStartStop").innerHTML="Avvia Slideshow";
		document.imgStartStop.src="../csf_dati/avvia.gif";
	}
	else if (lock == false) {
		lock = true;
		run = setInterval("CambiaFoto(1)", delay);
		document.getElementById("pStartStop").innerHTML="Pausa Slideshow";
		document.imgStartStop.src="../csf_dati/pausa.gif";
	}
}







/*********************************

	funzioni relative a tutti i menu

*/
var aMenu = new Array();
var mm = -1;
var ss = -1;

//MainMenuObj: crea un oggetto per il menu principale
function MainMenuObj( cText, cLink ){
	aMenu[++mm] = new Object();
	aMenu[mm].text = cText;
	aMenu[mm].link = cLink;
	aMenu[mm].on_click = '';
	aMenu[mm].target = '_parent';
	aMenu[mm].hasSubmenus = false;
	aMenu[mm].submenus = new Array();
	ss = -1;
}


//SubMenuObj: crea un oggeto per i sotto-menu
function SubMenuObj( nMainMenuID, cText, cLink ){
	aMenu[nMainMenuID].hasSubmenus = true;
	aMenu[nMainMenuID].submenus[++ss] = new Object();
	aMenu[nMainMenuID].submenus[ss].text = cText;
	aMenu[nMainMenuID].submenus[ss].link = cLink;
	aMenu[nMainMenuID].submenus[ss].target = '_parent';
}



//DisplayMainMenu
// NOTA: EVENTUALI MEDIFICHE DEVONO ESSERE INCLUSE ANCHE NELLA FUNZIONE MainMenu_Gallerie() nel file csf_gallerie.js
function DisplayMainMenu( nPath ){
var i = 0;
var p = "";

	if( nPath == 1 ) { p = "../"; }
	if( nPath == 2 ) { p = "../../"; }
	if( nPath == 3 ) { p = "../../../"; }

	document.write("<TABLE bgcolor=#424242 border=0 cellpadding=2 width=100% cellspacing=0><TBODY>");
	document.write("<TR bgcolor=#000000><TD>");
	document.write("	<TABLE cellpadding=2 cellspacing=0><TBODY><TR height=20>");
	for ( i=0; i<aMenu.length; i++){	
		document.write("<TD id='tdMainMenu_'" + i + "><FONT face=Verdana color=#FFCC00>&nbsp;");
		document.write("<A href='", p+aMenu[i].link, "' class='MenuSecLink' onmouseover='DisplaySubMenu("+nPath+","+i+");'>", aMenu[i].text, "</A>&nbsp;</FONT></TD>");
	}
	document.write("			</TR></TBODY></TABLE>");
	document.write("</TD></TR>");
	document.write("<TR><TD bgcolor=#FFCCOO></TD></TR>");
	document.write("<TR bgcolor=#525252><TD>");
	document.write("	<TABLE cellpadding=2 cellspacing=0><TBODY><TR height=20><TD><DIV id=divSubMenu>&nbsp;</DIV></TD></TR></TBODY></TABLE>");
	document.write("</TD></TR>");
	document.write("</TBODY></TABLE>");

}



//DisplaySubMenu
function DisplaySubMenu( nPath, nMainMenu ){
var textSubMenu = "<FONT size=1 color=#AAAAAA> | ";
var i = 0;
var p = "";

	if ( aMenu[nMainMenu].hasSubmenus == true ) {
	
	if( nPath == 1 ) { p = "../"; }
	if( nPath == 2 ) { p = "../../"; }
	if( nPath == 3 ) { p = "../../../"; }

		for (i=0; i<aMenu[nMainMenu].submenus.length; i++){
			textSubMenu += "<A class='MenuSecLink' href='" + p + aMenu[nMainMenu].submenus[i].link + "' target='"+aMenu[nMainMenu].submenus[i].target+"'>";
			textSubMenu +=  aMenu[nMainMenu].submenus[i].text + "</A> | ";
		}
	
		textSubMenu += "</FONT>";
		document.getElementById('divSubMenu').innerHTML = textSubMenu;
		
	}
}





function MainMenu_Parliamodi( nPath ){
	mm = -1;
	aMenu = new Array();
	
	var p = "csf_parliamo_di/";
	
	//if( nPath == 1 ) { p = "../parliamo_di/"; }	//aggiunto nella DisplayMenu()
	
	MainMenuObj( 'eventi', 'csf_parliamodi.htm#' );
		SubMenuObj( 0, 'fiaf_portfolio_2007', p+'fiaf_portfolio_2007/fiaf_portfolio_2007.pdf' );			
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 0, 'fiaf_portfolio_2006', p+'fiaf_portfolio_2006/fiaf_portfolio_2006.pdf' );			
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 0, 'campioni_del_mondo_2006', p+'campioni_del_mondo_2006/campioni_del_mondo_2006.pdf' );	
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 0, 'fiaf_portfolio_2005', p+'fiaf_portfolio_2005/fiaf_portfolio_2005.pdf' );			
		aMenu[mm].submenus[ss].target = '_blank';
	MainMenuObj( 'tecnica e cultura', 'csf_parliamodi.htm#' );
		SubMenuObj( 1, 'pillole_dac', p+'pilloledac.htm' );
		SubMenuObj( 1, 'fotografia_astronomica', p+'fotoastronomia.htm' );
		SubMenuObj( 1, 'high_dynamic_range', p+'hdr.htm' );
	MainMenuObj( 'fiaf', 'csf_parliamodi.htm#' );
		SubMenuObj( 2, 'fiaf_portfolio_2007', p+'fiaf_portfolio_2007/fiaf_portfolio_2007.pdf' );			
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 2, 'fiaf_portfolio_2006', p+'fiaf_portfolio_2006/fiaf_portfolio_2006.pdf' );			
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 2, 'campioni_del_mondo_2006', p+'campioni_del_mondo_2006/campioni_del_mondo_2006.pdf' );	
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 2, 'fiaf_portfolio_2005', p+'fiaf_portfolio_2005/fiaf_portfolio_2005.pdf' );			
		aMenu[mm].submenus[ss].target = '_blank';
		SubMenuObj( 2, 'pillole_dac', p+'pilloledac.htm' );
		
	DisplayMainMenu( nPath );
	
}





// menu principale delle pagine dei 'nostri lavori'
function MainMenu_NostriLavori( nPath ){
	mm = -1;
	aMenu = new Array();
	
	var p = "csf_nostri_lavori/";
	//if( nPath == 1 ) { p = "../" + p; }	//aggiunto nellla DisplayMenu()
	
	MainMenuObj( 'le dieci castella', p+'le_dieci_castella.htm' );
	MainMenuObj( 'oh! la cina', p+'oh_la_cina.htm' );
	MainMenuObj( 'people', p+'people.htm' );
	MainMenuObj( 'camminando insieme', p+'camminando_insieme.htm' );
	MainMenuObj( 'guida tci', p+'tci_prato.htm' );
	MainMenuObj( 'oltre lo sguardo', p+'oltre_lo_sguardo.htm' );
	MainMenuObj( 'calvana', p+'calvana.htm' );
	MainMenuObj( 'saharawi', p+'saharawi.htm' );
	
	DisplayMainMenu( nPath );
	
}





// menu principale delle pagine dei 'nostri lavori'
function MainMenu_AltriLink( nPath ){
	mm = -1;
	aMenu = new Array();
	
	var p = "";
	//if( nPath == 1 ) { p = "../" + p; }	//aggiunto nellla DisplayMenu()
	
	MainMenuObj('siti amici', 				'csf_link.htm#titolo0');
	MainMenuObj("il mondo dell'immagine", 	'csf_link.htm#titolo1');
	MainMenuObj('associazioni', 			'csf_link.htm#titolo2');
	MainMenuObj('fotografia digitale', 		'csf_link.htm#titolo3');
	MainMenuObj('info fotocamere', 			'csf_link.htm#titolo4');
	MainMenuObj('fotoclub', 				'csf_link.htm#titolo5');
	MainMenuObj('fotografi', 				'csf_link.htm#titolo6');
	MainMenuObj('aziende produttrici', 		'csf_link.htm#titolo7');
	MainMenuObj('commerciali', 				'csf_link.htm#titolo8');
	MainMenuObj('libri e riviste on-line', 	'csf_link.htm#titolo9');
	
	DisplayMainMenu( nPath );
	
}








//disegna le due righe (nera e grigia) come per i sub-menu ma sono vuote
function SubMenuVuoto(){

	document.write("<TABLE bgcolor=#424242 border=0 cellpadding=2 width=100% cellspacing=0><TBODY>");
	document.write("<TR bgcolor=#000000><TD>");
	document.write("	<TABLE cellpadding=2 cellspacing=0><TBODY><TR height=20><TD>&nbsp;</TD></TR></TBODY></TABLE>");
	document.write("</TD></TR>");
	document.write("<TR bgcolor=#FFCCOO><TD></TD></TR>");
	document.write("<TR bgcolor=#525252><TD>");
	document.write("	<TABLE cellpadding=2 cellspacing=0><TBODY><TR height=20><TD>&nbsp;</TD></TR></TBODY></TABLE>");
	document.write("</TD></TR>");
	document.write("</TBODY></TABLE>");

}





/***********************

	codice per la gestione del menu luminoso
	
*/
var mmenu = Array(
	["","","","" ],
	["menu_0_home.jpg", 			"menu_1_home.jpg", 			"mmenu1", 	"index.htm"],
	["menu_0_gallerie.jpg", 		"menu_1_gallerie.jpg", 		"mmenu2", 	"gallerie/index.htm"],
	["menu_0_programma.jpg", 		"menu_1_programma.jpg", 	"mmenu3", 	"csf_programma.htm"],
	["menu_0_inostrilavori.jpg", 	"menu_1_inostrilavori.jpg", "mmenu4", 	"csf_lavori.htm"],
	["menu_0_parliamodi.jpg", 		"menu_1_parliamodi.jpg", 	"mmenu5", 	"csf_parliamodi.htm"],
	//["menu_0_news.jpg", 			"menu_1_news.jpg", 			"mmenu6", 	"csf_news.htm"],
	["menu_0_chisiamo.jpg", 		"menu_1_chisiamo.jpg", 		"mmenu6", 	"csf_chisiamo.htm"],
	["menu_0_guestbook.jpg", 		"menu_1_guestbook.jpg", 	"mmenu7", 	"csf_guestbook.htm"],
	["menu_0_link.jpg", 			"menu_1_link.jpg", 			"mmenu8", 	"csf_link.htm"],
	["menu_0_copyright.jpg", 		"menu_1_copyright.jpg", 	"mmenu9", 	"csf_copyright.htm"]
);

	

function mmenuover( menuid, nPath ){
var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	document.getElementById(mmenu[menuid][2]).src = cPath + "csf_dati/" + mmenu[menuid][1];
}


function mmenuout( menuid, nPath ){
var cPath = "";
	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }
	document.getElementById(mmenu[menuid][2]).src = cPath + "csf_dati/" + mmenu[menuid][0];
}

function dispmmenu( nPath ){
var i = 1;
var f = 9;//10;
var c = 1;
var cPath = "";

	if( nPath == 1 ) { cPath = "../"; }
	if( nPath == 2 ) { cPath = "../../"; }
	if( nPath == 3 ) { cPath = "../../../"; }

	for ( c=i; c<=f; c++ ){
		document.write("<A href=",cPath,mmenu[c][3]," onmouseover='mmenuover(",c,",",nPath,");' onmouseout='mmenuout(",c,",",nPath,");'>");
		document.write("<IMG border=0 id='mmenu", c, "' src='", cPath, "csf_dati/", mmenu[c][0],"'></A><BR>")
	}
}




/* FINE */