var zumscroll=null;
var menuatt=0;
var t=false;
var attivo=false;
var aa = new Array();
aa[0] = new Image();
aa[0].src = "img/veneto.gif";
aa[1] = new Image();
aa[1].src = "img/cartina.gif";
aa[2] = new Image();
aa[2].src = "img/italia.gif";
var i = 0;
var t2=false;
var sfondoLeft=0;

function mostra(l)
{
 if(t) { clearTimeout(t); t=false; }
 if(menuatt) nascLayer();
 if(l<0) { attivo=true; l=-l; }
 else attivo=false;
 if(document.getElementById && document.getElementById("submenu"+l))
 {
  if(document.getElementById("submenu"+l))
  {
   document.getElementById("submenu"+l).style.zIndex="100";
   document.getElementById("submenu"+l).style.visibility="visible";
  }
  menuatt=l;
 }
/* if(!attivo)
 {
  if(document.getElementById && document.getElementById(img+l))
   document.getElementById(img+l).src="img/"+img+"-menu"+l+"-over.gif";
  else if(document.images && document.images[img+l])
   document.images[img+l].src="img/"+img+"-menu"+l+"-over.gif";
  menuatt=l;
 }*/
}

function nascondi()
{
 if(t) { clearTimeout(t); t=false; }
 t=setTimeout("nascLayer()",100);
/* if(!attivo)
 {
  if(document.getElementById && document.getElementById(img+menuatt))
   document.getElementById(img+menuatt).src="img/"+img+"-menu"+menuatt+".gif";
  else if(document.images && document.images[img+menuatt] )
  document.images[img+menuatt].src="img/"+img+"-menu"+menuatt+".gif";
 }*/
}

function nascLayer()
{
 if(document.getElementById && document.getElementById("submenu"+menuatt))
 {
  document.getElementById("submenu"+menuatt).style.visibility="hidden";
  document.getElementById("submenu"+menuatt).style.zIndex="0";
 }
 menuatt=0;
 if(t) { clearTimeout(t); t=false; }
}

function zoomscroll(url,w,h)
{
 if(zumscroll && !zumscroll.closed) zumscroll.close();
 return !(zumscroll=window.open(url,"zumscroll","width="+ w +",height="+ h +",screenX=0,screenY=0,top=0,left=0,directories=no,menubar=no,scrollbars=yes,status=no,toobar=no"));
}

function dovesiamo()
{
 if (i > 2) i=0;
 document.getElementById("cartina").src = aa[i].src;
 i++;
}

function panoramica()
{
 if(document.getElementsByTagName)
  t2=setTimeout("spostaSfondoDx()",100);
}

function spostaSfondoDx()
{
 if(t2) { clearTimeout(t2); t2=false; }
 sfondoLeft-=2;
 if (document.getElementById("testata").style) document.getElementById("testata").style.backgroundPosition=sfondoLeft+"px 0px";
 if (sfondoLeft>-474) t2=setTimeout("spostaSfondoDx()",100);
 else { t2=setTimeout("spostaSfondoSx()",100); }
}

function spostaSfondoSx()
{
 if(t2) { clearTimeout(t2); t2=false; }
 sfondoLeft+=2;
 if (document.getElementById("testata").style) document.getElementById("testata").style.backgroundPosition=sfondoLeft+"px 0px";
 if (sfondoLeft<-230) t2=setTimeout("spostaSfondoSx()",100);
 /*else { t2=setTimeout("spostaSfondoDx()",100); }*/
}