title: javascript window interval is not changing
body: <p>I have two updated panels on my web page to display some data and i am refreshing panels after a specific time like this</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
          window.setInterval(function () {
              __doPostBack('&lt;%= UpdatePanel1.ClientID %&gt;', '');
              __doPostBack('&lt;%= UpdatePanel3.ClientID %&gt;', '');
          }, 2000);
      &lt;/script&gt;
  </code></pre>
  
  <p>this refreshed the panel each two seconds.Problem is that i have another function for a child grid inside a gridview to open and close with plus and minus images like this</p>
  
  <pre><code>function divexpandcollapse(divname) {
          var div = document.getElementById(divname);
          var img = document.getElementById('img' + divname);
          if (div.style.display == "none") {
              div.style.display = "inline";
              img.src = "../Images/Minus.gif";
              window.setInterval(function () {
                  __doPostBack('&lt;%= UpdatePanel1.ClientID %&gt;', '');
                  __doPostBack('&lt;%= UpdatePanel3.ClientID %&gt;', '');
              }, 20000);
          } else {
              div.style.display = "none";
              img.src = "../Images/Plus.gif";
              window.setInterval(function () {
                  __doPostBack('&lt;%= UpdatePanel1.ClientID %&gt;', '');
                  __doPostBack('&lt;%= UpdatePanel3.ClientID %&gt;', '');
              }, 2000);
  
          }
      }
  </code></pre>
  
  <p>I am trying to increase the postback timing from 2 second to 20 when user clikc on plus sign inside gridivew and when again click on minus sign then timing should again 2 second.But through below code its not changing the time accordingly.can any one tell me what exactly i am missing inside this method or what should i have to do extra to get my requirements.plz help</p>