		
		
		var myimages=new Array()
		function preloadimages(){
		for (i=0;i<preloadimages.arguments.length;i++){
			myimages[i]=new Image()
			myimages[i].src=preloadimages.arguments[i]
			}
		}
		
		
		//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
		preloadimages("http://www.todaydesigners.nl/wp-content/themes/todaydesigners/images/background1.jpg",
		"http://www.todaydesigners.nl/wp-content/themes/todaydesigners/images/background2.jpg",
		"http://www.todaydesigners.nl/wp-content/themes/todaydesigners/images/background3.jpg");

		
		//Specify background images to slide

		var bgslides=new Array()
		bgslides[0]="http://www.todaydesigners.nl/wp-content/themes/todaydesigners/images/background1.jpg"
		bgslides[1]="http://www.todaydesigners.nl/wp-content/themes/todaydesigners/images/background2.jpg"
		bgslides[2]="http://www.todaydesigners.nl/wp-content/themes/todaydesigners/images/background3.jpg"
		
		//Specify interval between slide (in miliseconds)
		var speed=12000;
		
		//preload images
		var processed=new Array()
			for (i=0;i<bgslides.length;i++){
			processed[i]=new Image()
			processed[i].src=bgslides[i]
		}
		
		var inc=-1;
		
		inc = Math.floor(3*Math.random());
		
		function slideback(){
			if (inc<bgslides.length-1)
				inc++
			else
				inc=0
				//alert(inc);
			
			image_nr = processed[inc].src;
			wijzigImage(image_nr);
			wijzigLeus(inc);
			wijzigFlip(inc);
		}
		
		if (document.all||document.getElementById)
		window.onload =  new Function('slideback(); setInterval("slideback()",speed);changeOpac(50,background);afterLoad();');
	
		
		function wijzigImage(inhoud) {
			the_image = '<img src="' + inhoud + '" >'; 
			document.getElementById('bg_image').innerHTML = the_image; 
		}
		
		function wijzigLeus(leus) {

			if (leus == 0) { text = "today designers geeft vorm aan jouw merk"; }
			else if (leus == 1) {text = "today designers <br />denkt net even iets"; }
			else if (leus == 2)	{text = "today designers komt met een sterke online"; }
			
			the_leus = '<h1>' + text + '</h1>'; 
			document.getElementById('leus').innerHTML = the_leus; 
		} 
		
		function wijzigFlip(flip) {
			
			if (flip == 0) { path = "http://todaydesigners.nl/wp-content/themes/todaydesigners/images/knop1.gif"; }
			else if (flip == 1) {path = "http://todaydesigners.nl/wp-content/themes/todaydesigners/images/knop2.gif"; }
			else if (flip == 2)	{path = "http://todaydesigners.nl/wp-content/themes/todaydesigners/images/knop3.gif"; }
			the_flip = '<img src="' + path + '" >'; 
			
			document.getElementById('today_flip').innerHTML = the_flip ; 
		} 
		
		
		

