I have a really simple external css stylesheet that has the following :
div.hideBox {
display:none;
}
So when the html page loads, the div
I can see that you want to write you own short javascript for this, but have you considered to use Frameworks for HTML manipulation instead? jQuery is my prefered tool for such a task, eventhough its an overkill for your current question as it has SO many extra functionalities.
Have a look at jQuery here