
/*	File layout_app.js											*/

/*	Directory AiR												*/

/*	Versione del 24-06-2010										*/

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

/*	Caricamento dei CSS per la stampa e del CSS speciale per lo scroll verticale	*/

/*	Versione del 25/05/2010											*/

var	gl_nome_layout_completo;

if (gl_nome_layout == "")
alert("Error - Layout_app.js - Variable gl_nome_layout vuota. Caricamento css fallito.");
else {

	gl_nome_layout_completo = "zz1_cssjs/" + gl_nome_layout + "_";
	
	if (dim_finestra == "low")  	/* 800 x 600 */
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_800.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + gl_nome_layout_completo + "800.css type=text/css>");
		document.write("<link rel=stylesheet href=user_800.css type=text/css>");
	}
	else if (dim_finestra == "high") 	/* 1024 x 768 */
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_1024.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + gl_nome_layout_completo + "1024.css type=text/css>");
		document.write("<link rel=stylesheet href=user_1024.css type=text/css>");
	} 
	else  if (dim_finestra == "large")	/* 1280 x 800 oppure 1024 */
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_1280.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + gl_nome_layout_completo + "1280.css type=text/css>");
		document.write("<link rel=stylesheet href=user_1280.css type=text/css>");
	}
	else  if (dim_finestra == "xl")		/* 1400 x 1050 */
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_1400.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + gl_nome_layout_completo + "1400.css type=text/css>");
		document.write("<link rel=stylesheet href=user_1400.css type=text/css>");
	}
	else
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_1600.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + gl_nome_layout_completo + "1600.css type=text/css>");
		document.write("<link rel=stylesheet href=user_1600.css type=text/css>");
	}
	
	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_print.css type=text/css media=print>");
	document.write("<link rel=stylesheet href=" + gl_path + gl_nome_layout_completo + "print.css type=text/css media=print>");
	document.write("<link rel=stylesheet href=user_print.css type=text/css media=print>");
	
/*	25/05/2010 - Gestione dello scroll verticale	*/	
	if (tipo_browser != "ie") 
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/scroll_verticale.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/scroll_verticale_print.css type=text/css media=print>");
	}
	else
	{	if (navigator.userAgent.indexOf("MSIE 8") > 0)
		{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/scroll_verticale.css type=text/css>");
			document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/scroll_verticale_print.css type=text/css media=print>");	
		}			
	}

}
	
/*	++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	*/

/*	-----------------------------------------------------------------------------	*/
/*	Funzioni per il caricamento del banner											*/
/*	------------------------------------------------------------------------------	*/

/*	Funzione scrivi_logo_air (lang)							*/

/*	Versione del 03-05-2010									*/

/*	La variabile gl_dir_banner è definita nel file menu.js	*/

function scrivi_logo_air (lang)  {
	
	retour = scrivi_logo_air_core(lang, gl_dir_banner);
	
	return retour;
}

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

/*	Funzione scrivi_logo_air_core (lang, dir_banner)							*/

/*	Versione del 11-06-2010														*/

/*	Cliccando sull'immagine si raggiunge l'indirizzo							*/
/*	contenuto nella variabile globale logo_link									*/

/*	In input: gl_use_map_top[0]. Se vale "y" viene gestito il link sul logo		*/

function scrivi_logo_air_core (lang, dir_banner)  {

	var i, dim, stringa, relative_logo_link;
	var use_map, coordinate, ext;
	
	ext = ".jpg";
	use_map = "";
	coordinate = " coords='";

	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_logo_air_core() - lingua: '" + lang + "' non supportata.");
		return false;
	}
	
	if (dir_banner == "")
	{	alert("Funz. scrivi_logo_air_core() - Variabile Directory banner (dir_banner) vuota.");
		return false;
	}
	
	if (dir_banner.indexOf("zz1_banner/") != 0)
	{	alert("Funz. scrivi_logo_air_core() - Variabile Directory banner (dir_banner) errata.");
		alert("Funz. scrivi_logo_air_core() - Recovery in progress.");	
		dir_banner = "zz1_banner/standard/";
	}	
	
	dim = lista_lingue.length;
		
	for (i=0; i<dim; i++)
	{	if (lang == lista_lingue[i]) { stringa = banner_alt[i]; break; }
	}
	
/*	Calcolo dell'indirizzo dove andare quando si clicca sul banner	*/
/*	in funzione delle variabili gl_livello e gl_nome_hp				*/
	
	if (gl_livello == 0) relative_logo_link = gl_nome_hp;
	else
	{	relative_logo_link = "";
		for (i=0; i<gl_livello; i++) relative_logo_link = relative_logo_link + "../";
		relative_logo_link = relative_logo_link + gl_nome_hp;
	}
	
/*	++++++++++++	
	alert("Relative logo link = " + relative_logo_link + " - gl_use_map_top[0] = " + gl_use_map_top[0]);
	x = fichier();
	alert("fichier() --> " + x);
	++++++++++++	*/
	
/*	Scrittura del banner 	*/

	slogan_old = "Un luogo di incontro per riflettere<br>sulla digitalizzazione della società";
	slogan = "<em>Ananiainrete.it</em><br>Un sito utile per rendere utili i siti";
	alt_title_right = "Mappa del sito";
	
	if (gl_use_map_top[0] == "y" && fichier() != relative_logo_link) use_map = " usemap='#map_logo'";	/* modif. 24-09-08	*/

	document.write("<img src='" + gl_path + dir_banner + "air_logo_new_senza.jpg" + "'" + use_map + " width='171' height='81' style='float:left'>");
	coordinate = coordinate + gl_use_map_top[1][0] + "," + gl_use_map_top[2][0] + "," + gl_use_map_top[3][0] + "," + gl_use_map_top[4][0] + "'"; 
	
	filename = fichier();
	if (filename != "mappa_it.html") 
		document.write("<a href='" + gl_path + "Servizio/mappa_it.html'>"); 	
	
	document.write("<img src='" + gl_path + dir_banner + "air_logo_mappa_4_senza.jpg" + "'" + " width='81' height='81' style='float:right' alt='" + alt_title_right + "' title='" + alt_title_right + "'>");
	
	if (filename != "mappa_it.html") document.write("</a>");	
	
	document.write("<div style='width: 300px; margin: 0 auto;'><p id='text_testata'>" + slogan + "</p></div>");

/*	+++++++++++++++++++++++++++++	
	document.write("<div style='width: 685px; margin: 0 auto;'>");
	document.write("<p class='linea1'>Se consideri Internet come un luogo di incontro,</p>");
	document.write("<p class='linea2'>se intendi la comunicazione e il marketing come capacità di narrare storie,</p>");
	document.write("<p class='linea3'>se nel tuo ambiente di lavoro i rapporti tra etica ed informatica sono spesso problematici,</p>");
	document.write("<p class='linea4'>se sei consapevole del fenomeno della digitalizzazione della società,</p>");
	document.write("<p class='linea5'>puoi trovare supporto in questo sito</p>");		
	document.write("</div>");
	++++++++++++++++++++++++++++ */
	
	if (gl_use_map_top[0] == "y" && fichier() != relative_logo_link)					/* modif. 24-09-08	*/ 
	{	document.write("<map name='map_logo'>");
		document.write("<area shape='rect' href='" + relative_logo_link + "' alt='" + stringa + "'" + coordinate + ">");
		document.write("</map>");
	}
	
	return true;
}

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

/*	Funzione scrivi_logo_bottom(lang) - Versione del 24/09/2008			*/

/*	Cliccando sull'immagine si raggiunge l'indirizzo				*/
/*	contenuto nella variabile globale logo_link					*/

/*	In input: gl_use_map_bottom[0]. Se vale "y" viene gestito il link sul logo	*/

function scrivi_logo_bottom (lang)  {
	var i, dim, stringa, relative_logo_link;
	var use_map, coordinate, ext;
	
	ext = ".png";
	use_map = "";
	coordinate = " coords='";

	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_logo_bottom() - lingua: '" + lang + "' non supportata.");
		return false;
	}
	
	if (gl_dir_banner == "")
	{	alert("Funz. scrivi_logo_bottom() - Variabile Directory banner (gl_dir_banner) vuota.");
		return false;
	}
	
	dim = lista_lingue.length;
	for (i=0; i<dim; i++)
	{	if (lang == lista_lingue[i]) { stringa = banner_alt[i]; break; }
	}
	
/*	Calcolo dell'indirizzo dove andare quando si clicca sul banner	*/
/*	in funzione delle variabili gl_livello e gl_nome_hp		*/
	
	if (gl_livello == 0) relative_logo_link = gl_nome_hp;
	else
	{	relative_logo_link = "";
		for (i=0; i<gl_livello; i++) relative_logo_link = relative_logo_link + "../";
		relative_logo_link = relative_logo_link + gl_nome_hp;
	}
	
/*	Scrittura del banner _bottom	*/
	
	if (gl_use_map_bottom[0] == "y" && fichier() != relative_logo_link) use_map = " usemap='#map_logo'";	/* modif. 24-09-08	*/

	if (dim_finestra == "low")  		/* 800 x 600 */
	{	document.write("<img id='logo_bottom' src='" + gl_path + gl_dir_banner + "banner_800_bottom_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_bottom[1][0] + "," + gl_use_map_bottom[2][0] + "," + gl_use_map_bottom[3][0] + "," + gl_use_map_bottom[4][0] + "'"; 
	}
	else if (dim_finestra == "high") 	/* 1024 x 768 */
	{	document.write("<img id='logo_bottom' src='" + gl_path + gl_dir_banner + "banner_1024_bottom_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_bottom[1][1] + "," + gl_use_map_bottom[2][1] + "," + gl_use_map_bottom[3][1] + "," + gl_use_map_bottom[4][1] + "'"; 
	} 
	else  if (dim_finestra == "large")	/* 1280 x 800 oppure 1024 */
	{	document.write("<img id='logo_bottom' src='" + gl_path + gl_dir_banner + "banner_1280_bottom_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_bottom[1][2] + "," + gl_use_map_bottom[2][2] + "," + gl_use_map_bottom[3][2] + "," + gl_use_map_bottom[4][2] + "'"; 
	}
	else  if (dim_finestra == "xl")		/* 1400 x 1050 */
	{	document.write("<img id='logo_bottom' src='" + gl_path + gl_dir_banner + "banner_1400_bottom_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_bottom[1][3] + "," + gl_use_map_bottom[2][3] + "," + gl_use_map_bottom[3][3] + "," + gl_use_map_bottom[4][3] + "'"; 
	}
	else
	{	document.write("<img id='logo_bottom' src='" + gl_path + gl_dir_banner + "banner_1600_bottom_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_bottom[1][4] + "," + gl_use_map_bottom[2][4] + "," + gl_use_map_bottom[3][4] + "," + gl_use_map_bottom[4][4] + "'"; 
	}
	
	if (gl_use_map_bottom[0] == "y" && fichier() != relative_logo_link)					/* modif. 24-09-08	*/ 
	{	document.write("<map name='map_logo'>");
		document.write("<area shape='rect' href='" + relative_logo_link + "' alt='" + stringa + "'" + coordinate + ">");
		document.write("</map>");
	}
	
	return true;
}

/*	--------------------------------------------------------	*/
/*	Funzioni per la scrittura del footer						*/
/*	--------------------------------------------------------	*/

/*	Funzione scrivi_dua(lang) - Versione del 08-05-2010			*/

/*	DUA: Data Ultimo Aggiornamento								*/

function scrivi_dua (lang)  {
	var i, dim, stringa, sito_in_costruzione;

	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_dua() - lingua: '" + lang + "' non supportata.");
		return false
	}

	dim = lista_lingue.length;
	for (i=0; i<dim; i++)
	{	if (lang == lista_lingue[i]) { stringa = gl_dua[i]; break; }
	}

	document.write(stringa);
	
	return true;
}

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

/*	Funzione scrivi_footer(lang)									*/

/*	Versione del 17/06/2010											*/

/*	NB: la routine gestice soltanto l'italiano						*/

function scrivi_footer (lang)  {

	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_footer() - lingua: '" + lang + "' non supportata.");
		return false
	}
	
	copyright = new Date();
	this_year = copyright.getFullYear();
	
	if (lang == "it") document.write("Copyright &#169; 2000 - " + this_year + "  - Xavier Debanne | partita iva 09443391009 | <a href='" + gl_path + "Servizio/mappa_it.html'>Mappa del sito</a> | <a href='" + gl_path + "Servizio/informazioni_it.html'>Informazioni sul sito</a> | ");
	else 
	{ alert("Funz. scrivi_footer() - errore lingua"); return false; }
	
	return true;
}


/*	--------------- SEZIONE PERSONALIZZAZIONI PER TUTTO IL SITO -------------------------	*/

/*    --------------------------------------------------------	*/
/*	Funzione per la scrittura della richiesta del consenso		*/
/*    --------------------------------------------------------	*/

/*	scrivi_consenso () - Versione del 24-06-2010				*/

function scrivi_informativa_privacy (lang, classe) {

	if (classe == "") classe = "testo";
	document.write("<span class='" + classe + "'>Come da <a href='" + gl_path + "Servizio/informativa_privacy_" + lang + ".html'>informativa sulla privacy</a>, l'interessato dà il suo consenso al trattamento dei propri dati ai sensi dell'art.13 del D.Lgs.196/03.</span>");
	
	return true;
}

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

/*	Funzione servizio_10 (lang)			*/

function servizio_10 (lang) { 
	
	return true;
}

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