Radio Button Slideshow
<p>I currently have a slide show for my website and i am trying to loop through each radio button. I tried doing it multiple ways, but nothing seems to work. can somebody help please.</p>

<p>here is my code: </p>

<pre><code>/*This function is called when the window is done loading*/
window.onload = function() {

//Each of these buttons should call the Change Image Function, passing a differet parameter.
document.getElementById("button1").onclick = function(){
    changeImage("formbackground1.jpg");
    }

document.getElementById("button2").onclick = function(){
    changeImage("formbackground2.jpg");
    }

document.getElementById("button3").onclick = function(){
        changeImage("background2.jpg");
    }

}

var step=1
function  slideit() {
        document.images.slide.src=eval(document.getElementById("button"+step).onclick)
    if (step &lt; 3){
    step++
}
else{
    step = 1
    setTimeout("slideit()", 2500)
}
    slideit();
}



/*This function changes the picture when one of the 3 buttons is pressed*/
function changeImage(source) {

    document.getElementById("myImage").src=source;
}


function popup(){

}
</code></pre>