Show/hide table

Show/hide table

Hi,
I have a structure like this:
<table>
      <tr>
            <td><img src="openclose.png"/></td>      
            <td><table>.....</table></td>
      </tr>
      <tr>
            <td><img src="openclose.png"/></td>      
            <td><table>.....</table></td>
      </tr>
 </table>

All rows of the outer table is generated through a <c:foreach>

I want to toggle the view/hide of the inner table when the corresponding openclose.png image is clicked.
I did try a few examples available on the net but being a beginner, I may not be doing it right.

Any help is appreciated.
Thanks!
Srinivasa