Ton code marche très bien, c'est bizzare

.
Voilà le code de mon fichier js.js :
var titre = document.getElementById('titre');
var valeur = titre.firstChild.nodeValue;
alert(valeur);
Il n'y a rien avant, et ce qu'il y a après marche très bien si j'enleve ces trois lignes et sont dans des fonctions.
Voilà le code généré par le PHP du CMS utilisé :
[b]<script src="js.js"></script>[/b]<br /><div style="text-align: center;"><a href="index.php?file=Sections" style="text-decoration:none"><big><b>Sezioni</b></big></a></div><br />
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr><td style="background: #485A84;border: 1px solid #232D46;" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td style="width: 5%;"> </td>
<td style="width: 90%;" align="center"><big><b><div id="tit">That will be a good test</div></b></big></td>
<td style="width: 5%;" align="center"><a href="#" onclick="javascript:window.open('index.php?file=Sections&nuked_nude=index&op=pdf&artid=2','projet','toolbar=yes,location=no,directories=no,scrollbars=yes,resizable=yes')"><img style="border: 0;" src="images/pdf.gif" alt="" title="Stampa in formato PDF" /></a></td></tr></table></td></tr>
<tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><b>Categoria :</b> Nessuno</td></tr>
<tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><b>aggiunto il :</b> 05.05.2005 12:22</td></tr>
<tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><b>Autore :</b> <a href="index.php?file=Members&op=detail&autor=Info-Rital">Info-Rital</a></td></tr>
<tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><b>letture :</b> 110</td></tr>
<tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><b>Commenti :</b> 0 <small>[ <a href="#" onclick="javascript:window.open('index.php?file=Comment&nuked_nude=index&op=view_com&im_id=2&module=Sections','popup','toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=360,height=380,top=100,left=100');return(false)">Posta un commento</a> ]</small>
</td></tr><tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><b>Nota :</b> Non votato <small>[ <a href="#" onclick="javascript:window.open('index.php?file=Vote&nuked_nude=index&op=post_vote&vid=2&module=Sections','screen','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=350,height=150,top=30,left=0');return(false)">Valuta</a> ]</small>
</td></tr><tr style="background: #596B94;"><td style="border: 1px dashed #232D46;"><br /><div id="all-box"><div id="content">Aliquam ac augue et diam imperdiet pharetra</div></div>[b]<div id="titre">2</div>[/b]<br /><div style="text-align: center;"> </div></td></tr></table><br />
</td></tr></table></td></tr></table>
J'ai mis en gras les parties ayant un lien direct avec le problème.