function RefreshSlideView()
{
	var CurrentWidth = ScreenWidth;
	var CurrentHeight = ScreenHeight;
	ScreenWidth = ScreenDimension()[0];
	ScreenHeight = ScreenDimension()[1];
	
	if(ScreenWidth == CurrentWidth && ScreenHeight == CurrentHeight)
	{
		return;
	}
	//alert('CurrentWidth: '+CurrentWidth+' - NewWidth: '+ScreenWidth+' - CurrentHeight: '+CurrentHeight+' - NewHeight: '+ScreenHeight);
	
	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");

	MaxWidthForPhoto = ScreenWidth;
	RatioForPhoto = (MaxWidthForPhoto) / (ScreenHeight-37);
	if(minImageRatio/2 >= RatioForPhoto)
	{
		MaxPercentHeight = maxRatioHeight * 100 / (ScreenHeight-37);
		SlideMapStyle.height = ScreenHeight-Math.floor(ScreenWidth/minImageRatio)-37+'px';
		SlideMapStyle.width = ScreenWidth+'px';
		SlideMapStyle.top = Math.floor(ScreenWidth/minImageRatio)+35+'px';
	} else
	{
		MaxWidthForPhoto = ScreenWidth - SlideContainerStyle.left.replace('px','');
		SlideMapStyle.top = 35+'px';
		SlideMapStyle.height = ScreenHeight-37+'px';
		MaxPercentHeight = 0;
	}

	SetMapOverlay();

	setContainerStyle();

	MaxWidthForPhoto = ScreenWidth - SlideMapStyle.width.replace('px','');
	RatioForPhoto = (MaxWidthForPhoto) / (ScreenHeight-37);

	for(i = 0; i < 4; i++) // geladene Bilder anpassen
	{
		if(document.getElementById(i))
		{
			var ImageObject = document.getElementById(i);

			var Photo = document.getElementById(i);
			var PhotoWidth = Photo.style.width.replace('px','');
			var PhotoHeight = Photo.style.height.replace('px','');
			var PhotoRatio = PhotoWidth / PhotoHeight;

			if(PhotoRatio > RatioForPhoto && maxRatioWidth > MaxWidthForPhoto)
			{
				if(MaxPercentHeight == 0)
				{
					ImageObject.style.width = MaxWidthForPhoto+'px';
					ImageObject.style.height = Math.floor(MaxWidthForPhoto / PhotoRatio)+'px';
				} else // Panorama-Ansicht
				{
					ImageObject.style.width = ScreenWidth+'px';
					ImageObject.style.height = Math.floor(ScreenWidth / PhotoRatio)+'px';
				}
			} else
			if(PhotoRatio > RatioForPhoto && maxRatioWidth <= MaxWidthForPhoto)
			{
				if(MaxPercentHeight == 0)
				{
					ImageObject.style.width = MaxWidthForPhoto+'px';
					ImageObject.style.height = Math.floor(MaxWidthForPhoto/PhotoRatio)+'px';
				} else // Panorama-Ansicht
				{
					ImageObject.style.width = ScreenWidth+'px';
					ImageObject.style.height = Math.floor(ScreenWidth/PhotoRatio)+'px';
				}
			} else
			if(PhotoRatio <= RatioForPhoto)
			{
				if(MaxPercentHeight == 0)
				{
					ImageObject.style.height = (ScreenHeight-37)+'px';
					ImageObject.style.width = Math.floor(PhotoRatio * (ScreenHeight-37))+'px';
				} else // Panorama-Ansicht
				{
					ImageObject.style.width = ScreenWidth+'px';
					ImageObject.style.height = Math.floor(ScreenWidth/PhotoRatio)+'px';
				}
			}
			var ContainerLeft = document.getElementById("LOCR_SLIDE_CONTAINER").style.left.split('px')[0];

			if(MinMapWidth == 0 || MaxPercentHeight != 0)
				var VirtualMinMapWidth = MinMapWidthBackup; else
				var VirtualMinMapWidth = 0;
			document.getElementById("LOCR_SLIDE_NAVIGATION").style.width = (ScreenDimension()[0])+'px';

			SlideWikipedia.style.width = ((ScreenDimension()[0])-42-parseInt(ContainerLeft)-VirtualMinMapWidth)+'px';
			SlideWikipedia.style.left = (parseInt(ContainerLeft)+VirtualMinMapWidth)+'px';
			if(document.getElementById(i).style.visibility == 'visible' && document.getElementById(i).style.opacity > 0.5)
			{
				var PhotoLink = ' <a href="/photo_detail.php?id='+document.getElementById('Wiki_'+i).getAttribute('name')+'">...</a>';
				var WikiLength = document.getElementById('Wiki_'+i).value.length;
				var WikiWidth = SlideWikipedia.style.width.replace('px','');
				if(WikiWidth/3 < WikiLength)
				{
					var maxLengthForWiki = WikiWidth / 3;
					var WikiToShow = document.getElementById('Wiki_'+i).value.slice(0, maxLengthForWiki);
					SlideWikipedia.innerHTML = WikiToShow+PhotoLink;
				} else
					SlideWikipedia.innerHTML = document.getElementById('Wiki_'+i).value+PhotoLink;
			}

			document.getElementById("LOCR_DEBUG").style.left = ContainerLeft+'px';
			document.getElementById("LOCR_SLIDE_COUNTER").style.right = ((ScreenDimension()[0])-parseInt(ContainerLeft)-parseInt(VirtualMinMapWidth))+'px';
		}
	}
	//Debug(PhotoWidth, PhotoHeight, ImageObject);
	LoadSlideshowMap();
}