// Codice per eliminare il delay di caricamento nel rollover delle immagini del menu

home = new Image();
home.src = "images/home2.jpg";

hotstuff = new Image();
hotstuff.src = "images/hotstuff2.jpg";

events = new Image();
events.src = "images/events2.jpg";

history = new Image();
history.src = "images/history2.jpg";

photos = new Image();
photos.src = "images/photos2.jpg";

charts = new Image();
charts.src = "images/charts2.jpg";

flyers = new Image();
flyers.src = "images/flyers2.jpg";

guestbook = new Image();
guestbook.src = "images/guestbook2.jpg";

links = new Image();
links.src = "images/links2.jpg";

contacts = new Image();
contacts.src = "images/contacts2.jpg";

shop = new Image();
shop.src = "images/shop2.jpg";

function swapimage(imgN,imgU){
if(document.images)document.images[imgN].src=imgU;
}


// funzioni per effettuare il fade nel cambio pagina

var flashlinks=new Array()

function changelinkcolor(){
for (i=0; i< flashlinks.length; i++){
var flashtype=document.getElementById? flashlinks[i].getAttribute("flashtype")*1 : flashlinks[i].flashtype*1
var flashcolor=document.getElementById? flashlinks[i].getAttribute("flashcolor") : flashlinks[i].flashcolor
if (flashtype==0){
if (flashlinks[i].style.color!=flashcolor)
flashlinks[i].style.color=flashcolor
else
flashlinks[i].style.color=''
}
else if (flashtype==1){
if (flashlinks[i].style.backgroundColor!=flashcolor)
flashlinks[i].style.backgroundColor=flashcolor
else
flashlinks[i].style.backgroundColor=''
}
}
}

function init(){
var i=0
if (document.all){
while (eval("document.all.flashlink"+i)!=null){
flashlinks[i]= eval("document.all.flashlink"+i)
i++
}
}
else if (document.getElementById){
while (document.getElementById("flashlink"+i)!=null){
flashlinks[i]= document.getElementById("flashlink"+i)
i++
}
}
setInterval("changelinkcolor()", 1000)
}

if (window.addEventListener)
window.addEventListener("load", init, false)
else if (window.attachEvent)
window.attachEvent("onload", init)
else if (document.all)
window.onload=init

//funzioni per eseguire il fade sulle immagini

//finestra centrale
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+'';
win = window.open(mypage,myname,settings)
}

//funzione per le thumb (effetto fade)
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",30)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=50
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

