/* SLIDESHOW Control ---------------------------------------------------------- */
// Vars
countOfSlides = 1;
showImgId = 1;
playit = false;
stopit = false;
restartit = false;
dfolder = '';
timoutstarted = false;
timeSpeed = 4000; // Zeitabstand in Milisekunden

// Set Count Of
function setCountOfSlides (pInt) {
	countOfSlides = pInt;
}// setCountOfSlides

// Show Next Image
function nextImg () {
	idToShow = showImgId+1;
	idToHide = showImgId;
	if (showImgId == countOfSlides) idToShow = 1;
	Effect.Appear (
		'slide'+idToShow+'', 
		{
			duration:1.6,
			fps:50
		}
	);
	Effect.Fade ( // Fade
		'slide'+idToHide+'', 
		{
			duration:1.6,
			fps:50
		}
	);
	showImgId++;
	if (showImgId > countOfSlides) showImgId = 1;	
}// nextImg

// Play Slideshow
function play () {
	if (!stopit || restartit) {
		timoutstarted = false;
		nextImg ();
		setTimeout ('play();', timeSpeed);
	}
}// play
// Restart Slideshow
function restart () {
	restartit = true;
}




/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Navigation roll over fuer Win IE
*/
function startList () {
	if(document.all&&document.getElementById) {
		navRoot = document.getElementById("hauptmenu");
		for(i=0;i<navRoot.childNodes.length;i++) {
			node = navRoot.childNodes[i];
			if(node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over","");
				}
			}
		}
	}
}
