Using one javascript code on multiple sections
<p>I don't know much about jQuery but I've been using the following javascript code to make a table keep the scroll bar location upon pageback:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    window.onload = function () {
        var strCook = document.cookie;
        if (strCook.indexOf("!~") != 0) {
            var intS = strCook.indexOf("!~");
            var intE = strCook.indexOf("~!");
            var strPos = strCook.substring(intS + 2, intE);
            document.getElementById("grdWithScroll").scrollTop = strPos;
        }
    }
    function SetDivPosition() {
        var intY = document.getElementById("grdWithScroll").scrollTop;
        document.cookie = "yPos=!~" + intY + "~!";
    }
&lt;/script&gt;
</code></pre>

<p>and</p>

<pre><code>&lt;div id="grdWithScroll" onscroll="SetDivPosition()"&gt;
</code></pre>

<p>It works great for a single div. But how could I extend this for use with a second div section?</p>
