document.getElementById(...).setAttribute('style',... not working in Internet Explorer
<p>document.getElementById(...).setAttribute('style',... is not working in Internet Explorer 7.0. How can I make this work in Internet Explorer?</p>

<pre><code>&lt;!DOCTYPE html&gt; 
&lt;html lang="en"&gt; 

&lt;head&gt;
&lt;script type="text/javascript"&gt;
    var myarray=new Array(3);
    for (i=0; i &lt;1000; i++){
        myarray[i]=new Array(3);
    }
    myarray[0][0]="new"; myarray[0][1]="old";

    function swapText(id){
        document.getElementById('id' + id).setAttribute('style', 'font-weight: bold; color: red; font-size:150%;');
        document.getElementById('id'+ id).innerHTML = myarray[id][0];
    }
    function originalText(id){
        document.getElementById('id' + id).setAttribute('style', 'color:' + 'black'  + ';');
        document.getElementById('id' + id).innerHTML = myarray[id][1];
    }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id="scoreboard" border='1'&gt; &lt;/div&gt;
    &lt;div id="qa"&gt;
        &lt;div id="col1" class="column"&gt;  
            &lt;div id="id0" onmouseover="swapText(0)"; onmouseout="originalText(0)"&gt;old&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
