Doesnt appear to work.. Is it incorrect?
Your code seems to reply on other things are aren't present in you example, so a link to your page that demonstrates the problem would be most helpful.
Something else on your page might be replacing that onload event, or it cold be something else, which is why we need to see the problem as you experience it on your own test page.
Its sorted.. had to place the code nearer to the bottom of the page apossed to in the head tags..
Also onload effectively became obsolete when people started using the best practice of placing their scripts at the very bottom of the page where they don't slow the loading of the page and where everything they need to reference will have already loaded.
Sweet.. thanks for the info..