try this updated
make the image name like bike # .jpg, tire # .jpg bike0.jpg, bike1.jpg, bike2.jpg ....
function check_value(val, id, type) { var el = document.getElementById("imgBox" + id); if (val>0 && val<4) {
}
<h2>Choose a bike</h2> <form name="builder"> <input type="radio" name="field" value="1" onclick='check_value(0, 1, "bike")'/> KAWASAKI KX 450F<br /> <input type="radio" name="field" value="2" onclick='check_value(1, 1, "bike")'/> 2010 Yamaha Road Star S<br /> <input type="radio" name="field" value="3" onclick='check_value(2, 1, "bike")'/> Aprilia RSV4<br /> </form> <img id="imgBox1" src="#" style="display:none"> <h2>Choose a tire</h2> <form name="tire"> <input type="radio" name="field" value="1" onclick='check_value(0, 2, "tire")'/> Michelin Pilot Road 3 Tires<br /> <input type="radio" name="field" value="2" onclick='check_value(1, 2, "tire")'/> Dunlop Roadsmart Sport-Touring Tires<br /> <input type="radio" name="field" value="3" onclick='check_value(2, 2, "tire")'/> Pirelli Scorpion Trail Tires<br /> </form> <img id="imgBox2" src="#" style="display:none">
source share