<!--
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		gbmenu_nav05 = newImage("/images/rozen2_05.jpg");
		preloadFlag = true;
	}
}

function open_window(link,w,h) //opens new window
{
	var win = "width="+w+",height="+h+",menubar=no,location=no,scrollbars=no";
	newWin = window.open(link,'newWin',win);
	newWin.focus();
}

function check(vraag,locatie)
{
  if(confirm(vraag))
  {
  document.location.href=locatie;
  }
}
// -->
function ClassSlides()
{
	this.CurrentImage = 0
	this.steps = 10
	this.timeout = false

	this.ClickThumb = function(n)
	{
		document.getElementById('Thumb' + this.CurrentImage).className = 'thumb'
		document.getElementById('Thumb' + n).className = 'on'
		this.CurrentImage = n
		document.getElementById('PhotoXL').src = ArrayPhotos[n].replace('thumbnails', '480')
		this.From = document.getElementById('ThumbnailDiv').scrollLeft
		//this.To = n*92 - 184
		this.To = n*92 - 90
		this.DoStep(0)
	}

	this.DoStep = function(step)
	{
		step ++
		document.getElementById('ThumbnailDiv').scrollLeft = 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 > ArrayPhotos.length - 1) Next = ArrayPhotos.length - 1
		this.ClickThumb(Next)
	}

	this.Factor = function(f)
	{
		return .50 - Math.cos(f * Math.PI) * .5
	}

	this.Initialize = function()
	{
		if (document.getElementById('ThumbnailDiv'))
		{
			var sHtml = '<table cellpadding=0 cellspacing=0 style="margin-top:10px; margin-left:18px;"><tr>'
			for(var i=0; i<ArrayPhotos.length; i++)
			{
				sHtml += '<TD height=74 width=110><a href="javascript:Slides.ClickThumb(' + i + ')"><img'
				if (i == 0)
				{
					sHtml += ' class="on"'
				}
				else
				{
					sHtml += ' class="thumb"'
				}
				sHtml += ' id="Thumb' + i + '" src="' + ArrayPhotos[i] + '" height=74 /></a></td><Td width=6><img src=/images/spacer.gif width=6></td>'
			}
			sHtml += '</tr></table>'
			document.getElementById('ThumbnailDiv').innerHTML = sHtml
			document.getElementById('PhotoXL').src = ArrayPhotos[0].replace('thumbnails', '480')
		}
		else
		{
			setTimeout('Slides.Initialize()', 250)
		}
	}
}


