
var stageslides = new Array("stageslide", "stageslide2", "stageslide3", "stageslide4", "stageslide5", "stageslide6", "stageslide7", "stageslide8", "stageslide9", "stageslide10");
var arrayLenStage = stageslides.length;
var j = 0;
var stageslides_caption = new Array("caption", "caption2", "caption3", "caption4", "caption5", "caption6", "caption7", "caption8", "caption9", "caption10");
var stageslides_captionheadline = new Array("captionhead", "captionhead2", "captionhead3", "captionhead4", "captionhead5", "captionhead6", "captionhead7", "captionhead8", "captionhead9", "captionhead10");


var slides = new Array("slide1", "slide2", "slide3", "slide4", "slide5", "slide6", "slide7");
var arrayLen = slides.length;
var i = 0;
var wait = 7000;

function stageShow(where) {
		Effect.Fade(stageslides[j], {duration: 0.1, from: 1, to: 0});
		if (where == "back") {
				j--;
		} else {
				j++;
		}
		if (j < 0) {
				j = 9;
		}
		if (j > 9) {
				j = 0;
		}
		Effect.Appear(stageslides[j], {duration: 0.1, from: 0, to: 1});
		document.getElementById("capto").innerHTML = stageslides_caption[j];
		document.getElementById("capto_headline").innerHTML = stageslides_captionheadline[j];
}



function SlideShow() {
		Effect.Fade(slides[i], {duration: 1.2, from: 1, to: 0});
		i++;
		if (i == arrayLen) {
				i = 0;
		}
		Effect.Appear(slides[i], {duration: 1.2, from: 0, to: 1});
}


function start_slideshow() {
		setInterval("SlideShow()", wait);
}

function clearText(thefield){
	if (thefield.defaultValue==thefield.value) {
		thefield.value = ""
	}
} 