Issue with capitalizing innerHTML text
<p>I am working on a project for my HTML class and wasn't able to figure out how to capitalize the first letter of text that replaced an image during the onmouseover event, which, in turn, returned to its initial picture state during the onmouseout event. I was able to successfully make the text show up, but can't get the first letter to be capital. The text is supposed to be a link (href, not a href, in order to prevent the page from going to the link if "cancel" was hit on the confirm box that popped up when clicked). A confirm box pops up asking if they want to go to the link, if not, then when they hit cancel, the page stays.</p>

<p>this is my function:</p>

<pre><code>function planetname(x,y,z){
  document.getElementById(x).innerHTML=y;
  document.getElementById(x).style.backgroundColor="clear";
  document.getElementById(x).style.color="White";
  document.getElementById(z).style.height="172px";
}
</code></pre>

<p>In this case, x is the href link, y is the planet name and z is the table row that it is in. Here is part of my html:</p>

<pre><code>&lt;h3&gt;Click on one of the images below to learn more about that planet.&lt;/h3&gt;
    &lt;table height="150px" id="tabl"&gt;
        &lt;tr id="tr1"&gt;
            &lt;td onmouseover=planetname("mercurylink","mercury","tr1") onmouseout=planetpic("Mercury","mercurylink","tr1")&gt;&lt;href="mercury.htm" onclick=page("Mercury") id="mercurylink"&gt;&lt;img src="images/mercury.png" height="150px" id="mercurypic"&gt;&lt;/td&gt;
            &lt;td hidden id="Mercury"&gt;Mercury&lt;/td&gt;
        &lt;/tr&gt;
</code></pre>

<p>There is no issue with the onmouseout or onclick, it is just the onmouseover that is giving me some issue.</p>

<p>Thanks a lot.</p>