Whats wrong with this code?
<pre><code>
function menuhover(id,state){
    if(id=="home"){
     if(state=="over"){
      document.getElementById(id).src="pages/styles/images/home1hover.png";
     } else if(state=="out"){
      document.getElementById(id).src="pages/styles/images/home1.png";
     }
    } else if(id=="news"){
     if(state=="over"){
      document.getElementById(id).src="pages/styles/images/news2hover.png";
     } else if(state=="out"){
      document.getElementById(id).src="pages/styles/images/news2.png";
     }
    } else if(id=="register"){
     if(state=="over"){
      document.getElementById(id).src="pages/styles/images/register3hover.png";
     } else if(state=="out"){
      document.getElementById(id).src="pages/styles/images/register3.png";
     }
    } else if(id=="contrib"){
     if(state=="over"){
      document.getElementById(id).src="pages/styles/images/contributor4hover.png";
     } else if(state=="out"){
      document.getElementById(id).src="pages/styles/images/contributor4.png";
     }
    } else if(id=="login"){
     if(state=="over"){
      document.getElementById(id).src="pages/styles/images/login5hover.png";
     } else if(state=="out"){
      document.getElementById(id).src="pages/styles/images/login5.png";
     }
    }
}</code></pre>

<p>it is referenced in</p>

<pre><code>&lt;div class="menu"&gt;
    &lt;img class="banner" src="pages/styles/images/banner.png" border="0"/&gt;
    &lt;p class="link"&gt;&lt;a href="http://www.realmsofruin.co.cc"&gt;&lt;img id="home" src="pages/styles/images/home1.png" border="0" onmouseover="menuhover(home,over)" onmouseout="menuhover(home,out)"/&gt;&lt;/a&gt;&lt;/p&gt;
    &lt;p class="link"&gt;&lt;a href=""&gt;&lt;img id="news" src="pages/styles/images/news2.png" border="0" onmouseover="menuhover(news,over)" onmouseout="menuhover(news,out)"/&gt;&lt;/a&gt;&lt;/p&gt;
    &lt;p class="link"&gt;&lt;a href=""&gt;&lt;img id="register" src="pages/styles/images/register3.png" border="0" onmouseover="menuhover(register,over)" onmouseout="menuhover(register,out)"/&gt;&lt;/a&gt;&lt;/p&gt;
    &lt;p class="link"&gt;&lt;a link=""&gt;&lt;img id="contrib" src="pages/styles/images/contributor4.png" border="0" onmouseover="menuhover(contrib,over)" onmouseout="menuhover(contrib,out)"/&gt;&lt;/a&gt;&lt;/p&gt;
    &lt;p class="link"&gt;&lt;a link=""&gt;&lt;img id="login" src="pages/styles/images/login5.png" border="0" onmouseover="menuhover(login,over)" onmouseout="menuhover(login,out)"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>and the error console tells me this</p>

<p>over is not defined
out is not defined..</p>

<p>how am i supposed to define them??</p>
