// Aktueller Bildindex (beim Start 0)
var current_index = 0;
// Bilderwechsel durchführen
function switch_image(direction) {
var count = images.length;
current_index += (direction ? 1 : -1);
if (current_index == count) {
current_index = 0;
} else if (current_index < 0) {
current_index = count - 1;
}
document.getElementById('bilder').src = images[current_index];
}