
function $(p_sId) {
	return document.getElementById(p_sId);
}

function setPic(p_sSrc) {
	$('pic').style.backgroundImage = 'url('+p_sSrc+')';
	$('links').href=p_sSrc;
}

var slideshow = false;
var cur_img = 0;

function toggleSlideShow(){
	if ( slideshow==false ) {
		slideshow = true;
		$('slideshow_img').src='/images/btn_diavoorstelling_1.jpg';
		setTimeout('slideShow()', 1000);
	} else {
		slideshow = false;
		$('slideshow_img').src='/images/btn_diavoorstelling.jpg';
	}
}

function slideShow(){
	if (slideshow==false) {return false;}
	if ( cur_img == images.length-1 ) {
		cur_img = 0;
	} else {
		cur_img++;	
	}
	setPic(images[cur_img]);
	setTimeout('slideShow()', 3000);
}

function setCurImg(id){
	cur_img=id;
}
