title: JavaScript function to hide/unhide panel
body: <p>I'm using asp.net(C#) under visual studio 2010</p>
  
  <p>I have a panel that is by default set 2 be hidden( visible=false)</p>
  
  <p>I need to create a JavaScript function that would be executed on a button click to make this panel visible if hidden and hidden if visible.
  and this should be client side, here is the code I have so far</p>
  
  <pre><code>   &lt;script type=text/javascript&gt;
  
      function func1()
      {
      i need this code please
      }
  
  &lt;asp:Panel ID="ResultsPanel" runat="server"&gt;
  
  Some controls
  
  &lt;/asp:Panel&gt;
  
  &lt;asp:button id=button1 runat=server onclick=javascript:func1()&gt;Hide/Unhide&lt;/asp:button&gt;
  </code></pre>