I have an instance where I want to apply a style with javascript in
order to override css settings in the stylesheet. (I'm working with an existing css styled menu system trying to collapse unused portions of the tree).

the css settings are along the lines of:

#rootlevel ul ul a {display:none;}

And I want to override with this style

#rootlevel ul ul#selecteditem a {display:block}

but with javascript.

Can this be done? I'm familiar with

object.style.display = 'block';

but how do we get the cascading events in there? Or can I?