fotos = [] ;
    texto = [];
    i = 0 ;

    fotos[0] = 'Fotos_site/2009/Baile_210309/baile1.jpg' ;
    texto[0] = 'Baile com Os Bilias - 21.03.2009' ;

    fotos[1] = 'Fotos_site/2009/Baile_210309/baile2.jpg';
    texto[1] = 'Baile com Os Bilias - 21.03.2009' ;

    fotos[2] = 'Fotos_site/2009/Baile_210309/baile3.jpg';
    texto[2] = 'Baile com Os Bilias - 21.03.2009' ;

    fotos[3] = 'Fotos_site/2009/Baile_210309/baile4.jpg';
    texto[3] = 'Baile com Os Bilias - 21.03.2009' ;

    fotos[4] = 'Fotos_site/2009/Baile_210309/baile5.jpg';
    texto[4] = 'Baile com Os Bilias - 21.03.2009' ;

    fotos[5] = 'Fotos_site/2009/Baile_210309/baile6.jpg';
    texto[5] = 'Baile com Os Bilias - 21.03.2009' ;
	
	fotos[6] = 'Fotos_site/2009/Baile_210309/baile7.jpg';
    texto[6] = 'Baile com Os Bilias - 21.03.2009' ;
	
	fotos[7] = 'Fotos_site/2009/Baile_210309/baile8.jpg';
    texto[7] = 'Baile com Os Bilias - 21.03.2009' ;
	
	fotos[8] = 'Fotos_site/2009/Baile_210309/baile9.jpg';
    texto[8] = 'Baile com Os Bilias - 21.03.2009' ;
	
	fotos[9] = 'Fotos_site/2009/Baile_210309/baile10.jpg';
    texto[9] = 'Baile com Os Bilias - 21.03.2009' ;
	
   function next() {
	if ( (i+1) < fotos.length ) show( i+1 ) ;
}
   
    function prev() {
	if ( i > 0 ) show( i-1 ) ;
}
   

    function show( n ) {
        i = n ;
        document.getElementById("foto").src = fotos[i] ;
        document.getElementById("legenda").innerHTML ='<p>' + texto[i] + '</p>' ;
        document.getElementById("contador").innerHTML = '<p>Foto ' + (n+1) + ' de 10 </p>' ;
        setOpacities();
    }
  
    function setOpacities() {
        var browser = navigator.appName;
       
        if (browser == "Netscape") {
            filtro1 = ".MozOpacity = '0.5'";
            filtro2 = ".MozOpacity = '1.0'";
        } else {
            filtro1 = ".filter = 'alpha(opacity=50)'";
            filtro2 = ".filter = 'alpha(opacity=100)'";
        }
       
        if (i == 0) {
            eval("document.getElementById('antes').style" + filtro1);
        } else {
            eval("document.getElementById('antes').style" + filtro2);
        }
   
        if ((i+1) == fotos.length) {
            eval("document.getElementById('depois').style" + filtro1);
        } else {
            eval("document.getElementById('depois').style" + filtro2);
        }
    }

