// button swap script by Rolf 18-11-'0

Button = new Array(24);
Butfiles = new Array('website','applicatie','portfolio','logo','contact');
for (i in Butfiles) {
	for (j=1;j<5;j++) {
		Button[Butfiles[i]+j] = new Image();
		Button[Butfiles[i]+j].src = 'images/corvisbutton-'+Butfiles[i]+j+'.gif';
	}
}

function push(button) {
	setTimeout('swapImg(\''+button+'\',2)',80);
	setTimeout('swapImg(\''+button+'\',3)',160);
	setTimeout('swapImg(\''+button+'\',4)',240);
}
function pop(button) {
	setTimeout('swapImg(\''+button+'\',3)',100);
	setTimeout('swapImg(\''+button+'\',2)',200);
	setTimeout('swapImg(\''+button+'\',1)',300);
}
function swapImg(button, imgnr) {
	document.images[button].src = Button[button+imgnr].src;
}

// image swap script by Rolf 18-11-'0

totalart = 1;
//art = 1;
art = Math.floor(Math.random()*totalart) + 1;
function swapArt() {
	art++;
	if (art>totalart) art = 1;
	Art = new Image();
	Art.src = 'art/art'+art+'.jpg';
	document.images['artimage'].src = Art.src;
	if (totalart>1) setTimeout('swapArt()', 4000);
}

