var voce = new Array()
var voce_link = new Array()


voce[0] = "Anfima and its tasks"																															;			voce_link[0]= "tasks.html"
voce[1] = "The Origins"																																				;			voce_link[1]= "origins.html"
voce[2] = "Raw Materials"																																			;			voce_link[2]= "raw_materials.html"
voce[3] = "Packaging and <br><img width=21 height=1 border=0 src=img/sfondo.gif>Environment"	;			voce_link[3]= "packaging_environment.html"
voce[4] = "Product Sectors"																																		;			voce_link[4]= "product_sectors.html"
voce[5] = "Members List"																																			;			voce_link[5]= "members_list.asp"
voce[6] = "Promotional Activities"																															;			voce_link[6]= "promotion.html"
voce[7] = "Link"																																							;			voce_link[7]= "links.html"
voce[8] = "Contact us"																																				;			voce_link[8]= "contact.asp"


function costruisci(quale){	
	document.write("<div id=contenitore>")
	document.write("<div id=parte_sx>")
	document.write("<div id=logo>")
	document.write("<a href=introeng.asp><IMG Alt=Anfima width=31 height=28 src=img/logo.gif border=0></a><a href=introita.asp><IMG Alt=Anfima width=118 height=28 src=img/logo_ani2.gif border=0></a><br>")
	document.write("<br><img width=140 height=3 src=img/sfondo_blu_scuro.gif><br>")
	document.write("<img width=140 height=10 src=img/sfondo.gif><br>")
	document.write("<br><img width=35 height=33 border=0 src=img/confindustria_new.gif><br>")
	document.write("<img width=140 height=20 src=img/sfondo.gif><br>")
	document.write("<a href=introita.asp><img width=18 height=10 border=0 src=img/bandiera_ita.gif><img width=10 height=1 border=0 src=img/sfondo.gif><b>Versione in italiano</b></a><br>")
	document.write("<br><img width=170 height=10 border=0 src=img/sfondo.gif><br>")	
	document.write("</div>")
	for(i=0;i<voce.length;i++){		
		document.write("<div class=pulsante>")
		document.write("<img width=5 height=1 src=img/sfondo.gif>")
		document.write("<img width=16 height=7 src=img/quadratino.gif>")		
		scritta = voce[i]
		if (quale==i) {			
			if (i==6) {
				document.write("<a style=color:#000000 href=" + voce_link[i] + ">")
				document.write(scritta)
				document.write("</a>")
			} else {
				document.write("<span style=color:#000000>")
				document.write(scritta)
				document.write("</span>")
			}
		} else {
			document.write("<a style=color:#FFFFFF href=" + voce_link[i] + ">")
			document.write(scritta)
			document.write("</a>")
		}
		document.write("</div>")
	}		
}

function costruisci_destra() {
	document.write("<div id=logo_scritta>")
	document.write("<img width=1 height=8 border=0 src=img/sfondo.gif><br>")
	document.write("<img width=550 height=28 border=0 src=img/scritta.gif><br>")
	document.write("<br><img width=1 height=2 border=0 src=img/sfondo.gif><br>")
	document.write("</div>")
}

function costruisci2(quale){	
	document.write("<div id=logo>")
	document.write("<a href=introita.asp><IMG Alt=Anfima width=31 height=28 src=img/logo.gif border=0></a><a href=introita.asp><IMG Alt=Anfima width=118 height=28 src=img/logo_ani2.gif border=0></a><br>")
	document.write("<br><img width=140 height=3 src=img/sfondo_blu_scuro.gif><br>")
	document.write("<img width=140 height=10 src=img/sfondo.gif><br>")
	document.write("<br><img width=35 height=33 border=0 src=img/confindustria_new.gif><br>")
	document.write("<img width=140 height=20 src=img/sfondo.gif><br>")
	document.write("<a href=introita.asp.html><img width=18 height=14 border=0 src=img/bandiera_eng.gif><img width=10 height=1 border=0 src=img/sfondo.gif><b>English version</b></a><br>")
	document.write("<br><img width=170 height=10 border=0 src=img/sfondo.gif><br>")
	//document.write("<br><img width=170 height=3 border=0 src=img/sfondo_blu_scuro.gif><br>")
	document.write("</div>")
	for(i=0;i<voce.length;i++){		
		document.write("<div class=pulsante>")
		document.write("<img width=5 height=1 src=img/sfondo.gif>")
		document.write("<img width=16 height=7 src=img/quadratino.gif>")		
		scritta = voce[i]				
		if (quale==i) {
			if (i==6) {
				document.write("<a style=color:#000000 href=" + voce_link[i] + ">")
				document.write(scritta)
				document.write("</a>")
			} else {
				document.write("<span style=color:#000000>")
				document.write(scritta)
				document.write("</span>")
			}
		} else {
			document.write("<a style=color:#FFFFFF href=" + voce_link[i] + ">")
			document.write(scritta)
			document.write("</a>")
		}
		document.write("</div>")
	}		
}


function carica_immagini(){
	var numero = 0
	for (i=0; i<totaleimmagini; i++) {		
		if (immagine[i].complete == true) numero++;
	}
	if (numero == 4){
		runSlideShow()
	}	
	else
		setTimeout('carica_immagini()',1000)
}

var imgAttuale = 0
var tempoPermanenza = 3000;															// in millisecondi
function runSlideShow(){
	if (document.all) {
		document.images.SlideShow.style.filter = "blendTrans(duration=1)"
    document.images.SlideShow.filters.blendTrans.Apply()
  }
 	document.images.SlideShow.src = immagine[imgAttuale].src
  if (document.all) {
  	document.images.SlideShow.filters.blendTrans.Play()
  }
  imgAttuale = (imgAttuale+1) % totaleimmagini
  setTimeout('runSlideShow()', tempoPermanenza)
}
