function LoadSlideshowImages(Photo)
{
	currentPhoto = Photo;
	secondPhoto = Photo+1;
	firstcall = true;
	slide_length = Images.length;

	if(secondPhoto == slide_length)
		secondPhoto = 0;

	var SlideContainerStyle = document.getElementById('LOCR_SLIDE_CONTAINER').style;
	var SlideCreatedStyle = document.getElementById('LOCR_SLIDE_CREATED').style;
	var SlideMapStyle = document.getElementById('map').style;
	var SlideWikipedia = document.getElementById('LOCR_SLIDE_WIKIPEDIA');

	currentOpacity[currentPhoto] = 99;

	// höhe der Karte festlegen
	if(MaxPercentHeight == 0)
		SlideMapStyle.height = (ScreenHeight-37)+'px'; else
		SlideMapStyle.top = Math.floor(ScreenWidth/minImageRatio)+35+'px';

	setContainerStyle();

	MaxWidthForPhoto = ScreenWidth - SlideContainerStyle.left.replace('px','') + 2;
	RatioForPhoto = (MaxWidthForPhoto) / (ScreenHeight-37);

	for(var i = 0; i < Images.length; i++)
	{			
		if(i != currentPhoto)
			currentOpacity[i] = 0;

		var Image = Images[i];
		var ImageObject = document.createElement('img');
		var ImageName = document.createAttribute("id");
		var ImageSrc = document.createAttribute("src");

		ImageName.nodeValue = i;
		ImageObject.setAttributeNode(ImageName);

		ImageSrc.nodeValue = Image.src;
		ImageObject.setAttributeNode(ImageSrc);

		ImageObject.style.position = 'absolute';
   		ImageObject.style.left = '0px';
   		ImageObject.style.top = '0px';

		var PhotoWidth = Image.width;
		var PhotoHeight = Image.height;
		var PhotoRatio = PhotoWidth / PhotoHeight;

		if(MaxPercentHeight != 0) // Panorama-Ansicht
		{
			ImageObject.style.width = ScreenWidth+'px';
			ImageObject.style.height = Math.floor(ScreenWidth/PhotoRatio)+'px';
		} else
		if(PhotoRatio > RatioForPhoto && maxRatioWidth > MaxWidthForPhoto)
		{
			ImageObject.style.width = (ScreenWidth-MinMapWidth)+'px';
			ImageObject.style.height = Math.floor(MaxWidthForPhoto/PhotoRatio)+'px';
		} else
		if(PhotoRatio > RatioForPhoto && maxRatioWidth <= MaxWidthForPhoto)
		{
			if(ImageSize == LOCR_FILE_IDENTIFIER_MEDIUM)
			{
				ImageObject.style.width = MaxWidthForPhoto+'px';
				ImageObject.style.height = Math.floor(ImageObject.style.width.replace('px','')/PhotoRatio)+'px';
			} else
			{
				ImageObject.style.width = PhotoWidth+'px';
				ImageObject.style.height = PhotoHeight+'px';
			}
		} else
		if(PhotoRatio <= RatioForPhoto)
		{
			ImageObject.style.height = (ScreenHeight-37)+'px';
			ImageObject.style.width = Math.floor(PhotoRatio * (ScreenHeight-37))+'px';
		}

		if(document.all)
			ImageObject.style.filter = "alpha(opacity=100)";
		else
			ImageObject.style.MozOpacity = .99;

   		if(i == currentPhoto)
   			ImageObject.style.visibility = 'visible';
   		else
   			ImageObject.style.visibility = 'hidden';

   		document.getElementById('LOCR_SLIDE_CONTAINER').appendChild(ImageObject);

		// Hidden Input-Field for Wiki Entries
   		var InputObject = document.createElement('input');
		var InputId = document.createAttribute("id");
		var InputValue = document.createAttribute("value");
		var InputType = document.createAttribute("type");
		var InputName = document.createAttribute("name");

		InputId.nodeValue = 'Wiki_'+i;
		InputType.nodeValue = 'hidden';
		InputValue.nodeValue = Images[i].wiki.toString();
		InputName.nodeValue = Images[i].id.toString();
		InputObject.setAttributeNode(InputId);
		InputObject.setAttributeNode(InputType);
		InputObject.setAttributeNode(InputValue);
		InputObject.setAttributeNode(InputName);
		document.getElementById('LOCR_SLIDE_CONTAINER').appendChild(InputObject);
	}

	document.getElementById("loadicon").style.left = SlideContainerStyle.left;

	if(MinMapWidth == 0 || MaxPercentHeight != 0)
		var VirtualMinMapWidth = MinMapWidthBackup; else
		var VirtualMinMapWidth = 0;
	var ContainerLeft = SlideContainerStyle.left.split('px')[0];
	document.getElementById("LOCR_SLIDE_NAVIGATION").style.width = ScreenWidth+'px';
	SlideWikipedia.style.width = (ScreenWidth-42-parseInt(ContainerLeft)-VirtualMinMapWidth)+'px';
	SlideWikipedia.style.left = (parseInt(ContainerLeft)+VirtualMinMapWidth)+'px';

	var WikiLength = document.getElementById('Wiki_0').value.length;
	var WikiWidth = SlideWikipedia.style.width.replace('px','');
	var PhotoLink = ' <a href="/photo_detail.php?id='+document.getElementById('Wiki_0').getAttribute('name')+'">...</a>';
	if(WikiWidth/3 < WikiLength)
	{
		var maxLengthForWiki = WikiWidth / 3;
		var WikiToShow = document.getElementById('Wiki_0').value.slice(0, maxLengthForWiki);
		SlideWikipedia.innerHTML = WikiToShow+PhotoLink;
	} else
		SlideWikipedia.innerHTML = document.getElementById('Wiki_0').value+PhotoLink;

	document.getElementById("LOCR_SLIDE_COUNTER").style.right = (ScreenWidth-parseInt(ContainerLeft)-VirtualMinMapWidth)+'px';
	document.getElementById("LOCR_SLIDE_COUNTER").style.visibility = 'visible';

	mInterval = setInterval("FadeSlides()", intervall);
}
