        var duration = 4000;

        function Fader(config) {
            if (!config.id || !document.getElementById(config.id)
                || config.images.length < 2) {

                return new Boolean(false);
            }

            var i, original = document.getElementById(config.id);

            this.id = config.id;
            this.images = new Array();
            this.counter = 0;

            this.element = document.createElement("span");
            this.element.className = "fader";
            original.parentNode.replaceChild(this.element, original);

            for (i = 0; i < config.images.length; i++) {
                this.images[i] = document.createElement("img");
                this.images[i].src = config.images[i];
                this.images[i].alt = "picture";

                if (i == 0) {
                    this.element.appendChild(this.images[i]);
                }
            }

            this.fade = function (step) {
                var fader = this, imgs = this.element.getElementsByTagName("img");

                step = step || 0;

                imgs[1].style.opacity = step/100;
                imgs[1].style.filter = "alpha(opacity=" + step + ")"; // IE?

                step = step + 2;

                if (step <= 100) {
                    window.setTimeout(function () { fader.fade(step); }, 1);
                } else {
                    imgs[1].className = "";
                    this.element.removeChild(imgs[0]);
                    window.setTimeout(function () { fader.next(); }, duration);
                }
            };

            this.next = function () {
                this.counter = (this.counter < this.images.length -1) ? this.counter +1 : 0;

                this.element.appendChild(this.images[this.counter]);
                this.images[this.counter].className = "next";
                this.fade();
            };
        }

        function createFader() {
            var config = {
                id: "slideshow",
                images: ["pics/cover.jpg", "pics/cover_1.jpg", "pics/cover_2.jpg","pics/cover_3.jpg",
                         "pics/cover_4.jpg"]
            };

            if (!window.my_slideshow) {
                window.my_slideshow = new Fader(config);
            }
	}

	function createFader_englPics() {
            var config = {
                id: "slideshow",
                images: ["pics/cover_englisch.jpg", "pics/cover_1_englisch.jpg", "pics/cover_2_englisch.jpg","pics/cover_3_englisch.jpg",
                         "pics/cover_4_englisch.jpg"]
            };

            if (!window.my_slideshow) {
                window.my_slideshow = new Fader(config);
            }
	}



	function startSlideshow() {
		createFader(); 
		if (window.my_slideshow){ 
			window.setTimeout("my_slideshow.next()", duration);
		}
	}

	function startSlideshow_englPics() {
		createFader_englPics(); 
		if (window.my_slideshow){ 
			window.setTimeout("my_slideshow.next()", duration);
		}
	}


