function ImageScroller(f_var, f_id, f_size, f_move)
{
	var oDiv = null;

	// Constructor
	if(oDiv = document.getElementById(f_id))
	{
		this.__var = f_var;
		this.__id = f_id;
		this.__size = f_size;
		this.__move = f_move;
		this.__index = 0;
		this.__nav = null;
		this.__images = new Array();


		// Setup subnav
		this.__nav = document.createElement('div');
		this.__nav.id = 'imagescroller_nav';
		oDiv.appendChild(this.__nav);


		// Count images in div
		this.__images = oDiv.getElementsByTagName('img');

		for(var i = 0; i < this.__images.length; i++)
		{
			if(i >= this.__size)
			{
				this.__images[i].className = 'hide';
			}
		}
	}

	this.prev = function()
	{
		this.__index -= f_move;

		if(this.__index < 0)
		{
			this.__index = 0;
		}

		for(var i = 0; i < this.__images.length; i++)
		{
			if((i < this.__index) || (i >= this.__index + this.__size))
			{
				this.__images[i].className = 'hide';
			}
			else
			{
				this.__images[i].className = '';
			}
		}

		this.drawNav();
	}

	this.next = function()
	{
		this.__index += f_move;

		if(this.__index >= this.__images.length)
		{
			var r = (this.__images.length % this.__move);

			if(r < 1)
			{
				r = this.__move;
			}

			this.__index = this.__images.length - r;
		}

		for(var i = 0; i < this.__images.length; i++)
		{
			if((i < this.__index) || (i >= (this.__index + this.__size)))
			{
				this.__images[i].className = 'hide';
			}
			else
			{
				this.__images[i].className = '';
			}
		}

		this.drawNav();
	}

	this.drawNav = function()
	{
		var html = '';

		if(this.__index > 0)
		{
			html += '<span class="prev" onclick="javascript: ' + this.__var + '.prev();">Vorige</span>';
		}

		if((this.__index + this.__move) < this.__images.length)
		{
			html += '<span class="next" onclick="javascript: ' + this.__var + '.next();">Volgende</span>';
		}

		this.__nav.innerHTML = html;
	}

	this.drawNav();
}<!-- Server time: 0.0841 s -->
