<script type="text/javascript">
NewImg = new Array (
"DSC_0092.JPG",
"DSC_0114.JPG",
"DSC_0131.JPG",
"DSC_0142.JPG",
"DSC_00143.JPG",
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;
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);
}
}
</script>
</head>
<body text="#ffff99">
<center>
<img src="DSC_0092.jpg" name="slideshow">
<table align="center">
<tr>
<td align="right"><a href="javascript
:chgImg(-1)" class="style1 style2">Назад</a></td>
<td align="center"><a href="javascript
:auto()" class="style4">Слайдшоу</a></td>
<td align="left"><a href="javascript
:chgImg(1)" class="style4">Вперед</a></td>
</tr>
</table>