/////////////////////////////////////////////////// // javascript for slide-show // CopyRight by Polly Jennings 1998 /////////////////////////////////////////////////// var timerid = null; var timeron = false; var index = 1; var s = "fullsz/"; var e = ".jpg"; var speed = 5000; // 5 seconds/////10000; // 10 seconds function stopclock() { if (timeron) { clearTimeout(timerid); } timeron = false; } function tick() { next(1); timerid = setTimeout("tick()", speed); timeron = true; } function startclock() { stopclock(); tick(); } function next(direction) { var pixmax = document.slidecontrol.max.value * 1; if (direction == 1) index++; else index--; if (index > pixmax) index = 1; if (index < 1) index = pixmax; var oestr = index.toString(); if (oestr.length < 2) oestr = "0" + oestr; var is = s + oestr + e; document.slidecontrol.imagesrc.value = oestr; document.images[0].src = is; } function gotonumber(form) { var pixmax = document.slidecontrol.max.value * 1; index = form.imagesrc.value * 1; if (index > pixmax) index = 1; if (index < 1) index = pixmax; var oestr = index.toString(); if (oestr.length < 2) oestr = "0" + oestr; var is = s + oestr + e; form.imagesrc.value = oestr; document.images[0].src = is; } function speedchange(direction) { if (direction == 1) speed += 2000; else speed -= 2000; if (speed > 60000) speed = 60000; if (speed < 1000) speed = 1000; document.slidecontrol.gotos.value = speed / 1000; } function gotospeed(form) { speed = form.gotos.value * 1000; if (speed > 60000) speed = 60000; if (speed < 1000) speed = 1000; form.gotos.value = speed / 1000; }