HOW TO CREATE BUTTON FOR TRAFFIC LIGHT CODE IN JAVASCRIPT? : I intend to include a button in my traffic light code so that the user can click on it to activate the traffic light however, i am unsure of where to place it in my code. Any help would be greatly appreciated!

This is my code:
    <head>
    <script type="text/javascript">
    var image1 = new Image()
    image1.src = "traffic light_1.png"
    var image2 = new Image()
    image2.src = "traffic light_2.png"
    var image3 = new Image()
    image3.src = "traffic light_3.png"
    var image4 = new Image()
    image4.src = "traffic light_2.png"
    </script>
    </head>
    <body>
    <p><img src="traffic light_1.png" width="500" height="300" name="slide" /></p>
    <script type="text/javascript">
            var step=1;
            function slideit()
            {
                document.images.slide.src = eval("image"+step+".src");
                if(step<4)
                    step++;
                else
                    step=1;
                setTimeout("slideit()",3000);
            }
            slideit();
    </script>
    </body>