var curIdx = 0;

function changeImage(layerName,idx,bildName) {
	// bild wechseln
	preloadImage("bildObj",bildArray[idx]);
	swapImage(layerName,bildName,"bildObj");
}

function slideshow(layerName,bildName) {
	changeImage(layerName,curIdx,bildName);
	curIdx += 1;
	if (curIdx == bildArray.length) { curIdx = 0; }
	//setTimeout("slideshow();", 4500);
}

var curIdx2 = 0;

function changeImage2(layerName,idx,bildName) {
	// bild wechseln
	preloadImage("bildObj",bildArray2[idx]);
	swapImage(layerName,bildName,"bildObj");
}

function slideshow2(layerName,bildName) {
	changeImage2(layerName,curIdx2,bildName);
	curIdx2 += 1;
	if (curIdx2 == bildArray2.length) { curIdx2 = 0; }
	//setTimeout("slideshow();", 4500);
}

