Muestra las imágenes al mejor estilo slideshow
Calif: 9
<html>
<head>
<!-- PRIMER PASO: Copiar dentro del tag HEAD -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Mike Canonigo (
[email protected]) -->
<!-- Web Site: http://www.munkeehead.com -->
<!-- Begin
NewImg = new Array (
"images/1.gif",
"images/2.gif",
"images/3.gif"
);
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>
<body>
<!-- SEGUNDO PASO: Copiar dentro del tag BODY -->
<img src="images/1.gif" name="slideshow">
<table>
<tr>
<td align="right"><a href="javascript
:chgImg(-1)">Previous</a></td>
<td align="center"><a href="javascript
:auto()">Auto/Stop</a></td>
<td align="left"><a href="javascript
:chgImg(1)">Next</a></td>
</tr>
</table>
</body>
</html>