

function load() { 

var debug=false;

if (debug) document.getElementById("debug").style.display="block"; 
if (GBrowserIsCompatible()) { 
var map = new GMap2(document.getElementById("map")); 
map.addControl(new GSmallMapControl()); 
map.addControl(new GMapTypeControl()); 

if (debug) { 
GEvent.addListener(map, "moveend", function() { 
var center = map.getCenter(); 
document.getElementById("debug").innerHTML = center.toString();}); 

GEvent.addListener(map, "click", function(marker, point) { 
if (point) 
document.getElementById("debug").innerHTML = point.toString();}); 

} 

map.setCenter(new GLatLng(40.84839135276868, 17.125818729400634), 16); 

var point = new GLatLng(40.84710499358885,17.1239572763443); 

var marker = new GMarker(point); 
GEvent.addListener(marker, "click", function() { 
marker.openInfoWindowHtml("Qui c'è il plesso De Gasperi");}) 

map.addOverlay(marker); 


var point2 = new GLatLng(40.84798556392548,17.127599716186523); 

var marker2 = new GMarker(point2); 
GEvent.addListener(marker2, "click", function() { 
marker2.openInfoWindowHtml("Qui c'è il plesso Lama dei Pampini");}) 

map.addOverlay(marker2); 


} 
} 






function cambia_immagine(id_img,immagine) {
id_img.src=immagine;
}


function mostra (livello) {
var o_livello=document.all[livello];
o_livello.style.visibility="visible";
}


function nascondi (livello) {
var o_livello=document.all[livello];
o_livello.style.visibility="hidden";
}

function controlla() {


if (ricerca.plesso.value!="sn"){

if (ricerca.plesso.value=="scegli" ||  ricerca.classe.value=="scegli" ||  ricerca.classe.value=="sm" || ricerca.sezione.value=="scegli"){

alert ('devi scegliere: plesso, classe, sezione');

}
}



if (ricerca.plesso.value=="sn") {
if ((ricerca.classe.value!="scegli"  && ricerca.classe.value!="sm") || ricerca.sezione.value=="scegli"){

alert ('attento: imposta meglio la scelta per la scuola materna')
}

if ( ricerca.sezione.value=="a"){
document.ricerca.risultati.value="Cipriani Gemma"
}

if ( ricerca.sezione.value=="b"){
document.ricerca.risultati.value="Altini Meri"
}

if ( ricerca.sezione.value=="c"){
document.ricerca.risultati.value="Lombardi Miria"
}

if ( ricerca.sezione.value=="d"){
document.ricerca.risultati.value="Labate Antonella"
}

if ( ricerca.sezione.value=="e"){
document.ricerca.risultati.value="Minelli Rita"
}


if (ricerca.sezione.value=="f" || ricerca.sezione.value=="g"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i") {
document.ricerca.risultati.value="sezione inesistente"
}




}

if (ricerca.plesso.value=="dg") { 

if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="a") {
document.ricerca.risultati.value="Giannotta Rossana"
}


if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="b") {
document.ricerca.risultati.value="Daresta Antonella"
}


if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="c") {
document.ricerca.risultati.value="Netti Angela"
}



if (ricerca.classe.value=="prima" &&  (ricerca.sezione.value=="d" || ricerca.sezione.value=="e" || ricerca.sezione.value=="f" || ricerca.sezione.value=="g"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}







if (ricerca.classe.value=="seconda" &&  ricerca.sezione.value=="a") {
document.ricerca.risultati.value="Cipriani Rosa"
}




if (ricerca.classe.value=="seconda" &&  (ricerca.sezione.value=="b" || ricerca.sezione.value=="c" || ricerca.sezione.value=="d" || ricerca.sezione.value=="e" || ricerca.sezione.value=="f" || ricerca.sezione.value=="g"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}



if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="a") {
document.ricerca.risultati.value="Debrando Tamara"
}



if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="b") {
document.ricerca.risultati.value="Mezzapesa Silvia"
}



if (ricerca.classe.value=="terza" &&  (ricerca.sezione.value=="c" || ricerca.sezione.value=="d" || ricerca.sezione.value=="e" || ricerca.sezione.value=="f" || ricerca.sezione.value=="g"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}




if (ricerca.classe.value=="quarta" &&  ricerca.sezione.value=="a") {
document.ricerca.risultati.value="Palmirotta Anna"
}





if (ricerca.classe.value=="quarta" &&  (ricerca.sezione.value=="b" ||  ricerca.sezione.value=="c" || ricerca.sezione.value=="d" || ricerca.sezione.value=="e" || ricerca.sezione.value=="f" || ricerca.sezione.value=="g"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}



if (ricerca.classe.value=="quinta" &&  ricerca.sezione.value=="a") {
document.ricerca.risultati.value="Pipoli Pietro"
}

if (ricerca.classe.value=="quinta" &&  ricerca.sezione.value=="b") {
document.ricerca.risultati.value="Mangini Maria Elisabetta"
}




if (ricerca.classe.value=="quinta" &&  (ricerca.sezione.value=="c" || ricerca.sezione.value=="d" || ricerca.sezione.value=="e" || ricerca.sezione.value=="f" || ricerca.sezione.value=="g"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}


}


if (ricerca.plesso.value=="lp") { 

if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="d") {
document.ricerca.risultati.value="Magistro Cristina"
}

if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="e") {
document.ricerca.risultati.value="Derobertis Filomena"
}

if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="f") {
document.ricerca.risultati.value="- - - - - - - - - - "
}


if (ricerca.classe.value=="prima" &&  ricerca.sezione.value=="g") {
document.ricerca.risultati.value="Quaranta Vincenza"
}




if (ricerca.classe.value=="prima" &&  (ricerca.sezione.value=="a" ||  ricerca.sezione.value=="b" || ricerca.sezione.value=="c" || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}



if (ricerca.classe.value=="seconda" &&  ricerca.sezione.value=="d") {
document.ricerca.risultati.value="D\'Arcangelo Maryanne"
}

if (ricerca.classe.value=="seconda" &&  ricerca.sezione.value=="e") {
document.ricerca.risultati.value="Bianco Mara"
}

if (ricerca.classe.value=="seconda" &&  ricerca.sezione.value=="f") {
document.ricerca.risultati.value="Dalena Costanza"
}

if (ricerca.classe.value=="seconda" &&  ricerca.sezione.value=="g") {
document.ricerca.risultati.value="Console Angela"
}


if (ricerca.classe.value=="seconda" &&  ricerca.sezione.value=="h") {
document.ricerca.risultati.value="Lops Raffaele"
}




if (ricerca.classe.value=="seconda" &&  (ricerca.sezione.value=="a" || ricerca.sezione.value=="b" || ricerca.sezione.value=="c"  || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}



if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="d") {
document.ricerca.risultati.value="D\'arconso Margherita"
}

if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="e") {
document.ricerca.risultati.value="Zaccaria Eleonora"
}

if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="f") {
document.ricerca.risultati.value="Turi Luigia"
}

if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="g") {
document.ricerca.risultati.value="Recchia Roberta"
}


if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="h") {
document.ricerca.risultati.value="Vitti Isabella"
}

if (ricerca.classe.value=="terza" &&  ricerca.sezione.value=="i") {
document.ricerca.risultati.value="Gigante Manuela"
}





if (ricerca.classe.value=="terza" &&  (ricerca.sezione.value=="a" || ricerca.sezione.value=="b" || ricerca.sezione.value=="c")) {
document.ricerca.risultati.value="sezione inesistente"
}


if (ricerca.classe.value=="quarta" &&  ricerca.sezione.value=="d") {
document.ricerca.risultati.value="Angelini Maria Antonietta"
}

if (ricerca.classe.value=="quarta" &&  ricerca.sezione.value=="e") {
document.ricerca.risultati.value="Bianco Gianpietro"
}


if (ricerca.classe.value=="quarta" &&  ricerca.sezione.value=="f") {
document.ricerca.risultati.value="Loperfido Pietro"
}


if (ricerca.classe.value=="quarta" &&  ricerca.sezione.value=="g") {
document.ricerca.risultati.value="Capozza Rosanna"
}



if (ricerca.classe.value=="quarta" &&  (ricerca.sezione.value=="a" || ricerca.sezione.value=="b" || ricerca.sezione.value=="c"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}

if (ricerca.classe.value=="quinta" &&  ricerca.sezione.value=="d") {
document.ricerca.risultati.value="Lavarra Rossana"
}

if (ricerca.classe.value=="quinta" &&  ricerca.sezione.value=="e") {
document.ricerca.risultati.value="Dalessandro Rosselia"
}


if (ricerca.classe.value=="quinta" &&  ricerca.sezione.value=="f") {
document.ricerca.risultati.value="Pugliese Gianfranco"
}

if (ricerca.classe.value=="quinta" &&  ricerca.sezione.value=="g") {
document.ricerca.risultati.value="Pesce Patrizia"
}


if (ricerca.classe.value=="quinta" &&  (ricerca.sezione.value=="a" || ricerca.sezione.value=="b" || ricerca.sezione.value=="c"  || ricerca.sezione.value=="h" || ricerca.sezione.value=="i")) {
document.ricerca.risultati.value="sezione inesistente"
}


}


}  



function muovi1(qlivello){
tlivello=eval(qlivello)
if (tlivello.top>0&&tlivello.top<=5){
tlivello.top=0
setTimeout("muovi1(tlivello)",3000)
setTimeout("muovi2(document.main.document.secondo)",3000)
return
}
if (tlivello.top>=tlivello.document.height*-1){
tlivello.top-=5
setTimeout("muovi1(tlivello)",100)
}
else{
tlivello.top=scrollerheight-50
tlivello.document.write(messaggi[ii])
tlivello.document.close()
if (ii==messaggi.length-1)
ii=0
else
ii++
}
}

function muovi2(qlivello){
tlayer2=eval(qlivello)
if (tlivello2.top>0&&tlivello2.top<=5){
tlivello2.top=0
setTimeout("muovi2(tlivello2)",3000)
setTimeout("muovi1(document.main.document.primo)",3000)
return
}
if (tlivello2.top>=tlivello2.document.height*-1){
tlivello2.top-=5
setTimeout("muovi2(tlivello2)",100)
}
else{
tlivello2.top=scrollerheight-50
tlivello2.document.write(messaggi[ii])
tlivello2.document.close()
if (ii==messaggi.length-1)
ii=0
else
ii++
}
}

function muovi3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("muovi3(tdiv)",3000)
setTimeout("muovi4(secondo2)",3000)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("muovi3(tdiv)",100)
}
else{
tdiv.style.pixelTop=scrollerheight-15
tdiv.innerHTML=messaggi[ii]
if (ii==messaggi.length-1)
ii=0
else
ii++
}
}

function muovi4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("muovi4(tdiv2)",3000)
setTimeout("muovi3(primo2)",3000)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("muovi4(secondo2)",100)
}
else{
tdiv2.style.pixelTop=scrollerheight-15
tdiv2.innerHTML=messaggi[ii]
if (ii==messaggi.length-1)
ii=0
else
ii++
}
}

function startscroll(){
if (document.all){
muovi3(primo2)
secondo2.style.top=scrollerheight-15
secondo2.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
muovi1(document.main.document.first)
document.main.document.secondo.top=scrollerheight+5
document.main.document.secondo.visibility='show'
}
}


function swap(newImage) {

    var fileName = newImage.toString() + ".jpg"
    document.all.slideshow.src = fileName
}



function mostra_menu(oggetto) {
	blocco = oggetto.all("menu2");
	immagine=oggetto.all("icona");
	if (blocco) {
		if (blocco.style.display == "") {
			blocco.style.display = "none";
			immagine.src="immagini/cartella_chiusa.gif";
		} else {
			blocco.style.display = "";
			immagine.src="immagini/cartella_aperta.gif";
		}
	}
}





foto1="images/car1.jpg";
foto2="images/car2.jpg";
foto3="images/car3.jpg";
foto4="images/car4.jpg";
foto5="images/car5.jpg";
foto6="images/car6.jpg";
foto7="images/car7.jpg";
foto8="images/car8.jpg";
foto9="images/car9.jpg";
foto10="images/car10.jpg";
foto11="images/car11.jpg";
foto12="images/car12.jpg";


var timer_immagine
var i=1

function controllo () {



if (j==1){
window.open('azienda14.htm','','resizable=no, scrollbars=no, toolbar= no, titlebar=no, width=600,height=500,top=10, left=50')

}


if (j==2){
window.open('azienda12.htm','','resizable=no, scrollbars=no, toolbar= no, titlebar=no, width=600,height=550,top=10, left=50')

}


if (j==3){
window.open('azienda3.htm','','resizable=no, scrollbars=no, toolbar= no, titlebar=no, width=600,height=500,top=10, left=50')

}



}


function cambia (){

timer_immagine=setInterval("cambia_imm()",2000);
}


function cambia_imm () {


if (i>12) {
i=1

}

if (i==1) {

foto=foto1
}

if (i==2) {
foto=foto2

}


if (i==3) {
foto=foto3

}


if (i==3) {
foto=foto3

}

if (i==4) {
foto=foto4

}

if (i==5) {
foto=foto5

}

if (i==6) {
foto=foto6

}

if (i==7) {
foto=foto7

}

if (i==8) {
foto=foto8

}

if (i==9) {
foto=foto9

}

if (i==10) {
foto=foto10

}

if (i==11) {
foto=foto11

}


if (i==12) {
foto=foto12

}


immagine="im1";
oggetto=document.all[immagine];
oggetto.style.cursor='hand';
oggetto.src=foto

j=i
//oggetto.onclick=controllo




i++

}



foto1_staffetta="images/staff01.jpg";
foto2_staffetta="images/staff02.jpg";
foto3_staffetta="images/staff03.jpg";
foto4_staffetta="images/staff04.jpg";
foto5_staffetta="images/staff05.jpg";
foto6_staffetta="images/staff06.jpg";
foto7_staffetta="images/staff07.jpg";
foto8_staffetta="images/staff08.jpg";
foto9_staffetta="images/staff09.jpg";
foto10_staffetta="images/staff10.jpg";


var timer_immagine
var i=1

function controllo_staffetta () {



if (j==1){
window.open('azienda14.htm','','resizable=no, scrollbars=no, toolbar= no, titlebar=no, width=600,height=500,top=10, left=50')

}


if (j==2){
window.open('azienda12.htm','','resizable=no, scrollbars=no, toolbar= no, titlebar=no, width=600,height=550,top=10, left=50')

}


if (j==3){
window.open('azienda3.htm','','resizable=no, scrollbars=no, toolbar= no, titlebar=no, width=600,height=500,top=10, left=50')

}



}


function cambia_staffetta (){

timer_immagine=setInterval("cambia_imm_staffetta()",2000);
}


function cambia_imm_staffetta () {


if (i>10) {
i=1

}

if (i==1) {

foto=foto1_staffetta
}

if (i==2) {
foto=foto2_staffetta

}


if (i==3) {
foto=foto3_staffetta

}


if (i==3) {
foto=foto3_staffetta

}

if (i==4) {
foto=foto4_staffetta

}

if (i==5) {
foto=foto5_staffetta

}

if (i==6) {
foto=foto6_staffetta

}

if (i==7) {
foto=foto7_staffetta

}

if (i==8) {
foto=foto8_staffetta

}

if (i==9) {
foto=foto9_staffetta

}

if (i==10) {
foto=foto10_staffetta

}

immagine="im1";
oggetto=document.all[immagine];
oggetto.style.cursor='hand';
oggetto.src=foto

j=i
//oggetto.onclick=controllo_staffetta




i++

}




