Spot div on same position
<p>I am trying to show hide image using javascript. Code works fine but image displays on different location. Now i want to show and hide the images on same spot. </p>

<pre><code> &lt;script type="text/javascript"&gt; 
    function showImage()
    {

        if(document.getElementById('check').checked==true)
        {
            document.getElementById("image").style.visibility = 'visible'; 
            document.getElementById("images").style.visibility = 'hidden'; 
        }
        else if(document.getElementById('check').checked==false)
        {
            document.getElementById("image").style.visibility = 'hidden'; 
            document.getElementById("images").style.visibility = 'visible'; 
        }

    }
&lt;/script&gt;
&lt;body onload="showImage()"&gt;
    &lt;font align="left"&gt;
    &lt;input type="checkbox" id="check" onclick="showImage()" /&gt;
    Show Image

    &lt;div class="checkboxes" id = "image" &gt;
        &lt;img  class = "jive-image" height="125" src ="Tulips.jpg "&gt;
    &lt;/div&gt;
    &lt;div id="images"&gt;
        &lt;img class = "jive-image" height="125" src="Desert.jpg"&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>How it possible?</p>
