/*
	Javascript-Klasse für den Slideshow-Export
*/
/*
var SlideShow = function()
{
	this.Container	= gE(arguments[0]);
	this.ImageDiv	= mE('div');
	this.ImageDiv.className = 'slideshowimage';
	this.BottomDiv 	= mE('div');
	this.CaptionDiv	= mE('div');
	this.CaptionDiv.className = 'slideshowcaption';
	this.NavigationDiv = mE('div');
	this.NavigationDiv.className = 'slideshownavigation';
	this.NextDiv	= mE('div');
	this.NextDiv.className = 'slideshownext';
	this.PrevDiv	= mE('div');
	this.PrevDiv.className = 'slideshowprev';
	this.Container.appendChild(this.ImageDiv);
	this.Container.appendChild(this.BottomDiv);
	this.NavigationDiv.appendChild(this.PrevDiv);
	this.NavigationDiv.appendChild(this.NextDiv);
	this.BottomDiv.appendChild(this.NavigationDiv);
	this.BottomDiv.appendChild(this.CaptionDiv);
	this.Image		= new Image();
	this.ImageLoad	= new Image();
	this.Index		= 0;
	this.UrlPrefix	= null;
	this.Url		= null;
	this.Timeout	= false;
	var Resizeto 	= false;
	var Seconds	 	= 0;
	var Images		= new Array();
	var Captions	= new Array();
	var Mode		= 'fill';
	this.Of			= ' von ';
}

SlideShow.prototype.Create = function()
{
	this.UrlPrefix 	= this.Resizeto ? '../../resources/php/image_preview.php?w='+this.Resizeto[0]+'&h='+this.Resizeto[1]+'&m='+this.Mode+'&url=../' : '../';
	this.Url	   	= this.UrlPrefix+this.Images[this.Index];
	this.Image.src 	= this.Url;
	this.Image.SlideShow = this;
	this.ImageDiv.appendChild(this.Image);
	this.LoadCaption();
	this.LoadNextImage();
	this.Image.onclick = function()
	{
		this.SlideShow.ShowNextImage();
	}
	this.NextDiv.SlideShow = this;
	this.NextDiv.onclick = function()
	{
		this.SlideShow.ShowNextImage();
	}
	this.PrevDiv.SlideShow = this;
	this.PrevDiv.onclick = function()
	{
		this.SlideShow.ShowPreviousImage();
	}
	
	
	if(this.Seconds)
		this.Timeout = window.setTimeout(function(s) { s.ShowNextImage(); }, this.Seconds * 1000, this);
}

SlideShow.prototype.LoadNextImage = function()
{
	i = this.Index < this.Images.length-1 ? this.Index+1 : 0;
	this.ImageLoad.src = this.UrlPrefix+this.Images[i];
}

SlideShow.prototype.ShowNextImage = function()
{
	this.Index = this.Index < this.Images.length-1 ? this.Index+1 : 0;
	this.Image.src = this.UrlPrefix+this.Images[this.Index];
	this.LoadCaption();
	this.LoadNextImage();
	window.clearTimeout(this.Timeout);
	if(this.Seconds)
		this.Timeout = window.setTimeout(function(s) { s.ShowNextImage(); }, this.Seconds * 1000, this);
}

SlideShow.prototype.LoadCaption = function()
{
	cap = '<p class="slideshownummer">Bild '+(this.Index+1)+this.Of+this.Images.length+'</p>';
	if(unescape(this.Captions[this.Index]))
		cap += '<p class="pipe">|</p>'+unescape(this.Captions[this.Index]);
	this.CaptionDiv.innerHTML = cap;
}

SlideShow.prototype.ShowPreviousImage = function()
{
	this.Index = this.Index > 0 ? this.Index-1 : this.Images.length -1;
	this.Image.src = this.UrlPrefix+this.Images[this.Index];
	this.LoadCaption();
	window.clearTimeout(this.Timeout);
	if(this.Seconds)
		this.Timeout = window.setTimeout(function(s) { s.ShowNextImage(); }, this.Seconds * 1000, this);
}
*/