// JavaScript Document

 /* **************  slideshow immagini  ****************** */
        function cambio(nome, imm, imgsmall, aa) {
            var target = document.getElementById(imgsmall);
            var tutte = document.getElementsByTagName('img');

            var quante = (tutte.length) - 1;
            var i = 0;
            for (i = 0; i < quante; i++) {
                if (tutte[i].className == "smallpiena") {
                    tutte[i].className = "small";
                }
            } //end for
            target.className = "smallpiena"

            document[nome].src = imm;
            document.getElementById('link_scheda').href = aa;

        } // end cambio

        function mousesopra(imm) {
            var target = document.getElementById(imm);
            target.className = "smallpiena";
        } // end mouse_sopra

		function mousefuori(imm, imgbig) {
            var target = document.getElementById(imm);
            
            var aa = document.fotobig.src.split("/");
            
            target.className = "small";
            if (imgbig == aa[aa.length - 1]) {
                target.className = "smallpiena";
            }
            else {
                target.className = "small";
            } // end if

        } //end mouse_fuori
