Error code in javascript
<p>Why does this code not work?</p>

<pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;

&lt;head&gt;&lt;/head&gt;


&lt;script language="JavaScript" type="text/javascript"&gt;
  if(document.images)
  {
    Narrow=new image
    Parrow=new image

    Narrow.src="C:/N.png"
    Parrow.src="C:/P.png"
  }
  else
  {
     Narrow=""
     Parrow=""
     document.arrow=""
  }
 &lt;/script&gt;



&lt;body&gt;
    &lt;A href="google.com" onmouseover="document.arrow.src=Parrow.src" onmouseout="document.arrow.src=Narrow.src"&gt;
    &lt;img src="C:/N.png" Name="arrow" border="0" alt="arrow" /&gt;&lt;/A&gt;&lt;/body&gt;
</code></pre>

<blockquote>
  <p>line 9 column 6 - Warning: <code>&lt;script&gt;</code> isn't allowed in <code>&lt;html&gt;</code> elements<br>
  line 4 column 1 - Info: <code>&lt;html&gt;</code> previously mentioned<br>
  Info: Doctype given is "-//W3C//DTD XHTML 1.0 Transitional//EN"<br>
  Info: Document content looks like XHTML 1.0 Transitional<br>
  1 warning, 0 errors were found!</p>
</blockquote>

<p><strong>Correct code:</strong></p>

<p></p>

<pre><code>&lt;script language="JavaScript" type="text/javascript"&gt; 
if (document.images)
{
 img_N =new Image();

  img_N.src ="C:/N.png";


 img_P=new Image();

  img_P.src="C:/P.png";


    }
 function mouseOverImage()
{
    document.arrow.src = img_P.src
}
function mouseOutImage()
{
    document.arrow.src = img_N.src
}

 &lt;/script&gt;

&lt;body&gt;

  &lt;A href="google.com" onmouseover="mouseOverImage()" onmouseout="mouseOutImage()"&gt;
&lt;img src="C:/N.png" name="arrow" border="0" alt="arrow" /&gt;&lt;/A&gt;
&lt;/body&gt; 
</code></pre>
