function ClassSlides()
{
	this.steps = 10
	this.timeout = false
	this.DoubleClickUrl = ''

	this.ClickThumb = function(n)
	{
		var foto = ArrayThumbs[n]
		var omschrijving = 'Foto'
		if (foto.indexOf('#') > -1)
		{
			omschrijving = foto.substring(foto.indexOf('#')+1)
			while(omschrijving.indexOf("'") > -1) omschrijving = omschrijving.replace("'", "&#8217;")
			foto = foto.substring(0, foto.indexOf('#'))
		}
		document.getElementById('Thumb' + this.CurrentImage).className	= 'thumb'
		document.getElementById('Thumb' + n).className = 'on'
		this.CurrentImage = n
		document.getElementById('PhotoXL').src = ArrayImages[n];
		document.getElementById('PhotoXL').title = omschrijving
		document.getElementById('PhotoXL').alt = omschrijving

		this.From = document.getElementById('ThumbnailDiv').scrollTop
		this.To = n*92 - 184
		this.DoStep(0)
		this.CallStatistics()
	}

	this.DoStep = function(step)
	{
		step ++
		document.getElementById('ThumbnailDiv').scrollTop = this.Factor(step / this.steps) * (this.To - this.From) + this.From
		if (this.timeout) clearTimeout(this.timeout)
		if (step < this.steps) this.timeout = setTimeout('Slides.DoStep(' + step + ')', 10)
	}

	this.Up = function()
	{
		var Next = this.CurrentImage - 1
		if (Next < 0) Next = 0
		this.ClickThumb(Next)
	}

	this.Down = function()
	{
		Next = this.CurrentImage + 1
		if (Next > ArrayImages.length - 1) Next = ArrayImages.length - 1
		this.ClickThumb(Next)
	}

	this.Factor = function(f)
	{
		return .5 - Math.cos(f * Math.PI) * .5
	}

	this.Initialize = function()
	{

		if (document.getElementById('ThumbnailDiv'))
		{
			this.CurrentImage = 0
			if (self.location.href.indexOf('imgnr=') > -1)
			{
				var url = self.location.href
				var start = url.indexOf('imgnr=')
				var end = url.indexOf('&', start)
				if (end == -1) end = url.length
				this.CurrentImage = parseInt(url.substring(start+6, end))
			}
			this.To = this.CurrentImage*92 - 184

			var sHtml = ''
			for(var i=0; i<ArrayThumbs.length; i++)
			{
				var foto = ArrayThumbs[i]
				var omschrijving = 'Foto'
				if (foto.indexOf('#') > -1)
				{
					omschrijving = foto.substring(foto.indexOf('#')+1)
					while(omschrijving.indexOf("'") > -1) omschrijving = omschrijving.replace("'", "&#8217;")
					foto = foto.substring(0, foto.indexOf('#'))
				}

				if (i == this.CurrentImage)
				{
					document.getElementById('PhotoXL').src = ArrayImages[i]
					document.getElementById('PhotoXL').alt = omschrijving
					document.getElementById('PhotoXL').title = omschrijving
				}

				sHtml += '<div class="bg_thumbs"><a href="javascript:Slides.ClickThumb(' + i + ')"><img'
				if (i == this.CurrentImage)
				{
					sHtml += ' class="on"'
				}
				else
				{
					sHtml += ' class="thumb"'
				}
				sHtml += ' id="Thumb' + i + '" src="' + foto + '" alt="' + omschrijving + '" title="' + omschrijving + '" /></a></div>'
			}

			document.getElementById('ThumbnailDiv').innerHTML = sHtml
			setTimeout("document.getElementById('ThumbnailDiv').scrollTop = " + this.To, 1)
		}
		else
		{
			setTimeout('Slides.Initialize()', 250)
		}
	}

	this.CallStatistics = function()
	{
		if (!document.getElementById("Stats")) return
		var Url = this.DoubleClickUrl
		document.getElementById("Stats").src = Url
	}
}