/* vacatures/overview.html */
function changeImg(src){
	document.getElementById('img').src= src;
}

/* skins/default.html */
var clipTop = 0;
var clipWidth = 75;
var clipBottom = 288;
var topper = 292;
var lyrheight = 0;
var time,amount,theTime,theHeight,DHTML;

function init()
{
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var x = new getObj('tst');
	if (document.layers)
	{
		lyrheight = x.style.clip.bottom;
		lyrheight += 20;
		x.style.clip.top = clipTop;
		x.style.clip.left = 0;
		x.style.clip.right = clipWidth;
		x.style.clip.bottom = clipBottom;
	}
	else if (document.getElementById || document.all)
	{
		try {
			lyrheight = x.obj.offsetHeight;
			var clipstring = 'rect('+clipTop+'px '+clipWidth+'px '+clipBottom+'px 0px)';
			x.style.clip = clipstring;
		} catch (e) {
		}
	}
}

function scrollayer(layername,amt,tim)
{
	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;
	realscroll();
}

function stopScroll()
{
	if (time) clearTimeout(time);
}

function realscroll()
{
	if (!DHTML) return;
	clipTop += amount;
	clipBottom += amount;
	topper -= amount;
	if (clipTop < 0 || clipBottom > lyrheight)
	{
		clipTop -= amount;
		clipBottom -= amount;
		topper += amount;
		return;
	}
	if (document.getElementById || document.all)
	{
		clipstring = 'rect('+clipTop+'px '+clipWidth+'px '+clipBottom+'px 0px)'
		thelayer.style.clip = clipstring;
		thelayer.style.top = topper + 'px';
	}
	else if (document.layers)
	{
		thelayer.style.clip.top = clipTop;
		thelayer.style.clip.bottom = clipBottom;
		thelayer.style.top = topper;
	}
	time = setTimeout('realscroll()',theTime);
}

function vis(val)
{
	if (!DHTML) return;
	var f = new getObj('example');
	f.style.visibility = val;
}

function getObj(name)
{
  if (document.getElementById(name))
  {
    this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
    this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

/* realisaties/overview.html */
function initPictures(){
	if(img_count > 5){
		for(i=5;i<img_count;i++){
			timg = document.getElementById('small_img_'+i);
			timg.style.display = "none";
		}
	}
}

function showhide(btn,display){
	document.getElementById(btn).style.display = display;
}

function goUp_(){
	if(current_img > 4){
		document.getElementById('small_img_'+current_img).style.display = "none";
		document.getElementById('small_img_'+(current_img-5)).style.display = "block";
		current_img -= 1;
	}
	if(current_img == 4){
		showhide('goUp','none');
	}
	showhide('goDown','block');
}
function goDown_(){
	if(current_img < (img_count -1)){
		document.getElementById('small_img_'+(current_img+1)).style.display = "block";
		document.getElementById('small_img_'+(current_img-4)).style.display = "none";
		current_img += 1;
	}
	if(current_img == (img_count-1)){
		showhide('goDown','none');
	}
	showhide('goUp','block');
}
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}