var rotate_delay = 4000; // delay in milliseconds (2000 = 2 secs)
current = 0;
function lessdelay() {
if (rotate_delay <= 1000) {
rotate_delay = rotate_delay-100; 
	document.slideform.delay.value = rotate_delay; 
}
else {
rotate_delay = rotate_delay-500; 
	document.slideform.delay.value = rotate_delay; 
}
}
function moredelay() {
if (rotate_delay < 1000) {
rotate_delay = rotate_delay+100; 
	document.slideform.delay.value = rotate_delay; 
}
else {
rotate_delay = rotate_delay+500; 
	document.slideform.delay.value = rotate_delay; 
}
}
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
}
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
}
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) { 
document.slideform.slidehidden.value = (text == "stop") ? "play" : "stop";
document.slideform.slidebutton.src = (text == "stop") ? "design/2007/f_play.gif" : "design/2007/f_stop.gif";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidehidden.value == "stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
}
}