/*
 * Script for website www.modulo-architects.be
 * 
 * This script deals with all slideshow- aspects.
 *
 * @ author: Lieven Van Landschoot.
 */
var position = 0; // value containing position
var number = 0; // value containing number of pictures
var slideShowSpeed = 4500; // value containing slideshowspeed
pic = new Array(); // array containing the actual pictures
picname = new Array(); // array containing the actual filenames

/* function preloading the image with the given name and setting the filename accordingly */ 
function set(naam){
	pic[number] = new Image(); 
	pic[number].src = naam;
	picname[number] = naam;	
	number++;
}

/* function starting the slideshow */ 
function start(){
	setTimeout("next()", 3000);
}
 
/* function showing next image in slideshow */ 
function next(){
	position = (position + 1) % number;
	document.getElementById('blendimage').style.backgroundImage = "url(" + picname[position] + ")";
	setTimeout("next();", slideShowSpeed);
}