I'm having what seems to be a recurring problem with Mozilla: When I change a style attribute/rule dynamically with Javascript the elment doesn't always visibly change.

At first, I thought it was just that Mozilla didn't support the element.style.rule syntax:
Code:
div.style.display = "none";
But although using setAttribute() does seem to make things more reliable, I'm still getting instances where a style change isn't showing up. I'd be inclined to think that maybe it just wasn't fully supported by Mozilla, but if I add an alert() dialog in the code, the element does visibly change. This makes me think the problem is maybe something to do with the redraw/repaint functionality of Mozilla itself.

Is this a known problem? Has anyone discovered a work-around?

For an example of what I'm talking about, take a look at this sample tree menu I'm working on:

http://www.codemastershawn.com/class...ect5/test.html

In Mozilla (1.0.2) the red arrow images don't return to the closed position.