how to add a css class in javascript to be used onload
<p>I am trying to load a popup lightbox window when the page is initially opened. I can get it to work on a click but I cannot get the code right to add a class in the script. I am using 'Lightbox' from within HTML Kickstart.</p>

<p>The link that works looks like this: <code>&lt;a class="lightbox" href="#bbc"&gt;BBC&lt;/a&gt;</code> This works perfectly. Basically how do I get that to work automatically on page load.</p>

<p>My attempt at the script: </p>

<pre><code>&lt;script type="text/javascript"&gt;
    function load() {
        var target = location.href = "#bbc";
        target.className = "lightbox";
    }
&lt;/script&gt; 
</code></pre>
