Javascript toggle issue
<p>We have a bit of old code that's in our website, and I can't seem to find why it's not working properly, so I'm wondering if fresh eyes can see what I can't.
These are the functions:</p>

<pre><code>    function Toggle(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     key.innerHTML="&lt;img src='/images/common/leftsidebullet_closed.gif' height=10 width=10 border=0&gt;";
     obj.style.display="none";
   } else {
      key.innerHTML="&lt;img src='/images/common/leftsidebullet_opened.gif' height=10 width=10 border=0&gt;";
      obj.style.display="block";
   }
}

function Toggle2(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
     key.innerHTML="&lt;img src='/images/common/leftsidebullet_closedOrange.gif' height=10 width=10 border=0&gt;";
   } else {
      obj.style.display="block";
      key.innerHTML="&lt;img src='/images/common/leftsidebullet_openedOrange.gif' height=10 width=10 border=0&gt;";
   }
}
</code></pre>

<p>And the example page is located <a href="http://ads-pipe.com/en/documentlisting.asp?documenttypeID=682" rel="nofollow">here</a>
If you click on the "Section 1 – Specifications" list item in the middle of the page, it requires two clicks to actually fire the toggle instead of it doing it the first time.
It's not creating an error and I can't think of anything else so I thought I'd ask if someone else can see something.</p>
