<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>> 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 next element exists. If the element does exist, the function would hide it, up the counter, and call itself again with another setTimeout. 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. timedLayer("hide"). 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> if(iLayer > 0) && document.getElementById(id + iLayer)) {<br> document.getElementById(id).style.display = "none";<br> setTimeout("HideTimedLayer(\"" + id + "\")", 1000);<br> }<br> else if(iLayer == 0) { iLayer++; }<br> }<br><br>HTH,<br><br>Peter</p>