			var nCurrent = 0
			nThumbWidth = 80
			nCurrentPosition = 0
			oInterval = false
			var Vorige = false
			var Move = true
			var aantalstappen = (navigator.appVersion.indexOf('MSIE') > -1 ? 15 : 8)
			var	bBezig = false
			var oTimeout = false
			var bPlaying = false
			
			
			function GaNaar(n)
			{
				if ( bBezig ) return
				if ( n == nCurrent ) return
				nCurrent = n
				bBezig = true
				Vorige = Current
				Current = aImages[nCurrent]
				Current.style.zIndex = 1
				Current.style.filter = 'alpha(opacity=0)'
				Current.style.MozOpacity = '0'
				Current.style.left = '0px'
				Vorige.style.zIndex = 0
				nDestination = nCurrent * nThumbWidth
				moveThumbs()
				Fade(0)
			}
			
			function Fade(stap)
			{
				stap ++
				Current.style.filter = 'alpha(opacity=' + Math.floor(100 * stap / aantalstappen) + ')'
				Current.style.MozOpacity = Math.floor(100 * stap / aantalstappen) / 100
				if ( Move )
				{
					factor = 1-Math.cos(Math.PI/2 * stap/aantalstappen)
					factor = Math.floor(15 * factor)
					Vorige.style.top = -factor + 'px'
					Vorige.style.left = -factor + 'px'
					Vorige.style.width = 350 + 2*factor + 'px'
					Vorige.style.height = 262 + 2*factor + 'px'
				}
				if ( stap != aantalstappen )
				{
					setTimeout('Fade(' + stap + ')', 30)
				}
				else
				{
					Vorige.style.left = '-1000px'
					Current.style.filter = ''
					if ( Move )
					{
						Vorige.style.top = '0px'
						Vorige.style.width = '350px'
						Vorige.style.height = '262px'
					}
					bBezig = false
				}
			}
			
			function Start()
			{
				bMultiple = (aImages.length>1)
				for ( i=0; i<aImages.length; i++)
				{
					oImg = document.createElement('IMG')
					oImg.style.width = 350 + 'px'
					oImg.style.height = 262 + 'px'
					oImg.src = aImages[i]
					oImg.style.left = '-1000px'
					document.getElementById('Rel').appendChild(oImg)
					if ( bMultiple ) document.getElementById('ss-root-location').innerHTML += '<img id="slide' + i + '" onclick="stop();GaNaar(' + i + ')" src="' + aImages[i].replace('_slideshow', '_120') + '"  class="ss-thumbs" style="left:' + 100*i + '%"/>'
					aImages[i] = oImg
				}
				Current = aImages[nCurrent]
				Current.style.left = '0px'
				

				if ( bMultiple ) setTimeout('play()',2500)
			}
			
			function moveThumbs()
			{

				bMoving = true

				if ( nDestination==nCurrentPosition )
				{
					bMoving = false
					return
				}

				if ( nCurrentPosition < nDestination )
				{
					nCurrentPosition += Math.round((nDestination - nCurrentPosition)/3)
				}
				else
				{
					nCurrentPosition -= Math.round((nCurrentPosition - nDestination)/3)
				}

				document.getElementById("ss-root-location").style.left = 245 - nCurrentPosition + "px"
				setTimeout("moveThumbs("+nDestination+")",10)
			}

			function play()
			{
				if ( bPlaying ) return
				bPlaying = true
				if ( !oTimeout ) nextSlide()
				//document.getElementById('ss-btn-play').style.backgroundPosition = "0 -19px"
				//document.getElementById('ss-btn-pause').style.backgroundPosition = "0 0"
			}
			
			function stop()
			{
				if ( !bPlaying ) return
				bPlaying = false
				if ( oTimeout )
				{
					clearTimeout(oTimeout)
					oTimeout = false
				}
				//document.getElementById('ss-btn-pause').style.backgroundPosition = "0 -19px";
				//document.getElementById('ss-btn-play').style.backgroundPosition = "0 0";
			}

			function nextSlide()
			{
				if ( nCurrent >= aImages.length-1 ) nCurrent = -1
				GaNaar(nCurrent+1)
				if ( bPlaying ) 
				{
					if ( oTimeout )
					{
						clearTimeout(oTimeout)
						oTimeout = false
					}
					oTimeout = setTimeout("nextSlide()", 2500)
				}
			}
			
			function previousSlide()
			{
				if ( nCurrent == 0 ) nCurrent = aImages.length
				GaNaar(nCurrent-1)
			}

			function mouseOverBtn(btn)
			{
				//btn.style.backgroundPosition = "0 -19px";
			}

			function mouseOutBtn(btn)
			{
				if(bPlaying&&btn.id=='ss-btn-play'||!bPlaying&&btn.id=='ss-btn-pause')return;
				//btn.style.backgroundPosition = "0 0";
			}
			
