			var start = "0";
			var photoDir = "pics/";
			var borderSize = 0;

			var thisURL = document.location.href;
			var splitURL = thisURL.split("#");
			var photoId = splitURL[1] - 1;

			photoId = (!photoId)? 0:photoId;
				
			var photoNum = photoArray.length;

			API = new Detect();
			var ie8 = "";

			initFade = function(){
				API.PhotoContainer.show();
				
				var fade_timer = setInterval('startFade()', 20);
								
				startFade = function(){
					ie8 = "stop";
					if(API.slide_Container._tweenRunning == false){
						clearInterval(fade_timer);
						
						var adv_timer = setInterval('permitNextPrev()', 500);
						
						permitNextPrev = function(){
							if(API.Photo._fadeRunning == false){
								clearInterval(adv_timer);
								
									for (i=photoArray.length+1; i <= 33; i++) { 
									var id4 = eval('\'zahl'+i+'\''); 
									document.getElementById(id4).style.display = "none";
									}
								
								if(photoNum > 1){
									API.LinkContainer.displayShow();
									API.myLinkContainer.displayShow();
									document.getElementById('NextLink').onclick = nextPhoto;
									document.getElementById('PrevLink').onclick = prevPhoto;
									document.getElementById('myNextLink').onclick = nextPhoto;
									document.getElementById('myPrevLink').onclick = prevPhoto;
									
									for (i=1; i <= photoArray.length; i++) { 
									id1 = eval('\'zahl'+i+'\''); 
									id2 = eval('nextFoto'+i+'');
									document.getElementById(id1).onclick = id2;
									}

								}
							} else {
								return;
							}
						}
						API.LoadImg.setSrc("slideshow/img/c.gif");
						
						API.CaptionBlock.show();
						
						API.Photo.fadeIn(0,15,33);
					} else {
						return;
					}
				}
			}

			falsify = function(){
				return false;
			}

			nextFoto1 = function(){
				cyclePhoto("0");
			}
			nextFoto2 = function(){
				cyclePhoto("1");
			}
			nextFoto3 = function(){
				cyclePhoto("2");
			}
			nextFoto4 = function(){
				cyclePhoto("3");
			}
			nextFoto5 = function(){
				cyclePhoto("4");
			}
			nextFoto6 = function(){
				cyclePhoto("5");
			}
			nextFoto7 = function(){
				cyclePhoto("6");
			}
			nextFoto8 = function(){
				cyclePhoto("7");
			}
			nextFoto9 = function(){
				cyclePhoto("8");
			}
			nextFoto10 = function(){
				cyclePhoto("9");
			}
			nextFoto11 = function(){
				cyclePhoto("10");
			}
			nextFoto12 = function(){
				cyclePhoto("11");
			}
			nextFoto13 = function(){
				cyclePhoto("12");
			}
			nextFoto14 = function(){
				cyclePhoto("13");
			}
			nextFoto15 = function(){
				cyclePhoto("14");
			}
			nextFoto16 = function(){
				cyclePhoto("15");
			}
			nextFoto17 = function(){
				cyclePhoto("16");
			}
			nextFoto18 = function(){
				cyclePhoto("17");
			}
			nextFoto19 = function(){
				cyclePhoto("18");
			}
			nextFoto20 = function(){
				cyclePhoto("19");
			}
			nextFoto21 = function(){
				cyclePhoto("20");
			}
			nextFoto22 = function(){

				cyclePhoto("21");
			}
			nextFoto23 = function(){
				cyclePhoto("22");
			}
			nextFoto24 = function(){
				cyclePhoto("23");
			}
			nextFoto25 = function(){
				cyclePhoto("24");
			}
			nextFoto26 = function(){
				cyclePhoto("25");
			}
			nextFoto27 = function(){
				cyclePhoto("26");
			}
			nextFoto28 = function(){
				cyclePhoto("27");
			}
			nextFoto29 = function(){
				cyclePhoto("28");
			}
			nextFoto30 = function(){
				cyclePhoto("29");
			}
			nextFoto31 = function(){
				cyclePhoto("30");
			}
			nextFoto32 = function(){
				cyclePhoto("31");
			}
			nextFoto33 = function(){
				cyclePhoto("32");
			}
			nextPhoto = function(){
				if(photoId == (photoArray.length - 1)){
					photoId = 0;
				} else {
					photoId++;
				}
				cyclePhoto(photoId);
			}

			prevPhoto = function(){
				if(photoId == 0){
					photoId = photoArray.length - 1;
				} else {
					photoId--;
				}
				cyclePhoto(photoId);
			}

			changeElementClass = function(objId,setClass) {
				document.getElementById(objId).className = setClass;
			}

			cyclePhoto = function(photoId){
				
				for (u=1; u <= 33; u++) {	
					if (photoId ==u-1) {id5 = eval('\'zahl'+u+'\''); changeElementClass(id5, 'aktiviert')}
						else {id5 = eval('\'zahl'+u+'\''); changeElementClass(id5, '')}}
						
				API.LoadImg.setSrc("slideshow/img/andrea-loader.gif");
				
				API.LinkContainer.displayHide();
				API.myLinkContainer.displayHide();
				
				API.Photo.hide();
				API.Photo.setOpacity(0);
				API.CaptionBlock.hide();
				
				var wNew = photoArray[photoId][1];
				var hNew = "345" // Fester Wert für Wyniger.de
				//var kunde = photoArray[photoId][2];
				
				var wCur = API.slide_Container.getWidth() - borderSize;
				var hCur = "345"; //API.slide_Container.getHeight() - borderSize;
				
				//setTimeout('API.slide_Container.tweenTo(easeInQuad, ['+wCur+', '+hCur+'], ['+wNew+','+hNew+'], 7)',300);
				setTimeout('API.LinkContainer.sizeTo('+wNew+','+hNew+')',300);
				setTimeout('API.PrevLink.sizeTo('+wNew/2+','+hNew+')',300);
				setTimeout('API.NextLink.sizeTo('+wNew/2+','+hNew+')',300);

				
				var newPhoto = photoDir + photoArray[photoId][0];
				
				API.Photo.setSrc(newPhoto);		
				API.Photo.sizeTo(wNew,hNew);
				
				API.NextLink.setHref("#" + (photoId+1));
				API.PrevLink.setHref("#" + (photoId+1));
				
				//API.Counter.setInnerHtml("&nbsp;("+(photoId+1)+"/"+photoNum+")");
				//(photoArray[photoId][2] !== "") ? API.Kunde.setInnerHtml(""+photoArray[photoId][2]+" ") : API.Kunde.setInnerHtml("");
				(photoArray[photoId][3] !== "") ? API.Caption.setInnerHtml(photoArray[photoId][3]) : API.Caption.setInnerHtml("");
							
				document.getElementById('Photo').onload = initFade;
	
				document.getElementById('NextLink').onclick = falsify;
				document.getElementById('PrevLink').onclick = falsify;	
				document.getElementById('myNextLink').onclick = falsify;
				document.getElementById('myPrevLink').onclick = falsify;					
			}

			function loadAPI(){
				
				if (start != "JA") {
				API.slide_Container	= new HTMLobj('slide_Container');
				API.Photo			= new HTMLobj('Photo');
				API.PhotoContainer	= new HTMLobj('PhotoContainer');
				API.myLinkContainer	= new HTMLobj('myLinkContainer');
				API.LinkContainer	= new HTMLobj('LinkContainer');
				API.PrevLink		= new HTMLobj('PrevLink');
				API.NextLink		= new HTMLobj('NextLink');
				//API.zahl1			= new HTMLobj('zahl1');
				//API.zahl2			= new HTMLobj('zahl2');
				//API.zahl3			= new HTMLobj('zahl3');
				//API.zahl4			= new HTMLobj('zahl4');
				API.myPrevLink		= new HTMLobj('myPrevLink');
				API.myNextLink		= new HTMLobj('myNextLink');
				API.CaptionBlock	= new HTMLobj('CaptionBlock');
				//API.Counter		= new HTMLobj('Counter');
				API.Caption		= new HTMLobj('Caption');
				API.Kunde		= new HTMLobj('kundenbox');
				API.LoadImg			= new HTMLobj('LoadImg');
				start = "JA";
				cyclePhoto(photoId);
				}
			}

			if (go=="ja" && start != "JA") {
			setInterval('loadAPI()', 0);  
			// Abfangen von Ladeproblemen mit IE8.0
			if (document.all && ie8 == "") {setTimeout('initFade()', 100);}
			}
