GALLERIA FOTO SLIDESHOW

Precedente Auto/Stop Prossima

Questa galleria di foto potete vederla cliccando voi su prossima o precedente, oppure cliccare su auto che vi farà vedere le foto in sequenza ogni 3 secondi, modificabili nella riga var delay = 3000; espressi in millisecondi . Semplice l'inserimento dei file delle foto.

Autori: Mike Canonigo, http://www.munkeehead.com  modified and explained from www.webmasterpaolo.com 

RITORNA ALLA PAGINA DELLE JAVASCRIPT

Lo script da inserire in html


<!-- TWO STEPS TO INSTALL BASIC SLIDESHOW:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Mike Canonigo (mike@canonigo.com) -->
<!-- Web Site: http://www.munkeehead.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
NewImg = new Array (
"images/contrin000.jpg",
"images/contrin001.jpg",
"images/contrin002.jpg",
"images/contrin003.jpg"
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;

//Time delay between Slides in milliseconds
var delay = 3000;

var lock = false;
var run;
function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg[ImgNum];
}
}
function auto() {
if (lock == true) {
lock = false;
window.clearInterval(run);
}
else if (lock == false) {
lock = true;
run = setInterval("chgImg(1)", delay);
}
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<img src="images/contrin000.jpg" name="slideshow">
<table>
<tr>
<td align="right"><a href="javascript:chgImg(-1)">Precedente</a></td>
<td align="center"><a href="javascript:auto()">Auto/Stop</a></td>
<td align="left"><a href="javascript:chgImg(1)">Prossima</a></td>
</tr>
</table>

</p>

</body>

</html>