<font size=2><font face=Tahoma><strong>From</strong>: tedd </font></font><a href="mailto:tedd@sperling.com"><font face=Tahoma size=2>tedd@sperling.com</font></a><br><br>&gt; How can I get it to be sequential?<br><br>This is what I was talking about when I mentioned a function that calls itself recursively with a setTimeout and then checks to see if the&nbsp;next element exists.&nbsp; If the element does exist, the function would hide it, up the counter, and call itself again with another setTimeout.&nbsp; When it finds that there is no current element to hide/show, it stops calling itself and you're done.<br><br>The difference with this method is that you use only the non-integer part of the ID to call the function, e.g.&nbsp;timedLayer("hide").&nbsp; I haven't tested this so it may have a bug or two, but hopefully you get the idea.<br><br>
<p>var iLayer = 0;<br><br>function HideTimedLayer(id) {<br>&nbsp;&nbsp; if(iLayer &gt; 0) &amp;&amp; document.getElementById(id + iLayer)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.getElementById(id).style.display = "none";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setTimeout("HideTimedLayer(\"" + id + "\")", 1000);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; else if(iLayer == 0) { iLayer++; }<br>&nbsp;&nbsp; }<br><br>HTH,<br><br>Peter</p>