var ron="#dddddd"; // Colore al MouseOver
var roff="#6c6c6c"; // Colore di default
var colortext="#ffffff";
var colorsel="#000000";
var leftmargin=140; // Distanza dal margine sinistro della pagina
var topmargin=157; // Distanza dal margine superiore della pagina
var largo=116; // Larghezza dei layers, quindi distanza (orizzontale) fra i sottomenu
var alto=18;
var rientro=465;
var img1="images/Testata/Ok menu/img1.gif";
var img2="images/Testata/Ok menu/img2.gif";
var simg1="images/Testata/Ok menu/simg1.gif";
var simg2="images/Testata/Ok menu/simg2.gif";
var più=0;

var voci=new Array();
voci[0]=new Array("Home"),
voci[1]=new Array("Limone P.te");
voci[2]=new Array("Mondolé ski");
voci[3]=new Array("Tutte le località");
voci[4]=new Array("Webcams");
voci[5]=new Array("Meteo");
voci[6]=new Array("Forum");
voci[7]=new Array("Varie","Chi è Simolimo?","Collaboratori","Photogallery","I video di Simolimo","Siti amici");




var links=new Array();
links[0]=new Array("http://www.simolimo.com/NewIndex")
links[1]=new Array("http://www.simolimo.it/Limone.html")
links[2]=new Array("http://www.simolimo.it/Mondolè.html")
links[3]=new Array("http://www.simolimo.it/Tutte%20le%20loc.html")
links[4]=new Array("http://www.simolimo.it/tuttelewebcam.html")
links[5]=new Array("http://www.simolimo.it/hometeo.html")
links[6]=new Array("http://www.freeforumzone.com/viewforum.aspx?f=13366")
links[7]=new Array("","http://www.simolimo.it/simolimo.html","http://www.simolimo.it/collaboratori.htm","http://paolok2.altervista.org/_altervista_ht/index.php","http://it.youtube.com/profile_videos?p=r&user=simolimo1&page=1","http://www.simolimo.it/simolimo-link.html")


var nn=document.layers?true:false,conta=0,last=0;
     
     for (i=0;i<voci.length;i++)
     {
        var n=i;
		if (i==((voci.length)-1))
			più=2;
		else
			più=0;
		l=0;
           document.writeln("<DIV ID=mtop" + n + ". STYLE=\"font-family: Arial; font-weight: bold;background: url("+img1+");color: rgb(255, 255, 255);position:absolute;left:50%;margin-left:"+
           (largo*i-465) + ";top:" + topmargin + "; width:" + (largo+più) +
           ";height:20;visibility:visible;cursor:hand;font-style:blod\" onMouseOver=MostraMenu(" + n +
           ");mroll('mtop" + i +".');conta++; onMouseOut=last=" + n + ";unmroll('mtop" + i +
        ".');conta-- CLASS=menuIE onClick=vaim('" + links[i][l] + "'," + i + "," + l + ") ><DIV ALIGN=center valign=middle CLASS=menuIEb>&nbsp;<small>" + voci[i][0] + "</small></DIV></DIV>");
		   
		   
		   
        for (l=1;l<voci[i].length;l++)
           document.writeln("<DIV ID=mdep" + i + "." + l + " STYLE=\"background: #5f5f5f ;font-family: Arial;color: rgb(255, 255, 255);position:absolute;left:50%;margin-left:"+
           (largo*i-465)  + ";top:" + eval(topmargin+18*l) + "; width:" + (largo+più) +
           ";height:18;visibility:hidden;cursor:hand;\" onMouseOver=sroll('mdep" + n +
           "." + l + "');conta++ onMouseOut=unsroll('mdep" + n + "." + l + "');conta-- " +"CLASS=menuIE onClick=vai('" + links[i][l] + "'," + i + "," + l + ")><small>&nbsp;" + voci[i][l] + "</small></DIV>");
  }


timer=setInterval("NascondiMenu()",400)

function NascondiMenu()
{
  if (conta==0)
  {
     
     timer=setTimeout("showdeps(last,false)",250);
  }
}

function coloratutti(col)
{
  colore=col?ron:roff;
  for (i=0;i<voci.length;i++)
     for (j=1;j<voci[i].length;j++)
    {
       if (nn)
        document.layers["mdep"+i+"."+j].bgColor=colore;
        else
           if(document.all)
              document.all["mdep"+i+"."+j].style.background=colore;
          else
             document.getElementById('mdep'+i+"."+j).style.background=colore;
     }
}

function MostraMenu(n)
{
  showdeps(last,false);
  showdeps(n,true);
  last=n;
}

function showdeps(n,act)
{
  if (conta==0)
  {
    act?stat="visible":stat="hidden";
    if (nn)
       for (i=1;i<voci[n].length;i++)
          document.layers["mdep"+n+"."+i].visibility=stat;
    else
       for (i=1;i<voci[n].length;i++)
          if(document.all)
             document.all["mdep"+n+"."+i].style.visibility=stat;
          else
             document.getElementById('mdep'+n+"."+i).style.visibility=stat;
  }
}

function vai(dove,r,c)
{
  lev=nn?document.layers["mdep"+r+"."+c]:(document.all)?document.all["mdep"+r+"."+c].style:document.getElementById("mdep"+r+"."+c).style;

     lev.background=roff;
     timer=setTimeout("lev.background=ron",50)
     timer=setTimeout("lev.background=roff",100)
     timer=setTimeout("lev.background=ron",150)
     timer=setTimeout("lev.background=roff",200)
     timer=setTimeout("lev.background=ron",250)
  timer=setTimeout("self.location.href='"+dove+"'",350)
}

function vaim(dove,r)
{
  lev=nn?document.layers["mtop"+r+"."]:(document.all)?document.all["mtop"+r+"."].style:document.getElementById("mtop"+r+".").style;

  timer=setTimeout("self.location.href='"+dove+"'",50)
}


function vaiM(dove,n)
{
  lev=nn?document.layers["mtop" + n + "."]:(document.all)?document.all["mtop" + n + "."].style:document.getElementById("mtop" + n + ".").style;

  self.location.href='"+dove+"'
}
function mroll(l)
{
  (document.all) ? document.all[l].style.color='#000000' :document.getElementById(l).style.color='#000000';
  document.getElementById ? document.getElementById(l).style.cursor=document.all ? 'hand' : 'pointer' : 'void(0)';
 
}

function unmroll(l)
{
(document.all) ? document.all[l].style.color='#ffffff' :document.getElementById(l).style.color='#ffffff';
  window.status="";
}

function sroll(l)
{
	(document.all) ? document.all[l].style.background='#b3b3b3' : document.getElementById(l).style.background='#b3b3b3';
  (document.all) ? document.all[l].style.color='#000000' :document.getElementById(l).style.color='#000000';
  document.getElementById ? document.getElementById(l).style.cursor=document.all ? 'hand' : 'pointer' : 'void(0)';
 
}

function unsroll(l)
{
	(document.all) ? document.all[l].style.background='#5f5f5f' : document.getElementById(l).style.background='#5f5f5f';
(document.all) ? document.all[l].style.color='#ffffff' :document.getElementById(l).style.color='#ffffff';
  window.status="";
}

