Javascript: Displaying images with check boxes values
<p>I am currently working with radio buttons and check boxes to display images with the help of javascript. To be specific: I am running into an issue when working check boxes and displaying the images. With the radio buttons only one image will be display for that category. But with checkboxes more than one image need to be display. For example, a user can check field for jacket and glove and both pictures will be display. </p>

<p>How can I format the function to display multiple pictures when check boxes are clicked?  <a href="http://webprolearner2346.zxq.net/bike_calculator/">EXAMPLE</a></p>

<p><strong>JS</strong></p>

<pre><code>&lt;script language="JavaScript" type="text/javascript"&gt;

function check_value(val, id, type) {     
    var el = document.getElementById("imgBox" + id);
    if (val&gt;0 &amp;&amp; val&lt;4) { //will trigger when [1,2,3]
       el.src = "images/"+ type + val + ".jpg";
       el.style.display = "";
  }    
  }      

&lt;/script&gt;
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;h2&gt;Choose a bike&lt;/h2&gt;
&lt;form name="builder"&gt;
    &lt;input type="radio" name="field" value="1" onclick='check_value(1, 1, "bike")'/&gt; KAWASAKI KX 450F&lt;br /&gt;
    &lt;input type="radio" name="field" value="2" onclick='check_value(2, 1, "bike")'/&gt; 2010 Yamaha Road Star S&lt;br /&gt;
    &lt;input type="radio" name="field" value="3" onclick='check_value(3, 1, "bike")'/&gt; Aprilia RSV4&lt;br /&gt;
&lt;/form&gt;

&lt;img id="imgBox1" src="#" style="display:none"&gt; 

&lt;h2&gt;Choose a tire&lt;/h2&gt;  
&lt;form name="tire"&gt;
    &lt;input type="radio" name="field" value="1" onclick='check_value(1, 2, "tire")'/&gt; Michelin Pilot Road 3 Tires&lt;br /&gt;
    &lt;input type="radio" name="field" value="2" onclick='check_value(2, 2, "tire")'/&gt; Dunlop Roadsmart Sport-Touring Tires&lt;br /&gt;
    &lt;input type="radio" name="field" value="3" onclick='check_value(3, 2, "tire")'/&gt; Pirelli Scorpion Trail Tires&lt;br /&gt;
&lt;/form&gt;

&lt;img id="imgBox2" src="#" style="display:none"&gt;

&lt;h2&gt;Choose Accesories&lt;/h2&gt;
&lt;form name="tire"&gt;
    &lt;input type="checkbox" name="field" value="1" onclick='check_value(1, 3, "accesories")'/&gt; Chrome Front Plate&lt;br /&gt;
    &lt;input type="checkbox" name="field" value="2" onclick='check_value(2, 3, "accesories")'/&gt; Jacket&lt;br /&gt;
    &lt;input type="checkbox" name="field" value="3" onclick='check_value(3, 3, "accesories")'/&gt; Gloves            
&lt;/form&gt;

&lt;img id="imgBox3" src="#" style="display:none"&gt;
</code></pre>
