
/*	File layout_app.js									*/

/*	Versione del 27-01-2012								*/

/*	Directory: root_pug/zz1_cssjs/						*/

/*	--------------------------------------------------	*/

/*	Caricamento del CSS in funzione della larghezza della finestra	*/
/*	e del numero di colonne (2 o 3)					*/

/*	Versione del 30/06/2008 - 23/07/08 - 01/10/08 - 25/11/08		*/
/*	Versione del 28/07/2009 - 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 {

	if (gl_nome_layout.charAt(gl_nome_layout.length-1) != "_")
	alert("Warning - Layout_app.js - Variable gl_nome_layout errata. Fallimento del caricamento css probabile.");
	
//	Pezzo di codice da togliere quando tutti i menu.js chiameranno la funzione path_relativo()
//	25-11-08
//	==========================================================================================

	if (gl_path == -1)
	{	/* alert("menu.js non contiene la chiamata alla funzione path_relativo()"); */
		if (gl_livello == 0) gl_path = "";
		else
		if (gl_livello == 1) gl_path = "../";
		else
		if (gl_livello == 2) gl_path = "../../";
		else
		if (gl_livello == 3) gl_path = "../../../";
		else alert("Error - Layout_app.js - Variable gl_livello errata = " + gl_livello + ". Caricamento css fallito.");
	}
//	==========================================================================================

	gl_nome_layout_completo = "zz1_cssjs/";

	if (gl_col == 1) gl_nome_layout_completo = gl_nome_layout_completo + gl_nome_layout + "1_";
	else
	if (gl_col == 2) gl_nome_layout_completo = gl_nome_layout_completo + gl_nome_layout + "2_";
	else
	if (gl_col == 3) gl_nome_layout_completo = gl_nome_layout_completo + gl_nome_layout + "3_";
	else
	{	gl_nome_layout_completo = "";
		alert("Error - Layout_app.js - Variable gl_col errata = " + gl_col + ". Caricamento css fallito.");
	}

	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>");
 
/*	28/07/2009 - E' stato esteso a Chrome e Safari questa riga riservata a Firefox	*/
	if (tipo_browser == "mz" || tipo_browser == "cr" || tipo_browser == "sa")
	{	document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/library_firefox.css type=text/css>");
		document.write("<link rel=stylesheet href=" + gl_path + "zz1_cssjs/layout_mz_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_top(lang)							*/

/*	Versione del 24/09/2008 - 05/06/2009					*/

/*	La variabile gl_dir_banner č definita nel file menu.js	*/

function scrivi_logo_top (lang)  {
	
	retour = scrivi_logo_top_core(lang, gl_dir_banner);
	
	return retour;
}

/*	------------------------------------------------------------------------------	*/

/*	Funzione scrivi_logo_top_interno (lang, dir_banner)		*/

/*	Versione del 24/09/2008 - 05/06/2009 | 21-12-2011		*/

/*	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_top_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_top_interno() - lingua: '" + lang + "' non supportata.");
		return false;
	}
	
	if (dir_banner == "")
	{	alert("Funz. scrivi_logo_top_interno() - Variabile Directory banner (dir_banner) vuota.");
		return false;
	}
	
	if (dir_banner.indexOf("zz1_banner/") != 0)
	{	alert("Funz. scrivi_logo_top_interno() - Variabile Directory banner (dir_banner) errata.");
		alert("Funz. scrivi_logo_top_interno() - 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;
	}
	
/*	Scrittura del banner _top	*/
//	21-12-2011: inserimento del parametro "title"
	
	if (gl_use_map_top[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_top' src='" + gl_path + dir_banner + "banner_800_top_" + lang + ext + "'" + use_map + ">");
		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] + "'"; 
	}
	else if (dim_finestra == "high") 	/* 1024 x 768 */
	{	document.write("<img id='logo_top' src='" + gl_path + dir_banner + "banner_1024_top_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_top[1][1] + "," + gl_use_map_top[2][1] + "," + gl_use_map_top[3][1] + "," + gl_use_map_top[4][1] + "'"; 
	} 
	else  if (dim_finestra == "large")	/* 1280 x 800 oppure 1024 */
	{	document.write("<img id='logo_top' src='" + gl_path + dir_banner + "banner_1280_top_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_top[1][2] + "," + gl_use_map_top[2][2] + "," + gl_use_map_top[3][2] + "," + gl_use_map_top[4][2] + "'"; 
	}
	else  if (dim_finestra == "xl")		/* 1400 x 1050 */
	{	document.write("<img id='logo_top' src='" + gl_path + dir_banner + "banner_1400_top_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_top[1][3] + "," + gl_use_map_top[2][3] + "," + gl_use_map_top[3][3] + "," + gl_use_map_top[4][3] + "'"; 
	}
	else
	{	document.write("<img id='logo_top' src='" + gl_path + dir_banner + "banner_1600_top_" + lang + ext + "'" + use_map + ">");
		coordinate = coordinate + gl_use_map_top[1][4] + "," + gl_use_map_top[2][4] + "," + gl_use_map_top[3][4] + "," + gl_use_map_top[4][4] + "'"; 
	}
	
	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 + "' title='" + stringa + "' alt='" + stringa + "'" + coordinate + ">");
		document.write("</map>");
	}
	
	return true;
}

/*	++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	*/

/*	Funzione scrivi_logo_bottom(lang)

/*	Versione del 24/09/2008 | 21-12-2011					*/

/*	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	*/
//	21-12-2011: inserimento del parametro "title"
	
	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 + "' title='" + stringa + "' alt='" + stringa + "'" + coordinate + ">");
		document.write("</map>");
	}
	
	return true;
}

/*	--------------------------------------------------------------	*/
/*	Funzioni per la scrittura del footer							*/
/*	--------------------------------------------------------------	*/

/*	Funzione scrivi_dua(lang)						*/

/*	Versione del 22/05/2008 | 02-12-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; }
	}
	
/*	Ricerca del messaggio relativo al sito in costruzione 	*/

	if (lang == "it") sito_in_costruzione = "NO MORE IN USE";
	else 
	if (lang == "en") sito_in_costruzione = "NO MORE IN USE";
	
/*	stringa = sito_in_costruzione + stringa;	*/
	
	document.write(stringa);
	
	return true;
}

/*	--------------------------------------------------------------	*/

/*	Funzione scrivi_footer(lang)						*/

/*	28/04/2008: gestice soltanto it e en				*/
/*	02/07/2008: č stato aggiunto sp						*/
/*	23/01/2012: č stato aggiunto de						*/

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
	}

	if (lang == "it") document.write("Copyright &#169; 2000 - Pontificia Universit&#224; Gregoriana<br>Piazza della Pilotta, 4 - 00187 Roma");
	else 
	if (lang == "en") document.write("Copyright &#169; 2000 - Pontifical Gregorian University<br>Piazza della Pilotta, 4 - 00187 Rome (Italy)");
	else 
	if (lang == "sp") document.write("Copyright &#169; 2000 - Pontificia Universidad Gregoriana<br>Piazza della Pilotta, 4 - 00187 Roma (Italia)");
	else
	if (lang == "de") document.write("Copyright &#169; 2000 - Päpstliche Universität Gregoriana<br>Piazza della Pilotta, 4 - 00187 Rom (Italien)");
	else
	{ alert("Funz. scrivi_footer() - Footer non ancora definito per la lingua: " + lang); return false; }
	
	return true;
}





/*	--------------- SEZIONE PERSONALIZZAZIONI PER TUTTO IL SITO -------------------------	*/

/*	++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	*/

/*    ---------------------------------------------------------------------			*/
/*		Funzioni scrivi_CD_......													*/
/*    ---------------------------------------------------------------------			*/

/*	In input: 	riga: riga del box da non visualizzare								*/
/*					se vale 0 si visualizzano tutte le righe						*/
/*				lang: attualmente le lingue supportate sono: it, en, sp				*/
/*				img: l'immagine facoltativa da inserire nel box, dopo il titolo		*/
/*				altezza: altezza dell'immagine (facoltativa)						*/
/*				alt_img: il testo alternativo all'immagine (facoltativo)			*/


/*	-------------------------------------------------------------------------------------	*/

/*	Funzione scrivi_cd_gregoriana (riga_da_saltare, lang, img, altezza, alt_img)			*/

/*	Versione del 07/01/2010 | 08-10-2010 | 24-01-2011 | 23-01-2012							*/

function scrivi_cd_gregoriana (riga_da_saltare, lang, img, altezza, alt_img) {
	var dim, alt1, titolo;
	var label  = new Array();
	var dest   = new Array();
	var lingua = new Array();
	var ext    = new Array();
	var target = new Array();
	var alt2   = new Array();
	
/*	11-11-2010: Inserire qui il numero della riga che si vuole saltare		*/
	riga_da_saltare = 0;
	
	dim = 10;	/* Numero di righe del box	*/

	if (riga_da_saltare < 0 || riga_da_saltare > dim)
	{	alert("Funz. scrivi_cd_benvenuto() - riga da saltare= '" + riga_da_saltare + "' invalida.");
		return false
	}
	
	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_cd_benvenuto() - lingua: '" + lang + "' invalida.");
		return false
	}
	
/*	Personalizzazione indipendente della lingua	*/

	dest[0] = "";		
	dest[1] = "Univ/su/dichiarazione_intenti_";
	dest[2] = "Univ/su/statuta_";
	dest[3] = "Univ/su/regolamento_";
	dest[4] = "Univ/su/norme_";
	dest[5] = "Univ/su/ordo_";
	dest[6] = "Univ/su/programmi_degli_studi_";
	dest[7] = "Univ/materiale/PUG_inaugurazione_";
	dest[8] = "Univ/su/liber_annualis_";
	dest[9] = "Univ/su/processo_bologna_";
	dest[10] = "Univ/su/virtus_et_scientia_";

	
	ext[0] = "";		
	ext[1] = "php";
	ext[2] = "php";
	ext[3] = "php";
	ext[4] = "php";
	ext[5] = "php";
	ext[6] = "php";
	ext[7] = "php";
	ext[8] = "php";
	ext[9] = "php";
	ext[10] = "php";

	target[0] = "";		
	target[1] = "_self";
	target[2] = "_self";
	target[3] = "_self";
	target[4] = "_self";
	target[5] = "_self";
	target[6] = "_self";
	target[7] = "_self";
	target[8] = "_self";
	target[9] = "_self";
	target[10] = "_self";

/*	Personalizzazione dipendente della lingua	*/

	if (lang == "it")
	{	titolo = "La Gregoriana";
		alt1   = "Segue un testo cliccabile";
		
		label[0] = "";	
		label[1] = "Dichiarazione d´intenti";
		label[2] = "<em>Statuta</em>";
		label[3] = "Regolamento";
		label[4] = "Norme";
		label[5] = "<em>Ordo anni academici</em>";
		label[6] = "Programmi degli Studi";
		label[7] = "Inaugurazione Anno Accademico";
		label[8] = "<em>Liber Annualis</em>";
		label[9] = "Processo di Bologna";
		label[10] = "Brochure <em>Virtus et scientia</em>";
		
		lingua[0] = "";
		lingua[1] = "it";
		lingua[2] = "it";
		lingua[3] = "it";
		lingua[4] = "it";
		lingua[5] = "it";
		lingua[6] = "it";
		lingua[7] = "it";
		lingua[8] = "it";
		lingua[9] = "it";
		lingua[10] = "it";
		
		alt2[0] = "";
		alt2[1] = "Per consultare la Dichiarazione d´intenti";
		alt2[2] = "Per consultare le Statuta";
		alt2[3] = "Per consultare il Regolamento";
		alt2[4] = "Per consultare le Norme";
		alt2[5] = "Per consultare l&#039;<em>Ordo anni academici</em>";
		alt2[6] = "Per consultare i Programmi degli Studi";
		alt2[7] = "Per consultare la pubblicazione";
		alt2[8] = "Per consultare i Liber Annualis";
		alt2[9] = "Per consultare le informazioni relative al Processo di Bologna";
		alt2[10] = "Per consultare la brochure &#039;Virtus et scientia&#039;";
	}
	else
	if (lang == "en")
	{	titolo = "The University";
		alt1 = "Information follows";
		
		label[0] = "";	
		label[1] = "Mission Statement";
		label[2] = "<em>Statuta</em>";
		label[3] = "General Rules";
		label[4] = "Norms";
		label[5] = "<em>Ordo anni academici</em>";
		label[6] = "Academic Programs";
		label[7] = "Academic Year Inauguration";
		label[8] = "<em>Liber Annualis</em>";
		label[9] = "Bologna Process";
		label[10] = "<em>Virtus et scientia</em> Brochure";
		
		lingua[0] = "";
		lingua[1] = "en";
		lingua[2] = "en";
		lingua[3] = "en";
		lingua[4] = "en";
		lingua[5] = "en";
		lingua[6] = "en";
		lingua[7] = "en";
		lingua[8] = "en";
		lingua[9] = "en";
		lingua[10] = "en";
		
		alt2[0] = "";
		alt2[1] = "To consult the Mission Statement document";
		alt2[2] = "To consult the Statuta document";
		alt2[3] = "To consult the General Rules documents";
		alt2[4] = "To consult the Norms";
		alt2[5] = "To consult the Ordo anni academici</em> document";
		alt2[6] = "To consult the Academic Programs";
		alt2[7] = "To consult the document";
		alt2[8] = "To consult the Liber Annualis</em> documents";
		alt2[9] = "To consult Bologna Process information";
		alt2[10] = "To consult the &#039;Virtus et scientia&#039; brochure";
		
	}
	else
	if (lang == "sp")
	{	titolo = "La Gregoriana";
		alt1   = "Sigue un texto cliccabile";
		
		label[0] = "";	
		label[1] = "Dichiarazione d´intenti";
		label[2] = "<em>Statuta</em>";
		label[3] = "Regolamento";
		label[4] = "Normas";
		label[5] = "<em>Ordo anni academici</em>";
		label[6] = "Programas de estudio";
		label[7] = "Inaugurazione Anno Accademico";
		label[8] = "<em>Liber Annualis</em>";
		label[9] = "Processo di Bologna";
		label[10] = "Brochure <em>Virtus et scientia</em>";
		
		lingua[0] = "";
		lingua[1] = "it";
		lingua[2] = "it";
		lingua[3] = "it";
		lingua[4] = "it";
		lingua[5] = "it";
		lingua[6] = "it";
		lingua[7] = "it";
		lingua[8] = "it";
		lingua[9] = "it";
		lingua[10] = "it";
		
		alt2[0] = "";
		alt2[1] = "Vaya a la página";
		alt2[2] = "Vaya a la página";
		alt2[3] = "Vaya a la página";
		alt2[4] = "Vaya a la página";
		alt2[5] = "Vaya a la página";
		alt2[6] = "Vaya a la página";
		alt2[7] = "Vaya a la página";
		alt2[8] = "Vaya a la página";
		alt2[9] = "Vaya a la página";
		alt2[10] = "Vaya a la página";
	}
	else
	if (lang == "de")
	{	titolo = "Die Universität";
		alt1   = "Text wird geladen";
		
		label[0] = "";	
		label[1] = "Leitlinien";
		label[2] = "<em>Statuta</em>";
		label[3] = "Grundordnung";
		label[4] = "Vorschriften";
		label[5] = "<em>Ordo anni academici</em>";
		label[6] = "Studienprogramme";
		label[7] = "Eröffnung des akademischen Jahres";
		label[8] = "<em>Liber Annualis</em>";
		label[9] = "Bologna-Prozess";
		label[10] = "Broschüre <em>Virtus et scientia</em>";
		
		lingua[0] = "";
		lingua[1] = "en";
		lingua[2] = "en";
		lingua[3] = "en";
		lingua[4] = "en";
		lingua[5] = "en";
		lingua[6] = "en";
		lingua[7] = "en";
		lingua[8] = "en";
		lingua[9] = "en";
		lingua[10] = "en";
		
		alt2[0] = "";
		alt2[1] = "Webseite aufrufen";
		alt2[2] = "Webseite aufrufen";
		alt2[3] = "Webseite aufrufen";
		alt2[4] = "Webseite aufrufen";
		alt2[5] = "Webseite aufrufen";
		alt2[6] = "Webseite aufrufen";
		alt2[7] = "Webseite aufrufen";
		alt2[8] = "Webseite aufrufen";
		alt2[9] = "Webseite aufrufen";
		alt2[10] = "Webseite aufrufen";
	}
	
/*	Scrittura del box CD Gregoriana	*/

	scrivi_cd_open_box(titolo);
	
	if (img != undefined) 
	{	if (altezza == undefined)
		{	alert("Funzione scrivi_cd_benvenuto() - L'altezza dell'immagine non č definita.");
			return false;
		}
		if (alt_img == undefined)
		{	alert("Funzione scrivi_cd_benvenuto() - Il testo alternativo dell'immagine non č definito.");
			return false;
		}
		scrivi_cd_img_box (img, altezza, alt_img);		/* Immagine nel box */
	}
	
	for (i=1; i<=dim; i++) 
	{	if (i != riga_da_saltare) scrivi_cd_riga_box (i, alt1, label[i], dest[i], lingua[i], ext[i], target[i], alt2[i]);
	}

	scrivi_cd_close_box();

	return true;
}

/*	-------------------------------------------------------------------------------------	*/

/*	Funzione scrivi_cd_notizie_storiche (riga_da_saltare, lang, img, altezza, alt_img)		*/

/*	Versione del 09/01/2010																	*/

function scrivi_cd_notizie_storiche (riga_da_saltare, lang, img, altezza, alt_img) {
	var dim, alt1, titolo;
	var label  = new Array();
	var dest   = new Array();
	var lingua = new Array();
	var ext    = new Array();
	var target = new Array();
	var alt2   = new Array();
	
	dim = 3;	/* Numero di righe del box	*/

	if (riga_da_saltare < 0 || riga_da_saltare > dim)
	{	alert("Funz. scrivi_cd_benvenuto() - riga da saltare= '" + riga_da_saltare + "' invalida.");
		return false
	}
	
	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_cd_benvenuto() - lingua: '" + lang + "' invalida.");
		return false
	}
	
/*	Personalizzazione indipendente della lingua	*/

	dest[0] = "";		
	dest[1] = "Univ/ns/storia_universita_";
	dest[2] = "Univ/ns/studenti_illustri_";
	dest[3] = "Univ/ns/elenco_rettori_";
	
	ext[0] = "";		
	ext[1] = "php";
	ext[2] = "php";
	ext[3] = "php";

	target[0] = "";		
	target[1] = "_self";
	target[2] = "_self";
	target[3] = "_self";

/*	Personalizzazione dipendente della lingua	*/

	if (lang == "it")
	{	titolo = "Notizie storiche";
		alt1   = "Segue un testo cliccabile";
		
		label[0] = "";	
		label[1] = "Cenni storici";
		label[2] = "Studenti illustri";
		label[3] = "Magnifici Rettori dell´Universitŕ";
		
		lingua[0] = "";
		lingua[1] = "it";
		lingua[2] = "it";
		lingua[3] = "it";
		
		alt2[0] = "";
		alt2[1] = "Per consultare i cenni storici";
		alt2[2] = "Per consultare la lista degli Studenti illustri";
		alt2[3] = "Per consultare l´elenco dei Magnifici Rettori";
	}
	else
	if (lang == "en")
	{	titolo = "University History";
		alt1 = "Information follows";
		
		label[0] = "";	
		label[1] = "Historical Notes";
		label[2] = "Prominent Alumni";
		label[3] = "Rectors of the University";
		
		lingua[0] = "";
		lingua[1] = "en";
		lingua[2] = "en";
		lingua[3] = "en";
		
		alt2[0] = "";
		alt2[1] = "To consult the Historical Notes";
		alt2[2] = "To consult the Prominent Alumni list";
		alt2[3] = "To consult the Rectors list";
	}
	else
	if (lang == "sp")
	{	titolo = "Notizie storiche";
		alt1   = "Sigue un texto cliccabile";
		
		label[0] = "";	
		label[1] = "Historia de la Universidad";
		label[2] = "Estudiantes ilustres";
		label[3] = "Magnifici Rettori dell´Universitŕ";
		
		lingua[0] = "";
		lingua[1] = "it";
		lingua[2] = "it";
		lingua[3] = "it";
		
		alt2[0] = "";
		alt2[1] = "Vaya a la página";
		alt2[2] = "Vaya a la página";
		alt2[3] = "Vaya a la página";
	}
	
/*	Scrittura del box CD Notizie storiche	*/

	scrivi_cd_open_box(titolo);
	
	if (img != undefined) 
	{	if (altezza == undefined)
		{	alert("Funzione scrivi_cd_benvenuto() - L'altezza dell'immagine non č definita.");
			return false;
		}
		if (alt_img == undefined)
		{	alert("Funzione scrivi_cd_benvenuto() - Il testo alternativo dell'immagine non č definito.");
			return false;
		}
		scrivi_cd_img_box (img, altezza, alt_img);		/* Immagine nel box */
	}
	
	for (i=1; i<=dim; i++) 
	{	if (i != riga_da_saltare) scrivi_cd_riga_box (i, alt1, label[i], dest[i], lingua[i], ext[i], target[i], alt2[i]);
	}

	scrivi_cd_close_box();

	return true;
}

/*	-------------------------------------------------------------------------------------	*/

/*	Funzione scrivi_cd_informazioni_pratiche (riga_da_saltare, lang, img, altezza, alt_img)	*/

/*	Versione del 13/09/2011																	*/

function scrivi_cd_informazioni_pratiche (riga_da_saltare, lang, img, altezza, alt_img) {
	var dim, alt1, titolo;
	var label  = new Array();
	var dest   = new Array();
	var lingua = new Array();
	var ext    = new Array();
	var target = new Array();
	var alt2   = new Array();
	
	dim = 5;	/* Numero di righe del box	*/

	if (riga_da_saltare < 0 || riga_da_saltare > dim)
	{	alert("Funz. scrivi_cd_benvenuto() - riga da saltare= '" + riga_da_saltare + "' invalida.");
		return false
	}
	
	if (lang != "it" && lang != "en" && lang != "fr" && lang != "sp" && lang != "pt" && lang != "de")
	{	alert("Funz. scrivi_cd_benvenuto() - lingua: '" + lang + "' invalida.");
		return false
	}
	
/*	Personalizzazioni indipendenti della lingua	*/

	dest[0] = "";		
	dest[1] = "Univ/ip/dove_siamo_v3_";
	dest[2] = "Univ/ip/luoghi_Universita_";
	dest[3] = "Univ/ip/benvenuto_gregoriana_";
	dest[4] = "Studenti/fmw/framework_";
	dest[5] = "Univ/ip/siti_utili_";
	
	ext[0] = "";		
	ext[1] = "php";
	ext[2] = "php";
	ext[3] = "php";
	ext[4] = "php?adg_utente=unknown&adg_pgm=305";
	ext[5] = "php";

	target[0] = "";		
	target[1] = "_self";
	target[2] = "_self";
	target[3] = "_self";
	target[4] = "_self";
	target[5] = "_self";

/*	Personalizzazioni che dipendono della lingua	*/

	if (lang == "it")
	{	titolo = "Informazioni pratiche";
		alt1   = "Segue un testo cliccabile";
		
		label[0] = "";	
		label[1] = "Come raggiungerci";
		label[2] = "I luoghi dell´Universitŕ";
		label[3] = "Benvenuto in Gregoriana";
		label[4] = "Ricerca Collegi";
		label[5] = "Siti utili";
		
		lingua[0] = "";
		lingua[1] = "it";
		lingua[2] = "it";
		lingua[3] = "it";
		lingua[4] = "it";
		lingua[5] = "it";
		
		alt2[0] = "";
		alt2[1] = "Per consultare i cenni storici";
		alt2[2] = "Per consultare la lista degli Studenti illustri";
		alt2[3] = "Per consultare l´elenco dei Magnifici Rettori";
		alt2[4] = "Per svolgere una ricerca nell´archivio dei Collegi";
		alt2[5] = "Per consultare la sitografia";
	}
	else
	if (lang == "en")
	{	titolo = "Practical Information";
		alt1 = "Information follows";
		
		label[0] = "";	
		label[1] = "How to reach us";
		label[2] = "University Places";
		label[3] = "Welcome in Gregoriana";
		label[4] = "Colleges Search";
		label[5] = "Useful Links";
		
		lingua[0] = "";
		lingua[1] = "en";
		lingua[2] = "en";
		lingua[3] = "en";
		lingua[4] = "en";
		lingua[5] = "en";
		
		alt2[0] = "";
		alt2[1] = "To consult the Historical Notes";
		alt2[2] = "To consult the Prominent Alumni list";
		alt2[3] = "To consult the Rectors list";
		alt2[4] = "To search on Colleges Database";
		alt2[5] = "To consult the useful links";
	}
	else
	if (lang == "sp")
	{	titolo = "Informazioni pratiche";
		alt1   = "Sigue un texto cliccabile";
		
		label[0] = "";	
		label[1] = "Ubicación en Roma";
		label[2] = "Plano general de la Universidad";
		label[3] = "Benvenuto in Gregoriana";
		label[4] = "Ricerca Collegi";
		label[5] = "Siti utili";
		
		lingua[0] = "";
		lingua[1] = "it";
		lingua[2] = "it";
		lingua[3] = "it";
		lingua[4] = "it";
		lingua[5] = "it";
		
		alt2[0] = "";
		alt2[1] = "Vaya a la página";
		alt2[2] = "Vaya a la página";
		alt2[3] = "Vaya a la página";
		alt2[4] = "Vaya a la página";
		alt2[5] = "Vaya a la página";
	}
	
/*	Scrittura del box CD Informazioni pratiche	*/

	scrivi_cd_open_box(titolo);
	
	if (img != undefined) 
	{	if (altezza == undefined)
		{	alert("Funzione scrivi_cd_benvenuto() - L'altezza dell'immagine non č definita.");
			return false;
		}
		if (alt_img == undefined)
		{	alert("Funzione scrivi_cd_benvenuto() - Il testo alternativo dell'immagine non č definito.");
			return false;
		}
		scrivi_cd_img_box (img, altezza, alt_img);		/* Immagine nel box */
	}
	
	for (i=1; i<=dim; i++) 
	{	if (i != riga_da_saltare) scrivi_cd_riga_box (i, alt1, label[i], dest[i], lingua[i], ext[i], target[i], alt2[i]);
	}

	scrivi_cd_close_box();

	return true;
}

/*	-------------------------------------------------------------------------------------	*/

/*			+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++		*/
/*			Routine di servizio per la gestione dei box nella colonna di destra		*/
/*			+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++		*/

/*	Funzione scrivi_cd_open_box (titolo) - Versione del 0/07/2008 | 08-01-2010		*/

/*	La funzione scrive il titolo del box							*/

/*	NB: Utilizza la classe "td.cd_titolo_box", specifico dei box	*/

function scrivi_cd_open_box (titolo) {
	document.write("<table class='more_info' style='border: 1px solid rgb(124,148,172);'>");
	document.write("<tr class='testo_bl'><td class='cd_titolo_box' colspan='2'>" + titolo + "</td></tr>");
	return true;
}

/*	-------------------------------------------------------------------------------------	*/

/*	Funzione scrivi_cd_img_box (img, alt_img) - Versione del 11/07/2008			*/

/*	La funzione scrive l'immagine nel box										*/

function scrivi_cd_img_box (img, altezza, alt_img) {
	var sorgente;
	
	sorgente = gl_path + "zz1_images/cd/" + img;
	
	document.write("<tr class='testo'>");
	
	document.write("<td class='padding_no' colspan='2'>");
	
	document.write("<img class='std' src='" + sorgente + "'width='148' height='" + altezza + "' alt='" + alt_img + "' title='" + alt_img + "'>");
							
	document.write("</td></tr>");
			
	return true;
}

/*	---------------------------------------------------------------------------------------------	*/

/*	Funzione scrivi_cd_riga_box (riga, alt1, label, dest, lingua, ext, target, alt2, nome, numero)	*/

/*	Versione del 13/01/2010 | 23-01-2012															*/

/*	In input:	riga: numero della riga; serve unicamente per i messaggi di errore		*/
/*			alt1: testo alt/title per la prima icona									*/
/*			label: testo																*/
/*			dest: destinazione, senza la lingua, senza l'extension						*/
/*			lingua: lingua della destinazione											*/
/*			ext: extension della destinazione											*/
/*			target { "_self", "_blank" }												*/
/*			alt2: testo alt/title per la seconda icona									*/
/*			nome: nome della seconda icona [stringa] (facoltativo)						*/
/*			numero: numero della seconda icona [stringa] (facoltativo)					*/

/*	NB: Utilizza le classi "td.cd_riga_left" e "td.cd_riga_right"						*/


function scrivi_cd_riga_box (riga, alt1, label, dest, lingua, ext, target, alt2, nome, numero) {
	var $link, destinazione, nome_icona, numero_icona, retour;
	
	if (lingua != "it" && lingua != "en" && lingua != "fr" && lingua != "sp" && lingua != "pt" && lingua != "de")
	{	alert("Funz. scrivi_cd_riga_box() - lingua: '" + lingua + "' invalida.");
		return false
	}
	
	$link = dest + lingua + "." + ext;
	
	destinazione = gl_path + $link;
	
	if (target != "_self" && target != "_blank")
	{	alert("Errore generazione box CD nella riga " + riga + " a causa del parametro target: " + target);
		return false;
	}
	
	if (nome != undefined)
	{	nome_icona = nome;
		if (numero == undefined)
		{	alert("Errore generazione box CD nella riga " + riga + " a causa dei parametri nome/numero: " + nome + "/" + numero);
			return false;
		}
		numero_icona = numero;
	}
	
	document.write("<tr class='testo'><td class='cd_riga_left'>");
	retour = scrivi_icona ("bullet", "2", alt1);
	
	$pagina_web = fichier();
	$link = find_fichier($link);
	
/*	Versione old con icona dopo il testo	*/
/*	------------------------------------	*/

/*	nome_icona   = "forward";	*/
/*	numero_icona = "3";	*/
/*	document.write("</td><td class='cd_riga_right'>" + label + "<span class='link_pagina'><a href='" + destinazione + "' target='" + target + "'>"); */
/*	retour = scrivi_icona (nome_icona, numero_icona, alt2); */
/*	document.write("</a></td></tr>");	*/
	
/*	Versione con testo cliccabile	*/
/*	-----------------------------	*/

	document.write("</td><td class='cd_riga_right'>");
	
	if ($link != $pagina_web)
	{	document.write("<span class='cd_link_pagina'>");
		document.write("<a href='" + destinazione + "' target='" + target + "' title='" + alt2 + "'>" + label + "</a>");
	}
	else
		document.write("<span class='cd_link_activelink'>" + label);
	
	document.write("</span></td></tr>");

	return true;
}

/*	-------------------------------------------------------------------------------------	*/

/*	Funzione scrivi_cd_close_box () - Versione del 03/07/2008						*/


function scrivi_cd_close_box () {
	document.write("</table>");
	return true;
}

/*	------------------------------------------------------	*/

/*	Versione 04-06-2011: nuova versione Google Analytics	*/

/*	Funzione servizio_10 (lang)			*/

function servizio_10 (lang) {
	
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-8846198-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();	

	return true;
}

/*	-------------------------------------------------------------------------------------	*/

/*	--------------------------------------------------------	*/
/*	Funzione per la scrittura della richiesta del consenso		*/
/*	--------------------------------------------------------	*/

/*	Versione del 27-01-2012				*/

function scrivi_informativa_privacy (lang, classe) {

	if (classe == "") classe = "testo";
	
	if (lang == "it")
		document.write("<span class='" + classe + "'>Come da <a href='" + gl_path + "sito/sito_2/informativa_privacy_it.php'>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>");
	else
	if (lang == "fr")
		document.write("<span class='" + classe + "'>Conformément ŕ la Charte de confidentialité, vous autorisez le traitement des informations vous concernant selon l'article 13 de la loi D.Lgs 196/03.</span>");	
	else
	if (lang == "de")
		document.write("<span class='" + classe + "'>Entsprechend den <a href='" + gl_path + "sito/sito_2/informativa_privacy_en.php'>Bestimmungen zum Schutz der Privatsphäre</a> gibt der Absender seine Zustimmung zur Nutzung seiner Daten, wie es nach Art. 13 des D.Lgs.196/03 italienischen Rechts vorgesehen ist.</span>");
	
	
	else
		document.write("<span class='" + classe + "'>According to the <a href='" + gl_path + "sito/sito_2/informativa_privacy_en.php'>Privacy Policy</a>, the data subject consents to the treatment of its personal data according to the Italian law art. 13 of the D.Lgs.196/03.</span>");
	
	return true;
}

/*	------------------------------------------------------------------------------		*/

/*	Funzione scrivi_logo_top_uv (lang)													*/

/*	Versione del 26-07-2011									*/

/*	Questa funzione serve per caricare il banner "top" in funzione della variabile $ud	*/

/*	In input: $lang [stringa], $ud [numerico] (codice dell'Ufficio Virtuale)			*/

function scrivi_logo_top_uv ($lang, $ud)  {
	
	$dir_banner = "zz1_banner/";
	$dir = "";
	
	switch ($ud)
	{	case -1:
		case 999:	$dir = "standard/";
					break;
						
		case 1:		$dir = "filosofia/";
					break;
					
		case 2:		$dir = "teologia/";
					break;
					
		case 3:		$dir = "dc/";
					break;
					
		case 15:	$dir = "storia/";
					break;
					
		case 5:		$dir = "missiologia/";
					break;
					
		case 6:		$dir = "ss/";
					break;
					
					
					
		case 7:		$dir = "spiritualita/";
					break;
					
		case 9:		$dir = "psicologia/";
					break;
					
		case 13:	$dir = "ISIRC/";
					break;
					
					
					
		case 10:	$dir = "CICS/";
					break;
					
		case 12:	$dir = "CIFS/";
					break;
					
		case 17:	$dir = "laikos/";
					break;
					
		case 18:	$dir = "JudaicStudies/";
					break;
					
		case 19:	$dir = "CFC/";
					break;
						
		default:	alert("scrivi_logo_top_uv() - UD invalido = '" + $ud + "' ");
					$dir = "standard/";
	}
	
	$dir_banner = $dir_banner + $dir;
	retour = scrivi_logo_top_core($lang, $dir_banner);

	return 0;
}

/*	------------------------------------------------------------------------------	*/


