
/*	File menu.js - Directory SRB				*/

/*	Versione 05/03/2009 | 28-05-2011			*/

/*	----------------------------------------	*/

	gl_livello = 0;
	gl_dir_banner = "banner/";
	gl_directory_hp = "index.php";

	menu_nav_v = "on";
	
/*	Menu di navigazione verticale in italiano	*/

	menu_v_it[0] = new Array("Home", "index.php");
	
	menu_v_it[1] = new Array("Sacerdoti della Parrocchia", "srb_presbiterio_it.html");
	menu_v_it[2] = new Array("Segreteria e i Consigli", "srb_segreteria_consigli_it.html");
	menu_v_it[3] = new Array("Identità e storia", "srb_parrocchia_it.html");
	menu_v_it[4] = new Array("Orari", "srb_orari_it.html");	
	menu_v_it[5] = new Array("Visita virtuale della Chiesa", "srb_visita_virtuale_it.html");	
	
	menu_v_it[6] = new Array("Vita del Santo", "srb_san_roberto_vita_it.html");
	menu_v_it[7] = new Array("Bibliografia bellarminiana", "srb_san_roberto_bibliografia_it.html");	
	menu_v_it[8] = new Array("Archivio fotografico", "srb_san_roberto_materiale_it.html");
	
	menu_v_it[9] = new Array("Catechesi - Cammino di fede", "srb_catechesi_it.html");
	menu_v_it[10] = new Array("Celebrazione dei sacramenti", "srb_sacramenti_it.html");
	menu_v_it[11] = new Array("Attività di servizio e di carità", "srb_attivita_servizio_it.html");
	menu_v_it[12] = new Array("Elenco dei Gruppi", "srb_gruppi_it.html");	
	
	menu_v_it[13] = new Array("Archivio eventi", "srb_archivio_eventi_it.html");
	menu_v_it[14] = new Array("Giornale Agape", "srb_agape_it.html");
/*	menu_v_it[] = new Array("Pellegrinaggi", "srb_pellegrinaggi_it.html");	*/
	
	menu_v_it[15] = new Array("Letture del giorno", "srb_letture_it.html");
	menu_v_it[16] = new Array("Contattaci", "srb_contattaci_it.html");
/*	menu_v_it[] = new Array("Mappa del sito", "srb_mappa_it.html");		*/
	menu_v_it[17] = new Array("Informazioni sul sito", "srb_sito_it.html");
	
/*	Sezioni in italiano	*/	

	menu_v_sezione_it[0] = new Array("La Parrocchia - Home Page", "index.php", 1, 5);
	menu_v_sezione_it[1] = new Array("", "#", -1, -1);	/* Riga vuota	*/	
	menu_v_sezione_it[2] = new Array("San Roberto Bellarmino", "#", 6, 8);
	menu_v_sezione_it[3] = new Array("", "#", -1, -1);	/* Riga vuota	*/
	menu_v_sezione_it[4] = new Array("Attività e Gruppi", "#", 9, 12);
	menu_v_sezione_it[5] = new Array("", "#", -1, -1);	/* Riga vuota	*/
	menu_v_sezione_it[6] = new Array("Attività culturali","#", 13, 14);
	menu_v_sezione_it[7] = new Array("", "#", -1, -1);	/* Riga vuota	*/
	menu_v_sezione_it[8] = new Array("Risorse","#", 15, 17);
	menu_v_sezione_it[9] = new Array("", "#", -1, -1);	/* Riga vuota	*/

	menu_test = 1;	/*	Non modificare questa istruzione	*/
	
/*	--------------- INIZIO SEZIONE PERSONALIZZAZIONI -------------------------	*/	

/*	+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	*/

/*		Sezione per la gestione della tastiera per le imagini			*/

/*		Versione del 30-04-2008								*/

/*	+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	*/

/*	Definizione delle variabili globali	*/

var gl_num_immagini;
var gl_img_prefisso;
var gl_img_prefisso_len;

/*	Personalizzazione dell'ambiente	*/

	gl_num_immagini = 28;
	gl_img_prefisso = "srb_visita_virtuale_";
	

/*	Definizione delle variabili interne		*/

	gl_img_prefisso_len = gl_img_prefisso.length;
	
/*	-------------------------------------------	*/
	
/*	Funzione scrivi_img_tastiera (lang)			*/

function scrivi_img_tastiera (lang) {

/*	Manca il test sulla lingua	*/
	
	document.writeln("<img class='std' src='icons/gl_first_2.gif' width='18' height='16' href='#' onclick='img_first(" + '"' + lang + '"' + ");' alt='Prima immagine'>");
	document.writeln("<img class='std' src='icons/gl_back_2.gif'  width='18' height='16' href='#' onclick='img_prev("  + '"' + lang + '"' + ");' alt='Immagine precedente'>");
	document.writeln("<img class='std' src='icons/gl_next_2.gif'  width='18' height='16' href='#' onclick='img_next("  + '"' + lang + '"' + ");' alt='Immagine successiva'>");
	document.writeln("<img class='std' src='icons/gl_last_2.gif'  width='18' height='16' href='#' onclick='img_last("  + '"' + lang + '"' + ");' alt='Ultima immagine'>");
	
	return true;
}

/*	-------------------------------------------	*/

/*	Funzione img_first() - Versione del 17/11/2007	*/

function img_first (lang) {
	path = window.location.pathname;
	i = path.indexOf(gl_img_prefisso) + gl_img_prefisso_len;	/* per la lunghezza del prefisso	*/
	numero = path.substr(i,4) * 1;	/* stringa multiplicata per 1 fornisce un numero */
	
	if (numero == 1) return true;
		
	file = gl_img_prefisso + "0001_" + lang + ".html";
		
	window.location = file;
	return true;
}

/*	Funzione img_prev()	- Versione del 17/11/2007	*/

function img_prev (lang) {
	path = window.location.pathname;
	i = path.indexOf(gl_img_prefisso) + gl_img_prefisso_len;	/* per la lunghezza del prefisso	*/
	numero = path.substr(i,4) * 1;	/* stringa multiplicata per 1 fornisce un numero */
	
	if (numero > 1) numero = numero - 1;
	else return true;
		
	val = numero.toString();
	lunghezza = val.length;
	
	if (lunghezza == 1) file = "000" + val;
	else
	if (lunghezza == 2) file = "00" + val;
	else
	if (lunghezza == 3) file = "0" + val;
	else
	if (lunghezza == 4) file = val;
	
	file = gl_img_prefisso + file + "_" + lang + ".html";
	
	window.location = file;
	return true;
}

/*	Funzione img_next()	- Versione del 17/11/2007	*/

function img_next (lang) {
	path = window.location.pathname;
	i = path.indexOf(gl_img_prefisso) + gl_img_prefisso_len;	/* per la lunghezza del prefisso	*/
	numero = path.substr(i,4) * 1;	/* stringa multiplicata per 1 fornisce un numero */
	
	if (numero < gl_num_immagini) numero = numero + 1;
	else return true;
		
	val = numero.toString();
	lunghezza = val.length;
	
	if (lunghezza == 1) file = "000" + val;
	else
	if (lunghezza == 2) file = "00" + val;
	else
	if (lunghezza == 3) file = "0" + val;
	else
	if (lunghezza == 4) file = val;
	
	file = gl_img_prefisso + file + "_" + lang + ".html";
	
	window.location = file;
	return true;
}

/*	Funzione img_last()	- Versione del 17/11/2007	*/

function img_last (lang) {
	path = window.location.pathname;
	i = path.indexOf(gl_img_prefisso) + gl_img_prefisso_len;	/* per la lunghezza del prefisso	*/
	numero = path.substr(i,4) * 1;	/* stringa multiplicata per 1 fornisce un numero */

	if (numero != gl_num_immagini) numero = gl_num_immagini;
	else return true;
	
	val = numero.toString();
	lunghezza = val.length;
	
	if (lunghezza == 1) file = "000" + val;
	else
	if (lunghezza == 2) file = "00" + val;
	else
	if (lunghezza == 3) file = "0" + val;
	else
	if (lunghezza == 4) file = val;
	
	file = gl_img_prefisso + file + "_" + lang + ".html";
	
	window.location = file;
	return true;
}

/*	+++++++++++++++++++++++++++++++++ FOTO +++++++++++++++++++++++++++++++++++++++++++	*/

/*	-------------------------------------------------------------------	*/
/*					Archivio fotografico - 01-07-08						*/
/*	Modificato 05-03-09 perché ho scoperto un errore di directory ????	*/
/*	-------------------------------------------------------------------	*/

gl_foto_didascalia_it[0] = "";		/* Not used			*/
gl_foto_didascalia_it[1] = "on";		/* Set #1			*/

/*	Definizione del set numero 1:						*/

gl_foto_testo_alt_it_1 = "Cliccare per ingrandire";

gl_foto_it_1[0] = new Array("archivio_small/", "san_roberto_bellarmino_15_small.jpg", "on", "", "srb_archivio_0006_it.html", "_self", "Parrocchia di San Roberto Bellarmino: vetrata del Santo");
gl_foto_it_1[1] = new Array("archivio_small/", "san_roberto_bellarmino_17_small.jpg", "on", "", "srb_archivio_0008_it.html", "_self", "Parrocchia di San Roberto Bellarmino: quadro del Santo");
gl_foto_it_1[2] = new Array("archivio_small/", "san_roberto_bellarmino_10_small.jpg", "on", "", "srb_archivio_0001_it.html", "_self", "Immagine d'epoca");
gl_foto_it_1[3] = new Array("archivio_small/", "san_roberto_bellarmino_11_small.jpg", "on", "", "srb_archivio_0002_it.html", "_self", "Immagine d'epoca");
gl_foto_it_1[4] = new Array("archivio_small/", "san_roberto_bellarmino_13_small.jpg", "on", "", "srb_archivio_0004_it.html", "_self", "Immagine d'epoca");
gl_foto_it_1[5] = new Array("archivio_small/", "san_roberto_bellarmino_14_small.jpg", "on", "", "srb_archivio_0005_it.html", "_self", "Immagine d'epoca");
gl_foto_it_1[6] = new Array("archivio_small/", "san_roberto_bellarmino_12_small.jpg", "on", "", "srb_archivio_0003_it.html", "_self", "Chiesa di Sant'Ignazio in Roma: quadro del Santo");
gl_foto_it_1[7] = new Array("archivio_small/", "san_roberto_bellarmino_16_small.jpg", "on", "", "srb_archivio_0007_it.html", "_self", "Chiesa del Gesù in Roma: busto del Santo");



/*	--------------- VISITA VIRTUALE DELLA CHIESA  -------------------------	*/

/*	Versione del 19-12-2007				*/

/*	From JSDIR n. 81 - 17-3-2003			*/
/*								*/
/*	From CDG - Vers. del 23/4/06 - 27/11/06	*/

var ImgDefault = -1;

var MapNomi = new Array ("01","02","03","04","05","06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26");

var MapSources = new Array ();

for (roller_count in MapNomi)
{	MapSources[roller_count] = new Image();
	MapSources[roller_count].src = "archivio_visita/san_roberto_bellarmino_roma_" + MapNomi[roller_count] + ".jpg";
}
	
var MapDefault = new Image(); 
MapDefault.src = "archivio_visita/san_roberto_bellarmino_roma_00.jpg";

var BaseMap = new Image(); 
BaseMap.src = "archivio_visita/san_roberto_bellarmino_roma_00.jpg";

var MapDefaultTimer;
		
function RollOn(ImgNum)
	{
	document.RollerMap.src=MapSources[ImgNum].src;
	clearTimeout(MapDefaultTimer);
	}

function RollOut()
	{
	clearTimeout(MapDefaultTimer);
	document.RollerMap.src=MapDefault.src;
	MapDefaultTimer=setTimeout("document.RollerMap.src=BaseMap.src;",200);
	}
	
onload=SetDefaults;

function SetDefaults()
	{
	if (ImgDefault!=-1)
		{
		BaseMap.src=MapSources[ImgDefault].src;
		document.RollerMap.src=MapSources[ImgDefault].src;
		}
	}


