/*
Slideshow nach: http://aktuell.de.selfhtml.org/artikel/javascript/fader-framework
*/

function test() {
	alert (" Testtext ");
	}

function high(which2)
	{
	 theobject=which2
	 highlighting=setInterval("highlightit(theobject)",50)
	}

function low(which2)
	{
	 clearInterval(highlighting)
	 if (which2.style.MozOpacity)
	 which2.style.MozOpacity=0.3
	 else if (which2.filters)
	 which2.filters.alpha.opacity=30
	}

function highlightit(cur2)
	{
	 if (cur2.style.MozOpacity<1)
	 cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.01
	 else if (cur2.filters&&cur2.filters.alpha.opacity<100)
	 cur2.filters.alpha.opacity+=1
	 else if (window.highlighting)
	 clearInterval(highlighting)
	}


        function Fader(id) {
            this.id = id;
            this.images = document.getElementById(id).getElementsByTagName("img");
            this.counter = 0;

            this.fade = function (step) {
                var fader = this;

                step = step || 0;

                this.images[this.counter].style.opacity = step/100;
                this.images[this.counter].style.filter = "alpha(opacity=" + step + ")"; // IE?

                step = step + 0.5;

                if (step <= 100) {
                    window.setTimeout(function () { fader.fade(step); }, 1);
                } else {
                    window.setTimeout(function () { fader.next(); }, 2000);
                }
            };

            this.next = function () {
                this.counter++;

                if (this.counter < this.images.length) {

                    this.fade();
                }
            };
        }

