
/* Questo menu e' (C)2001 ri.riccardi@agora.stm.it - Lo script e' reperibile al sito http://www.jsdir.com - JavaScript Directory */
var ron="#c7af6f"; // Colore al MouseOvervar roff="#980E0E"; // Colore di defaultvar leftmargin=190; // Distanza dal margine sinistro della paginavar topmargin=200; // Distanza dal margine superiore della paginavar largo=150; // Larghezza dei layers, quindi distanza (orizzontale) fra i sottomenu
var alto=40; // altezza prima riga menuvar alto1=40; // altezza altre celle menu
  var lw = document.body.clientWidth ;
  leftmargin = ( lw - largo * 5 ) / 2 - 50 ;
var voci=new Array();	voci[0]=new Array("Chi siamo","Chi siamo","La festa del redentore","Alla vogalonga");  voci[1]=new Array("Padre Giorgio","Padre Giorgio","Un ricordo","Colonia Venesa","Progetto Quilombos") ;	voci[2]=new Array("Presenze","Nalgonda","Tagore Nagar","Cunaxatitlan");  voci[3]=new Array("Archivio foto","Redentore 2003","Redentore 2005") ;  voci[4]=new Array("Link utili","CEPE","Progetto meninos","Amici di Colonia Venesa","Favelas e Educazione");
var links=new Array();	links[0]=new Array("","storia/storia.html","redentore/index.html","arcoacuto_voga/vogalonga.html");	links[1]=new Array("","giorgio/giorgio.html","giorgio/ricordo/index.html","colonia/colonia.html","giorgio/quilombos.html");  links[2]=new Array("","nalgonda/nalgonda.html","tagore/tagore.html","mexico/foto2.html");  links[3]=new Array("","redentore2003/index.html","redentore2005/index.html") ;  links[4]=new Array("","http://www.cepe.org.br","http://www.progettomeninos.it","http://www.amicicoloniavenezia.org","http://favelaseeducazione.blogspot.com/");
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * Fine sezione personalizzabile. 
 * Le righe che seguono costituiscono il menu vero e proprio.
 * La personalizzazione e' consigliata solo a webmaster un po' esperti di JavaScript.
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */// var finestra = window.open( "" ,"prova","width=800,height=600");
var nn=document.layers?true:false,conta=0,last=0;
	// document.write("<DIV ID=mtop. STYLE=\"position:absolute;left:"+leftmargin+";top:"+topmargin+";width:50;height:"+alto+";background:"+roff+";color:#00ff00;visibility:visible;cursor:hand;z-index:5\" onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')><A HREF='home.html' CLASS=menuIEb onFocus=this.blur()>&nbsp;<I>Home</I></A></DIV>");
	for ( var i=0;i<voci.length;i++) {
		var n=i;
		document.writeln("<DIV class=menu_uno ID=mtop"+n+". STYLE=\"left:"+eval(leftmargin+50+largo*i)+                     ";top:"+topmargin+";width:"+largo+";height:"+alto+";background:"+roff+                     ";\" onMouseOver=MouseSu("+n+") onMouseOut=MouseVia("+n+")>"+                     "&nbsp;<I>"+voci[i][0]+"</I></DIV>");    var iniz = topmargin + alto ;
		for (var l=1;l<voci[i].length;l++){
			document.writeln("<DIV class=menu_due ID=mdep"+i+"."+l+" STYLE=\"left:"+eval(leftmargin+50+largo*i)+                       ";top:"+iniz+";width:"+largo+";height:"+alto1+";background:"+roff+                       ";visibility:hidden;\" onMouseOver=mroll('mdep"+n+"."+l+"');conta++ "+                       "onMouseOut=unmroll('mdep"+n+"."+l+"');conta-- "+                       "onClick=vai('"+links[i][l]+"',"+i+","+l+")>&nbsp;"+voci[i][l]+"</DIV>");      iniz = eval( iniz + alto1 ) ;
    }  }

var timer = setInterval("NascondiMenu()",1000) ;function MouseSu( n ) {    MostraMenu( n );    mroll( "mtop"+n+"." );    conta++ ;//    finestra.document.writeln( "sopra "+n+"." ) ;}function MouseVia( n ) {    last= n ;    unmroll( "mtop"+n+"." );    conta--}
function NascondiMenu()
	{
	if (conta==0)
		{
		coloratutti(true)
		timer=setTimeout("coloratutti(false)",200);
		timer=setTimeout("showdeps(last,false)",250);
		}
	}

function coloratutti(col)
	{
	var colore=col?ron:roff;
  var testo = col?"#0000ff":"#fef2da" ;
	for (var i=0;i<voci.length;i++)
		for ( var 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;
        document.getElementById('mdep'+i+"."+j).style.color= testo;
			}
	}

function MostraMenu(n)
	{
	showdeps(last,false);
	showdeps(n,true);
	last=n;
	}
function showdeps(n,act) {
  var stat ;  conta = 0 ;    // ???????????
	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;
  }}

var lev ;
function vai(dove,r,c)
	{
  if ( dove != '#' ) { conta = 0 }
	lev = document.getElementById("mdep"+r+"."+c).style;
	 NascondiMenu() ;
		lev.background=roff;
    lev.color= "#980E0E" ;
		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 mroll(l)
	{
	document.getElementById(l).style.background = ron ;
  document.getElementById(l).style.color= "#980E0E" ;
	document.getElementById?document.getElementById(l).style.cursor=document.all?'hand':'pointer':'void(0)';
	
	}

function unmroll(l)
	{
	document.getElementById(l).style.background=roff;
  document.getElementById(l).style.color= "#fef2da" ;
	window.status="";
	}
