

/* MouseOver */

function ShowItem(Index)
{
	if(actual!=42) {
		check=false;
		ShowEntry(Index);
		ShowVisual(Index,250);
	}
}

function ServiceMOut(Index)
{
	if(actual!=42) {

	}
}


/* ShowVisual */
/* ben&ouml;tigt mootools */

function ShowVisual(next,speed) {
	if(current!=next) {
		tDiv = "sv"+current;
		vDiv = "sv"+next;
		s = speed;
		current = next;		
		if($(tDiv).fx){$(tDiv).fx.stop();}
		if($(vDiv).fx){$(vDiv).fx.stop();}
		$(tDiv).fx = $(tDiv).effect('opacity', {duration: s}).start(0);
		$(vDiv).fx = $(vDiv).effect('opacity', {duration: s}).start(1);
	}
}

function ShowEntry(Index) {
	for (var x=1; x<=visuals; x++) {
		entry=document.getElementById("sn"+x);
		entry.className='inactive';
	}
	entry=document.getElementById("sn"+Index);
	entry.className='active';
}

/* Slideshow */

var visuals;
var nextvisual=2;
var check=true;

function Slide() {
	if(check==true) {
		ShowVisual(nextvisual,2000);
		ShowEntry(nextvisual);
		nextvisual++;
		if(nextvisual>=visuals+1) {
			nextvisual=1;
		}
		window.setTimeout("Slide()", 8000);
	}
}

function Slideshow(x) {
	if(check==true) {
		ShowEntry(1);
		visuals=x;
		window.setTimeout("Slide()", 8000);
	}
}
