var scrollStart = 0;var position	= 1;function nextItem() {	var count = $('rel_projects');	var liNodes = count.getElementsByTagName("li");		if (scrollStart == 0 && position < (liNodes.length - 1))	{		new Effect.Move ($('rel_projects'),{ x: -397, y: 0, mode: 'relative', afterFinish: stopScroll, beforeStart: startScroll});		position = position + 1;	}}function prevItem() {	if (scrollStart == 0 && position > 1)	{		new Effect.Move ($('rel_projects'),{ x: 397, y: 0, mode: 'relative', afterFinish: stopScroll, beforeStart: startScroll });		position = position - 1;	}}function startScroll() {	scrollStart = 1;}function stopScroll() {	scrollStart = 0;}function toggleClass(id){   if ($('blok_' + id).className == 'blok_item_active') {     $('blok_' + id).className = 'blok_item';	 $(id).style.display = 'none';   } else {     $('blok_' + id).className = 'blok_item_active';	 $(id).style.display = 'block';   }}/** Toegevoegd voor gerelateerde projecten  **/// scroll in div (overflow=hidden)// scroll in div (overflow=hidden)function moveTo(container, move) {	// Current div put 1 to default	if(!location.hash)	{		var div = 1;	} 	else	{		var div = location.hash;		div = div.replace('#', '');		div = parseInt(div);	}	var next	= 0;	var proceed = true;	var element = null;		if (move > 0) {		next = div + 3;		if ($(container + '-' + next) === null)			proceed = false;	} else if (move < 0) {		next = div - 1;		if ($(container + '-' + next) === null)			proceed = false;	}	if (proceed === true) {			div += move;		location.hash = div;				element = container + '-' + div;		Position.prepare();	  	container_x = Position.cumulativeOffset($(container))[0]	  	element_x = Position.cumulativeOffset($(element))[0]	  	new Effect.Scroll(container, {x:(element_x-container_x), y:0});	}	}function goTo() {	if(location.hash)	{		var num = location.hash;		num = num.replace('#', '');		element = 'case-' + num;		Position.prepare();	  	container_x = Position.cumulativeOffset($('case'))[0]	  	element_x = Position.cumulativeOffset($(element))[0]	  	new Effect.Scroll('case', {x:(element_x-container_x), y:0});	  	div = num;	}}// scroll effectEffect.Scroll = Class.create();Object.extend(Object.extend(Effect.Scroll.prototype, Effect.Base.prototype), {  initialize: function(element) {    this.element = $(element);    var options = Object.extend({      x:    0,      y:    0,      mode: 'absolute'    } , arguments[1] || {}  );    this.start(options);  },  setup: function() {    if (this.options.continuous && !this.element._ext ) {      this.element.cleanWhitespace();      this.element._ext=true;      this.element.appendChild(this.element.firstChild);    }       this.originalLeft=this.element.scrollLeft;    this.originalTop=this.element.scrollTop;       if(this.options.mode == 'absolute') {      this.options.x -= this.originalLeft;      this.options.y -= this.originalTop;    } else {       }  },  update: function(position) {       this.element.scrollLeft = this.options.x * position + this.originalLeft;    this.element.scrollTop  = this.options.y * position + this.originalTop;  }});
