<script Language="JavaScript">
function scrollit()
{for (I=100; I>=1; I--)
{self.scroll(1,I)}}
</script>
<script>
var slide = new Array;
var pictureName = new Array("dol-photo/bolero.jpg", "dol-photo/bolero+yubka.jpg", "dol-photo/bolero-sarafan.jpg", "dol-photo/bolero-sukna.jpg", "dol-photo/futbolka+shorty.jpg", "dol-photo/golf-zakard.jpg", "dol-photo/jaket-spid.jpg", "dol-photo/kostyum-vel-roz2.jpg", "dol-photo/pizama-smaylik.jpg", "dol-photo/reglan-oleg.jpg", "dol-photo/sarafan.jpg", "dol-photo/shtany-trek+golf.jpg", "dol-photo/shtany-trik.jpg", "dol-photo/sukna.jpg");
for (var i = 0; i < pictureName.length; i++) {
slide[i] = new Image();
slide[i].src = pictureName[i];
}
var m = new Array(0, 100);
var nextImage = 0;
var t = "";
function next(step) {
if (t != "") return;
m[0] = 0;
m[1] = 100;
nextImage = nextImage + step;
if (nextImage == pictureName.length) {
nextImage = 0;
}
if (nextImage == -1) {
nextImage = pictureName.length - 1;
}
document.getElementById("after").src = slide[nextImage].src;
change_slide();
}
function change_slide() {
m[0] += 1;
m[1] -= 1;
document.getElementById("before_div").style.opacity = m[1]/100;
document.getElementById("after_div").style.opacity = m[0]/100;
document.getElementById("after_div").style.filter="alpha(opacity="+m[0]+")";
document.getElementById("before_div").style.filter="alpha(opacity="+m[1]+")";
t = setTimeout("change_slide()",5);
if (m[0] > 98) {
clearTimeout(t);
document.getElementById("before").src = slide[nextImage].src;
document.getElementById("before_div").style.opacity = 100;
document.getElementById("before_div").style.filter="alpha(opacity=0)";
t = "";
}
}
</script>
Мне надо что бы фотографии при щелчке вперед или назад прокручивались(менялись) быстрее