Image swap problems
<p>I am using an inline onclick to toggle two images that are used on the page as tabs. The swap does great but when the page reloads the images revert to the home image. I would like for the image to stay as the "selected" image until another tab is clicked. </p>

<pre><code> &lt;img id="image3" src="images/charts1.png" style="display:inline;" onclick="document.getElementById('image3').style.display='none'; document.getElementById('image4').style.display='inline';" "/&gt;

    &lt;img id="image4" src="images/charts2.png" style="display:none;" onclick="document.getElementById('image4').style.display='none'; document.getElementById('image3').style.display='inline';"/&gt;
</code></pre>

<p>My script</p>

<pre><code>&lt;script&gt;
    if (document.images) { 
        img1on = new Image();
        img1on.src = "images/over1.jpg"; 
        img1off = new Image(); 
        img1off.src = "images/notover.jpg"; 
        img2on = new Image();
        img2on.src = "images/over2.jpg"; 
        img2off = new Image(); 
        img2off.src = "images/notover.jpg"; 
    }
    function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "on.src");}
    }
    function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "off.src");}
        }
&lt;/script&gt;
</code></pre>
