// JavaScript Document
Lall_i = new Array ('', 'Azienda', 'Lavorazione', 'Prodotti', 'Realizzazioni', 'Rete vendita', 'Press');
Lall_f = new Array ('', 'Enterprise', 'Travail', 'Produits', 'Réalisations', 'Réseau vente', 'Presse');
Lall_e = new Array ('', 'Company', 'Manufacturing', 'Products', 'Realizations', 'Sale network', 'Press');

Lazi_i = new Array ('Profilo', 'Storia', 'Contatti', 'Dove siamo', 'Offerte di lavoro');
Lazi_f = new Array ('Profil', 'Histoire', 'Contactez-Nous', 'Rejoindre IL FANALE Group', 'Carrières');
Lazi_e = new Array ('Profile', 'History', 'Contacts', 'Where We Are', 'Job Opportunities');

Llav_i = new Array ('Progettazione', 'Produzione');
Llav_f = new Array ('Le projet', 'La Production');
Llav_e = new Array ('The Planning', 'The Production');

Lpro_i = new Array ('Richiesta informazioni', 'Download catalogo');
Lpro_f = new Array ('Demandée renseignements', 'Download catalogue');
Lpro_e = new Array ('Request for information', 'Download catalog');

Lpres_i = new Array ('Comunicati stampa', 'Rassegna stampa', 'News', 'SCARICA LA CARTELLA STAMPA', 'Contatti stampa:');
Lpres_f = new Array ('Communiqué de presse', 'Revue de presse', 'Nouvelles', 'TELECHARGEMENT DOSSIER DE PRESSE', 'Contact presse:');
Lpres_e = new Array ('Press relaease', 'Press Survey', 'News', 'DOWNLOAD PRESS FOLDER', 'Press Contacts:');

Lcomu_i = new Array ('Comunicati stampa', 'Rassegna stampa', 'News');
Lcomu_f = new Array ('Communiqué de presse', 'Revue de presse', 'Nouvelles');
Lcomu_e = new Array ('Press relaease', 'Press Survey', 'News');


Lxxx_i = new Array ('', '', '');
Lxxx_f = new Array ('', '', '');
Lxxx_e = new Array ('', '', '');


Lrice_i = new Array('Collezione', 'Tipologia', 'Codice Articolo', 'Vetro trasparente', 'Vetro bianco', 'Senza vetro', 'LEGENDA MATERIALI', 'Ottone', 'Ferro', 'Rame', 'Vetro', 'Ceramica');
Lrice_f = new Array ('Collection', 'Typologie', 'Article Code', 'Verre transparent', 'Verre blanc', 'Sans verre', 'LÉGENDE MATÉRIELS', 'Laiton', 'Fer', 'Cuivre', 'Verre', 'Céramique'); 
Lrice_e = new Array ('Collection', 'Typology', 'Article Code', 'Transparent glass', 'White glass', 'No glass', 'COMPONENT CODING', 'Brass', 'Iron', 'Copper', 'Glass', 'Backed Clay');

/*
Ltipolo_i = new Array('', 'Bilanciere', 'Faretto', 'Incasso', 'Lampione', 'Paletti', 'Parete', 'Saliscendi', 'Soffitto', 'Soffitto/Paletto', 'Sospensione');
Ltipolo_f = new Array('', 'Balancier', 'Projecteur', 'Recette', 'Réverbère', 'Pieux', 'Mur', 'Tourniquet', 'Plafond', 'Plafond/Pieu', 'Suspension');
Ltipolo_e = new Array('', 'Balance-wheel', 'Spot-light', 'Collection', 'Lamp-post', 'Stakes', 'Wall', 'Latch', 'Ceiling', 'Ceiling/Stake', 'Suspension');

Lubica_i = new Array('', 'Interno', 'Esterno', 'Giardini', 'Arredo Urbano');
Lubica_f = new Array('', 'Intérieur', 'Extérieur', 'Jardins', 'Meubles de rue');
Lubica_e = new Array('', 'Internal', 'External', 'Gardens', 'Street furniture');
*/

Prodo_i = new Array('Nessun Prodotto', 'Prodotto', 'Prodotti');
Prodo_f = new Array('Aucun Produit', 'Produit', 'Produits');
Prodo_e = new Array('No Product', 'Product', 'Products');

Lmsg_i = new Array ('Tutte', '1^parte', '2^ parte');
Lmsg_f = new Array ('Toutes', '1^partie', '2^ partie'); 
Lmsg_e = new Array ('All', '1^part', '2^ part');

var Lmsg = '';
var pagi = ''; /* pagina corrente*/
var lang = ''; /* lingua corretnte*/
var primav = 1;
var Label_i = '';
var Label_f = '';
var Label_e = '';
var id_refr = '';

/*
az  -->  azienda		co  -->  comunicati		es  -->  esterno		gr  -->  giardino		
ho  -->  home			in  -->  interno		la  -->  lavorazione	nw  -->  news		
ss  -->  press			pr  -->  prodotti		co  -->  rassegna		re  -->  realizzazioni		
rv  -->  rete vendita	ri  -->  ricerca		ur  -->  urbano
*/

function predi(a)
	{if(document.getElementById) {
	pagi = a;
	if ((a == 'ho')||(a == 'rv')||(a == 'in')||(a == 'il')||(a == 'es')||(a == 'gr')||(a == 'ur')||(a == 're')) {
	Label_i = Lall_i;
	Label_f = Lall_f;
	Label_e = Lall_e;
	} else if (a == 'az') {
	Label_i = Lall_i.concat(Lazi_i);
	Label_f = Lall_f.concat(Lazi_f);
	Label_e = Lall_e.concat(Lazi_e);
	} else if (a == 'la') {
	Label_i = Lall_i.concat(Llav_i);
	Label_f = Lall_f.concat(Llav_f);
	Label_e = Lall_e.concat(Llav_e);
	} else if (a == 'pr') {
	Label_i = Lall_i.concat(Lpro_i);
	Label_f = Lall_f.concat(Lpro_f);
	Label_e = Lall_e.concat(Lpro_e);
	} else if (a == 'ri') {
	Label_i = Lall_i.concat(Lrice_i);
	Label_f = Lall_f.concat(Lrice_f);
	Label_e = Lall_e.concat(Lrice_e);
	} else if (a == 'ss') {
	Label_i = Lall_i.concat(Lpres_i);
	Label_f = Lall_f.concat(Lpres_f);
	Label_e = Lall_e.concat(Lpres_e);
	} else if (a == 'co') {
	Label_i = Lall_i.concat(Lcomu_i);
	Label_f = Lall_f.concat(Lcomu_f);
	Label_e = Lall_e.concat(Lcomu_e);
	} else if (a == 'nw') {
	Label_i = Lall_i.concat(Lcomu_i);
	Label_f = Lall_f.concat(Lcomu_f);
	Label_e = Lall_e.concat(Lcomu_e);
	} 
	}}


function pref_ml()
	{
  	if(CookieRead('IlFanaleL')) {
	var b = CookieRead('IlFanaleL');
		//alert('cacca '+b);
	mulg(b);
	} else {
	if ((lang)&&(lang != '')) {mulg(lang);} else {mulg('i');}
	}}

function mulg(a)
	{if(document.getElementById) {
	lang = a;
	CookieSet ('IlFanaleL',a,36);
		eval('Lmsg = Lmsg_'+a);
	//alert('stop');
	if (pagi != "ri") {eval("mxnosi('testo_i','0','testo_e','0','testo_f','0','testo_"+a+"','1')");}
	//if ((pagi != "ri")&&(pagi != "ss")) {eval("mxnosi('testo_i','0','testo_e','0','testo_f','0','testo_"+a+"','1')");}
	if (pagi == "az") {eval("mxnosi('pro_"+a+"','1','sto_"+a+"','0','con_"+a+"','0','dov_"+a+"','0','ola_"+a+"','0')");}
	else if (pagi == "nw") {
		for ( w=1; w<(tot_new+1); w++ )	
		{eval("mxnosi('new_"+w+"_i','0','new_"+w+"_e','0','new_"+w+"_f','0','new_"+w+"_"+a+"','1')");}
		}
	else if (pagi == "ho") {
		eval("mxnosi('hp_1_i','0','hp_1_e','0','hp_1_f','0','hp_1_"+a+"','1')");
		pausa(10);
		eval("mxnosi('hp_2_i','0','hp_2_e','0','hp_2_f','0','hp_2_"+a+"','1')");
		pausa(10);
		eval("mxnosi('hp_3_i','0','hp_3_e','0','hp_3_f','0','hp_3_"+a+"','1')");
		pausa(10);
		eval("mxnosi('hp_4_i','0','hp_4_e','0','hp_4_f','0','hp_4_"+a+"','1')");
		pausa(10);
		eval("mxnosi('hp_5_i','0','hp_5_e','0','hp_5_f','0','hp_5_"+a+"','1')");
		pausa(10);
		}
	else if (pagi == "rv") {
		eval("document.getElementById('iagenti').src='inclup/agenti.php?cty=8&lang="+lang+"'");
		pausa(10);
		azzerac('e');
		azzerac('a');
		azzerac('o');
		eval("mxnosi('ctry_ei','0','ctry_ee','0','ctry_ef','0','ctry_e"+a+"','1')");
		pausa(10);
		eval("mxnosi('ctry_ai','0','ctry_ae','0','ctry_af','0','ctry_a"+a+"','1')");
		pausa(10);
		eval("mxnosi('ctry_oi','0','ctry_oe','0','ctry_of','0','ctry_o"+a+"','1')");
		pausa(10);
		}
	else if (pagi == "la") {eval("mxnosi('pro_"+a+"','1','uzi_"+a+"','0')");}
	if (a=='f'){hdlg('e','English','i','Italiano');}
	else if (a=='e') {hdlg('f','Fran&ccedil;ais','i','Italiano');}
	else {hdlg('e','English','f','Fran&ccedil;ais');}
	
	for ( i=0; i<Label_i.length; i++ )  /* etichette testata   */ 
	{
	var ii = '';
	//var aa = '';
	if (i<10) {ii = 'L0'+i;} else {ii = 'L'+i;}
	//aa = 'Lall_'+a;
	if (i>0) {eval('document.getElementById("'+ii+'").innerHTML = Label_'+a+'["'+i+'"]');}
	}
	if (pagi=='ri'){ /* impostazione iniziale delle tendine */
	azzera();
	}
	}}
	
function vcapi(a)
	{if(document.getElementById) {
		if (pagi == "az") {eval("mxnosi('pro_"+lang+"','0','sto_"+lang+"','0','con_"+lang+"','0','dov_"+lang+"','0','ola_"+lang+"','0')");}
		if (pagi == "la") {eval("mxnosi('pro_"+lang+"','0','uzi_"+lang+"','0')");}
		eval("mxnosi('"+a+"_"+lang+"','1')");
	}}

function azzera()
	{if(document.getElementById) {
	setTimeout('inizio()',200);
	setTimeout('menu_1A()',200);
	document.getElementById('c_codB').length = 0;
	document.getElementById('c_codB').options[0] = new Option(Lmsg[2],'0');
	setTimeout("mxnosi('corpo','0','iinfo','0','ilista','0')",200);
	}}


function hdlg(a,b,c,d)  /* testata clingue con links */
	{if(document.getElementById) {
	document.getElementById('L98').innerHTML='<a href="#" onClick="mulg(\''+a+'\');">'+b+' </a>'; 
	document.getElementById('L99').innerHTML='<a href="#" onClick="mulg(\''+c+'\');"> '+d+'</a>';
	}}
	
var CookiesAcc = false;
if(document.cookie == '') {
    document.cookie = 'CookiesAcc=yes';
    if(document.cookie.indexOf('CookiesAcc=yes') != -1) {
	CookiesAcc = true; 
    }
} else {
  CookiesAcc = true;
}
	
function CookieSet (name, value, hours, path, domain, secure) {
    if (CookiesAcc) {
	var not_NN2 = (navigator && navigator.appName 
		       && (navigator.appName == 'Netscape') 
		       && navigator.appVersion 
		       && (parseInt(navigator.appVersion) == 2))?false:true;

	if(hours && not_NN2) { 
	    if ( (typeof(hours) == 'string') && Date.parse(hours) ) { 
		var numHours = hours;
	    } else if (typeof(hours) == 'number') { 
		var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();
	    }
	}
	document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':''); 
    } else {
	//cookie_acc();	
	mxnosi('no_cookie','1','accesso','0');
	}
} 

function CookieRead(name) {
    if(document.cookie == '') {
	return false; 
    } else { 
	var CharA, CharZ;
	var CookieTot = document.cookie;
	CharA = CookieTot.indexOf(name);	
	var NN2Hack = CharA + name.length;
	if((CharA != -1) && (CookieTot.charAt(NN2Hack) == '=')) {
	    CharA += name.length + 1;
	    CharZ = CookieTot.indexOf(';', CharA);
	    if(CharZ == -1) CharZ = CookieTot.length;
	    return unescape(CookieTot.substring(CharA, CharZ));
	} else { 
	    return false;
	}
    }	
}


