Topic: problem inserting gallery with ajax

i'm very new to this, and i'm building my own site from scratch ( typing the code to a text editor, for learning porpuses ).

my site has only one HTML file, the index.html. then, all the sections are built with ajax importing XML files. i have a javascript that replaces the DIV i tell it to, with the XML file i want. in the gallery section the script insert an XML file that contains this:

<div id="flashcontent">
&#40;as it says on the FAQ, i cannot post it..... &#41;
<script type="text/javascript">          
var fo = new SWFObject&#40;"viewer.swf", "viewer", 
"640", "480", "7", "#181818"&#41;;              

and in the head of my only HTML i have this:

<script type="text/javascript" src="gallery/swfobject.js"></script>

i think that this is OK, but all i get is the "flashcontent" div content as text...

i have all the files and folder of Simpleviewer on the same folder as the gallery.xml.

any ideas?

thanks for the help!