I agree, getElementById is pretty well supported and should be more robust than control.options (at least I'm not familiar with it).
I'd make one small change. If user has javascript disabled, this could throw errors. That's a pretty common problem because Microsoft has pretty much thrown up its hands trying to provide javascript security. A lot of times IE ships with
JS disabled by default. The function will be more stable if you make this statement the first line of the Toggle() function...
if (!document.getElementById) return;
That way if the browser doesn't respond to the getElementById request, the script terminates. The script won't run, but neither will it throw errors; it's a "progressive enhancement" technique.
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of
www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.