		function Fader(einstellungen) {
			if (!einstellungen.id || !document.getElementById(einstellungen.id)
				|| einstellungen.images.length < 2) {

				return new Boolean(false);
			}

			var i, original = document.getElementById(einstellungen.id);

			this.id = einstellungen.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 < einstellungen.images.length; i++) {
				this.images[i] = document.createElement("img");
				this.images[i].src = einstellungen.images[i];
				this.images[i].alt = "Bild";
				this.images[i].width=396;
				this.images[i].height=210;

				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(); }, 2000);
				}
			};

			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 erstelleFader () {
			var einstellungen = {
				id: "slideshow",
				images: ["images/slideshow/1.jpg", 
								 "images/slideshow/2.jpg",
								 "images/slideshow/3.jpg",
								 "images/slideshow/4.jpg",
								 "images/slideshow/5.jpg",
								 "images/slideshow/6.jpg",
								 "images/slideshow/7.jpg",
								 "images/slideshow/8.jpg",
								 "images/slideshow/9.jpg",
								 "images/slideshow/10.jpg",
								 "images/slideshow/11.jpg",
								 "images/slideshow/12.jpg",
								 "images/slideshow/13.jpg",
								 "images/slideshow/14.jpg"]
			};

			if (!window.meine_slideshow) {
				window.meine_slideshow = new Fader(einstellungen);
			}
		}

  // Popup-Fenster öffnen
     function fenster(link,width,height)
     {
     	width=parseInt(width,10)+38;
//		height=parseInt(height,10)+200 <= zusätzliche Höhe fürs Fenster;
		height=parseInt(height,10);
		var top=10;
		var left=10;
		var check=0;
		if((width+20) > screen.width)
		{
					width=screen.width-40;
					check=1;
		}
		if((height+20) > screen.height)
		{
					height=screen.height-80;
					check=1;
		}	
		if(check == 0)
		{
					var middle_x=screen.width/2;
					var middle_y=screen.height/2;
					var middle_image_x=width/2;
					var middle_image_y=height/2;
					top=middle_y-middle_image_y;
					left=middle_x-middle_image_x;				
		}

        
         var par ="width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=no,resizable=no";
         return window.open(link,"",par);

     }
