var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var IE4up = (bName == "Microsoft Internet Explorer" && bVer < 4.5);
var IE5 = (bName == "Microsoft Internet Explorer" && bVer >=5);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);

var NS4=document.layers;
var IE4=document.all;
var V5 =navigator.appVersion;
var V4 =navigator.appVersion;

var isV5 = (V5.indexOf("MSIE 5.0") != -1)


function Nsversion (){
 if (NS3||NS4)(topY =100)
 else if (IE3||IE4)(topY =100);
}


Nsversion ();


stepY= 20;

menu = new Array ()
menu[0]="azienda";
menu[1]="suggerimenti";
//menu[1]="Certificazione";
//menu[2]="Partners";
//menu[3]="Prodotti";
//menu[4]="Servizi";
//menu[5]="Software";




//LAYER SWITCHING CODE

     if (NS4 || IE4) {
        if (navigator.appName == "Netscape") {
                                layerStyleRef="layer.";
                                layerRef="document.layers";
                                styleSwitch=""; layerDoc=".document."
        }else{
                                layerStyleRef="layer.style.";
                                layerRef="document.all";
                                styleSwitch=".style"; layerDoc="."
                        }
                }
        

   function showLayer(layerName){
        if (NS4 || IE4) {
                eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
                }       
        }
        
   function hideLayer(layerName){
        if (NS4 || IE4) {
                eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
                }       
        }


          function moveLayerTo(layerName,left,top)   // sposta il layer
        {
         eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top='+top);
            eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left='+left);
        }


function LoadImagePreload () {
if (!IE3) {

pallino_on = new Image();
pallino_on.src = "images/pallino.gif";

//principale
chi_siamo_off = new Image();
chi_siamo_off.src = "images/azienda.gif";
chi_siamo_on = new Image();
chi_siamo_on.src = "images/azienda_on.gif";

certificazione_off = new Image();
certificazione_off.src = "images/certificazione.gif";
certificazione_on = new Image();
certificazione_on.src = "images/certificazione_on.gif";

partners_off = new Image();
partners_off.src = "images/partners.gif";
partners_on = new Image();
partners_on.src = "images/partners_on.gif";

prodotti_off = new Image();
prodotti_off.src = "images/prodotti.gif";
prodotti_on = new Image();
prodotti_on.src = "images/prodotti_on.gif";

servizi_off = new Image();
servizi_off.src = "images/servizi.gif";
servizi_on = new Image();
servizi_on.src = "images/servizi_on.gif";

software_off = new Image();
software_off.src = "images/software.gif";
software_on = new Image();
software_on.src = "images/software_on.gif";

news_off = new Image();
news_off.src = "images/news.gif";
news_on = new Image();
news_on.src = "images/news_on.gif";

contattaci_off = new Image();
contattaci_off.src = "images/contattaci.gif";
contattaci_on = new Image();
contattaci_on.src = "images/contattaci_on.gif";

privacy_off = new Image();
privacy_off.src = "images/privacy.gif";
privacy_on = new Image();
privacy_on.src = "images/privacy_on.gif";


//menu azienda
a_me1_off = new Image();
a_me1_off.src = "images/me_dove_siamo.gif";
a_me1_on = new Image();
a_me1_on.src = "images/me_dove_siamo_on.gif";

a_me2_off = new Image();
a_me2_off.src = "images/me_obiettivi.gif";
a_me2_on = new Image();
a_me2_on.src = "images/me_obiettivi_on.gif";

a_me3_off = new Image();
a_me3_off.src = "images/me_short_history.gif";
a_me3_on = new Image();
a_me3_on.src = "images/me_short_history_on.gif";

a_me4_off = new Image();
a_me4_off.src = "images/me_risorse.gif";
a_me4_on = new Image();
a_me4_on.src = "images/me_risorse_on.gif";

a_pa1_off = new Image();
a_pa1_off.src = "images/space.gif";

a_pa2_off = new Image();
a_pa2_off.src = "images/space.gif";

a_pa3_off = new Image();
a_pa3_off.src = "images/space.gif";

a_pa4_off = new Image();
a_pa4_off.src = "images/space.gif";


//menu suggerimenti
s_me1_off = new Image();
s_me1_off.src = "images/me_links.gif";
s_me1_on = new Image();
s_me1_on.src = "images/me_links_on.gif";

s_me2_off = new Image();
s_me2_off.src = "images/me_downloads.gif";
s_me2_on = new Image();
s_me2_on.src = "images/me_downloads_on.gif";

s_me3_off = new Image();
s_me3_off.src = "images/me_eventi.gif";
s_me3_on = new Image();
s_me3_on.src = "images/me_eventi_on.gif";

s_pa1_off = new Image();
s_pa1_off.src = "images/space.gif";

s_pa2_off = new Image();
s_pa2_off.src = "images/space.gif";

s_pa3_off = new Image();
s_pa3_off.src = "images/space.gif";

//pagina certificazione
iso_off = new Image();
iso_off.src = "images/c_logo_iso.gif";
iso_on = new Image();
iso_on.src = "images/c_logo_iso_on.gif";

imq_off = new Image();
imq_off.src = "images/c_logo_imq.gif";
imq_on = new Image();
imq_on.src = "images/c_logo_imq_on.gif";

iqnet_off = new Image();
iqnet_off.src = "images/c_logo_iqnet.gif";
iqnet_on = new Image();
iqnet_on.src = "images/c_logo_iqnet_on.gif";

uni_off = new Image();
uni_off.src = "images/c_logo_uni.gif";
uni_on = new Image();
uni_on.src = "images/c_logo_uni_on.gif";

}


}
var loaded=0;

function Change (oName, imgName)  {
   if ((loaded==1) && (!IE3)) 
      eval ('document.' + oName + '.src = ' +  imgName + '.src');
}

function ChangeLayer (oName, imgName, layerName)  {
	if (NS4) eval(layerRef+'["'+layerName+'"]'+layerDoc+styleSwitch+ oName + '.src = ' +  imgName + '.src');
	if (IE4) eval(layerRef+layerDoc+oName + '.src = ' +  imgName + '.src');
}

LoadImagePreload(); 


function makeStyle ()  {
	document.write ('<style type="text/css">');
	for (i_loc=0; i_loc < menu.length; i_loc ++) {
		topY += stepY;
		document.write ("#" + menu[i_loc] + " {position:absolute;top:" + topY + "px;left:130px;z-Index:10;width:106px;VISIBILITY:hidden;}");
	}
	document.write ('</style>');
}


function hideAll () {
	for (i_loc=0; i_loc < menu.length; i_loc ++) {
		hideLayer (menu[i_loc]);
	}
}
