        //
        // Definitions
        //
    
        // Backgrounds:
        var RandBackgrounds = new Array(29); // Set this to the number of background images!
            RandBackgrounds[0] = new Array('http://www.restaurantstout.nl/vierkant/55.jpg', 'left top');
            RandBackgrounds[1] = new Array('http://www.restaurantstout.nl/vierkant/53.jpg', 'right bottom');
            RandBackgrounds[2] = new Array('http://www.restaurantstout.nl/vierkant/52.jpg', 'right bottom');
            RandBackgrounds[3] = new Array('http://www.restaurantstout.nl/vierkant/36.jpg', 'left bottom');
            RandBackgrounds[4] = new Array('http://www.restaurantstout.nl/vierkant/54.jpg', 'right top');
            RandBackgrounds[5] = new Array('http://www.restaurantstout.nl/vierkant/51.jpg', 'left top');
            RandBackgrounds[6] = new Array('http://www.restaurantstout.nl/vierkant/56.jpg', 'right bottom');
            RandBackgrounds[7] = new Array('http://www.restaurantstout.nl/vierkant/160.jpg', 'left top');
            RandBackgrounds[8] = new Array('http://www.restaurantstout.nl/vierkant/161.jpg', 'left top');
            RandBackgrounds[9] = new Array('http://www.restaurantstout.nl/vierkant/159.jpg', 'left bottom');
            RandBackgrounds[10] = new Array('http://www.restaurantstout.nl/vierkant/158.jpg', 'left bottom');
            RandBackgrounds[11] = new Array('http://www.restaurantstout.nl/vierkant/157.jpg', 'right top');
            RandBackgrounds[12] = new Array('http://www.restaurantstout.nl/vierkant/156.jpg', 'left top');
            RandBackgrounds[13] = new Array('http://www.restaurantstout.nl/vierkant/155.jpg', 'right bottom');
            RandBackgrounds[14] = new Array('http://www.restaurantstout.nl/vierkant/154.jpg', 'right bottom');
            RandBackgrounds[15] = new Array('http://www.restaurantstout.nl/vierkant/162.jpg', 'right bottom');
            RandBackgrounds[16] = new Array('http://www.restaurantstout.nl/vierkant/163.jpg', 'right bottom');
            RandBackgrounds[17] = new Array('http://www.restaurantstout.nl/vierkant/164.jpg', 'left bottom');
            RandBackgrounds[18] = new Array('http://www.restaurantstout.nl/vierkant/165.jpg', 'left bottom');
            RandBackgrounds[19] = new Array('http://www.restaurantstout.nl/vierkant/166.jpg', 'left bottom');
            RandBackgrounds[20] = new Array('http://www.restaurantstout.nl/vierkant/210.jpg', 'left top');
            RandBackgrounds[21] = new Array('http://www.restaurantstout.nl/vierkant/211.jpg', 'left top');
            RandBackgrounds[22] = new Array('http://www.restaurantstout.nl/vierkant/212.jpg', 'right bottom');
            RandBackgrounds[23] = new Array('http://www.restaurantstout.nl/vierkant/213.jpg', 'right top');
            RandBackgrounds[24] = new Array('http://www.restaurantstout.nl/vierkant/226.jpg', 'right top');
            RandBackgrounds[25] = new Array('http://www.restaurantstout.nl/vierkant/227.jpg', 'right bottom');
            RandBackgrounds[26] = new Array('http://www.restaurantstout.nl/vierkant/228.jpg', 'right top');
            RandBackgrounds[27] = new Array('http://www.restaurantstout.nl/vierkant/229.jpg', 'right bottom');
            RandBackgrounds[28] = new Array('http://www.restaurantstout.nl/vierkant/230.jpg', 'right top');
        
        // Sounds:
        var RandSounds = new Array(13); // Set this to the number of sounds!
            RandSounds[0] = 'http://www.restaurantstout.nl/vierkant/133.mp3';
            RandSounds[1] = 'http://www.restaurantstout.nl/vierkant/132.mp3';
            RandSounds[2] = 'http://www.restaurantstout.nl/vierkant/196.mp3';
            RandSounds[3] = 'http://www.restaurantstout.nl/vierkant/197.mp3';
            RandSounds[4] = 'http://www.restaurantstout.nl/vierkant/195.mp3';
            RandSounds[5] = 'http://www.restaurantstout.nl/vierkant/198.mp3';
            RandSounds[6] = 'http://www.restaurantstout.nl/vierkant/194.mp3';
            RandSounds[7] = 'http://www.restaurantstout.nl/vierkant/199.mp3';
            RandSounds[8] = 'http://www.restaurantstout.nl/vierkant/193.mp3';
            RandSounds[9] = 'http://www.restaurantstout.nl/vierkant/246.mp3';
            RandSounds[10] = 'http://www.restaurantstout.nl/vierkant/134.mp3';
            RandSounds[11] = 'http://www.restaurantstout.nl/vierkant/135.mp3';
            RandSounds[12] = 'http://www.restaurantstout.nl/vierkant/136.mp3';
        
        // Images:
        var RandImages = new Array(28); // Set this to the number of images!
            RandImages[0] = 'http://www.restaurantstout.nl/vierkant/167.jpg';
            RandImages[1] = 'http://www.restaurantstout.nl/vierkant/23.JPG';
            RandImages[2] = 'http://www.restaurantstout.nl/vierkant/168.jpg';
            RandImages[3] = 'http://www.restaurantstout.nl/vierkant/169.jpg';
            RandImages[4] = 'http://www.restaurantstout.nl/vierkant/170.jpg';
            RandImages[5] = 'http://www.restaurantstout.nl/vierkant/171.jpg';
            RandImages[6] = 'http://www.restaurantstout.nl/vierkant/172.jpg';
            RandImages[7] = 'http://www.restaurantstout.nl/vierkant/173.jpg';
            RandImages[8] = 'http://www.restaurantstout.nl/vierkant/174.jpg';
            RandImages[9] = 'http://www.restaurantstout.nl/vierkant/175.jpg';
            RandImages[10] = 'http://www.restaurantstout.nl/vierkant/176.jpg';
            RandImages[11] = 'http://www.restaurantstout.nl/vierkant/177.jpg';
            RandImages[12] = 'http://www.restaurantstout.nl/vierkant/178.jpg';
            RandImages[13] = 'http://www.restaurantstout.nl/vierkant/179.jpg';
            RandImages[14] = 'http://www.restaurantstout.nl/vierkant/180.jpg';
            RandImages[15] = 'http://www.restaurantstout.nl/vierkant/181.jpg';
            RandImages[16] = 'http://www.restaurantstout.nl/vierkant/182.jpg';
            RandImages[17] = 'http://www.restaurantstout.nl/vierkant/183.jpg';
            RandImages[18] = 'http://www.restaurantstout.nl/vierkant/184.jpg';
            RandImages[19] = 'http://www.restaurantstout.nl/vierkant/231.jpg';
            RandImages[20] = 'http://www.restaurantstout.nl/vierkant/218.jpg';
            RandImages[21] = 'http://www.restaurantstout.nl/vierkant/219.jpg';
            RandImages[22] = 'http://www.restaurantstout.nl/vierkant/220.jpg';
            RandImages[23] = 'http://www.restaurantstout.nl/vierkant/221.jpg';
            RandImages[24] = 'http://www.restaurantstout.nl/vierkant/222.jpg';
            RandImages[25] = 'http://www.restaurantstout.nl/vierkant/223.jpg';
            RandImages[26] = 'http://www.restaurantstout.nl/vierkant/224.jpg';
            RandImages[27] = 'http://www.restaurantstout.nl/vierkant/225.jpg';
        
        // Popups:
        var RandPopups = new Array(42); // Set this to the number of popups!
            RandPopups[0] = 'http://www.restaurantstout.nl/vierkant/71.jpg';
            RandPopups[1] = 'http://www.restaurantstout.nl/vierkant/72.jpg';
            RandPopups[2] = 'http://www.restaurantstout.nl/vierkant/73.jpg';
            RandPopups[3] = 'http://www.restaurantstout.nl/vierkant/75.jpg';
            RandPopups[4] = 'http://www.restaurantstout.nl/vierkant/78.jpg';
            RandPopups[5] = 'http://www.restaurantstout.nl/vierkant/80.jpg';
            RandPopups[6] = 'http://www.restaurantstout.nl/vierkant/81.jpg';
            RandPopups[7] = 'http://www.restaurantstout.nl/vierkant/83.jpg';
            RandPopups[8] = 'http://www.restaurantstout.nl/vierkant/85.jpg';
            RandPopups[9] = 'http://www.restaurantstout.nl/vierkant/86.jpg';
            RandPopups[10] = 'http://www.restaurantstout.nl/vierkant/87.jpg';
            RandPopups[11] = 'http://www.restaurantstout.nl/vierkant/88.jpg';
            RandPopups[12] = 'http://www.restaurantstout.nl/vierkant/89.jpg';
            RandPopups[13] = 'http://www.restaurantstout.nl/vierkant/91.jpg';
            RandPopups[14] = 'http://www.restaurantstout.nl/vierkant/93.jpg';
            RandPopups[15] = 'http://www.restaurantstout.nl/vierkant/96.jpg';
            RandPopups[16] = 'http://www.restaurantstout.nl/vierkant/97.jpg';
            RandPopups[17] = 'http://www.restaurantstout.nl/vierkant/99.jpg';
            RandPopups[18] = 'http://www.restaurantstout.nl/vierkant/101.jpg';
            RandPopups[19] = 'http://www.restaurantstout.nl/vierkant/102.jpg';
            RandPopups[20] = 'http://www.restaurantstout.nl/vierkant/103.jpg';
            RandPopups[21] = 'http://www.restaurantstout.nl/vierkant/104.jpg';
            RandPopups[22] = 'http://www.restaurantstout.nl/vierkant/105.jpg';
            RandPopups[23] = 'http://www.restaurantstout.nl/vierkant/106.jpg';
            RandPopups[24] = 'http://www.restaurantstout.nl/vierkant/107.jpg';
            RandPopups[25] = 'http://www.restaurantstout.nl/vierkant/109.jpg';
            RandPopups[26] = 'http://www.restaurantstout.nl/vierkant/110.jpg';
            RandPopups[27] = 'http://www.restaurantstout.nl/vierkant/112.jpg';
            RandPopups[28] = 'http://www.restaurantstout.nl/vierkant/113.jpg';
            RandPopups[29] = 'http://www.restaurantstout.nl/vierkant/114.jpg';
            RandPopups[30] = 'http://www.restaurantstout.nl/vierkant/115.jpg';
            RandPopups[31] = 'http://www.restaurantstout.nl/vierkant/116.jpg';
            RandPopups[32] = 'http://www.restaurantstout.nl/vierkant/118.jpg';
            RandPopups[33] = 'http://www.restaurantstout.nl/vierkant/119.jpg';
            RandPopups[34] = 'http://www.restaurantstout.nl/vierkant/121.jpg';
            RandPopups[35] = 'http://www.restaurantstout.nl/vierkant/123.jpg';
            RandPopups[36] = 'http://www.restaurantstout.nl/vierkant/124.jpg';
            RandPopups[37] = 'http://www.restaurantstout.nl/vierkant/125.jpg';
            RandPopups[38] = 'http://www.restaurantstout.nl/vierkant/126.jpg';
            RandPopups[39] = 'http://www.restaurantstout.nl/vierkant/127.jpg';
            RandPopups[40] = 'http://www.restaurantstout.nl/vierkant/128.jpg';
            RandPopups[41] = 'http://www.restaurantstout.nl/vierkant/130.jpg';
        
    
        //
        // Code (No need to edit anything below this line)
        //
    
        function random_iets() {
            reset();
    
            var rand = Math.round(Math.random() * 2);
    
            if (rand == 0) {
    
                handleClick('show video');
                setTimeout("PlayFlashMovie()", 100);
                InitializeTimer();
    
            } else if (rand == 1) {
    
                background();
                InitializeTimer();
    
            } else if (rand == 2) {
    
                mp3();
    
            } 
        }
    
        function background() {
            // Set background image
            var rand = Math.round(Math.random() * (RandBackgrounds.length - 1));
    
            document.body.style.backgroundImage = 'url(' + RandBackgrounds[rand][0] + ')';
            document.body.style.backgroundRepeat = 'no-repeat';
            document.body.style.backgroundPosition = RandBackgrounds[rand][1];
        }
    
        function mp3() {
            // Play MP3
            var rand = Math.round(Math.random() * (RandSounds.length - 1));
			//alert('te laden = '+RandSounds[rand]);
			// functie staat in file flashEvent.js
			loadmp3(RandSounds[rand]);
        }
    
        function image() {
            // Set image
            var rand = Math.round(Math.random() * (RandImages.length - 1));
    
            document.images['swap'].src = RandImages[rand];
        }
    
        function popup() {
            // Show popup
            //var rand = Math.round(Math.random() * (RandPopups.length - 1));
    
            //document.images['popupswap'].src = RandPopups[rand];
        }
    
        function reset() {
            // Reset everything to default state
            document.body.style.backgroundImage='url()';
            document.images['swap'].src = DefaultImage;
            document.images["vierkantImage"].src = "images/vierkant.gif"
            handleClick('hide video');
            handleClick('hide popup');
        }
    
        function hideLayer(whichLayer) {
            if (document.getElementById) {
                document.getElementById(whichLayer).style.display = "none";
            } else if (document.all) {
                document.all[whichlayer].style.display = "none";
            } else if (document.layers) {
                document.layers[whichLayer].display = "none";
            }
        }
    
        function showLayer(whichLayer) {
            if (document.getElementById) {
                document.getElementById(whichLayer).style.display = "block";
            } else if (document.all) {
                document.all[whichlayer].style.display = "block";
            } else if (document.layers) {
                document.layers[whichLayer].display = "block";
            }
        }
    