Hello everyone. I have an XML page I'm trying to load with javascript to display on Firefox. I can get this to work on Internet Explorer but it would not work on Firefox. I can't figure out what I'm doing wrong. Can someone glance at my short piece of code below and tell me why this wouldn't work on firefox? Thanks. (The XML page is listed below the HTML portion).

Code:
<html>
<head>

<script language="JavaScript" for="window" event="onload">

var xmlDoc;
 if (window.ActiveXObject) //this portion is meant for I.E.
 {
    xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
 }
else if (document.implementation && document.implementation.createDocument) //for firefox
{
    xmlDoc = document.implementation.createDocument("", "doc", null);
}

xmlDoc.async="false"
xmlDoc.load("note.xml")
nodes = xmlDoc.documentElement.childNodes
to.innerText = nodes.item(0).text
from.innerText = nodes.item(1).text
header.innerText = nodes.item(2).text
body.innerText = nodes.item(3).text

</script>

<title>HTML using XML data</title>
</head>

<body bgcolor="yellow">
<h1>Refsnes Data Internal Note</h1>

<b>To: </b><span id="to"></span>

<br>
<b>From: </b><span id="from"></span>

<hr>
<b><span id="header"></span></b>

<hr>
<span id="body"></span>

</body>
</html>
-------------------------(node.xml below)
<note>
   <to>Tove</to>
   <from>Jani</from>
   <heading>Reminder</heading>
   <body>Don't forget me this weekend!</body>
</note>