Topic: CMS integration problem

I have been attempting to integrate Simpleviewer into a CMS I use called Website Baker

Using the server side script I have so far maneged to create a backend to the module where the user enters their settings (which are saved to a database) and then thumbs and and XML file are created in the directory containing the media

The problem im having is with displaying the gallery

I am basicly trying to run multiple gallerys off a single set of swfobject js and viewer swf

All the simpleviewer files are kept within another directory and so is the actual page:

/module/simpleviewer/[viewer swf, swfobject js, buildgallery php]
/media/gallery/[1 jpg, 2 jpg, /thumbs/[1 jpg, 2 jpg]]
/pages/galley php

also
/module/simpleviewer/view php

/pages/galley php is the page the user goes to but it is fromed by /module/simpleviewer/view php

This is the code in view php:

<script type="text/javascript" src="<?php echo WB_PATH ?>/modules/simpleviewer/swfobject js"></script>
<style type="text/css">    
    /* hide from ie on mac */
    html &#123;
        height&#58; 100%;
        overflow&#58; hidden;
    &#125;
    
    #flashcontent &#123;
        height&#58; 100%;
    &#125;
    /* end hide */

    body &#123;
        height&#58; 100%;
        margin&#58; 0;
        padding&#58; 0;
        background-color&#58; #181818;
        color&#58;#ffffff;
        font-family&#58;sans-serif;
        font-size&#58;20;
    &#125;
    
    a &#123;    
        color&#58;#cccccc;
    &#125;
</style>

    <div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player <a href="www macromedia com/go/getflashplayer/">Get Flash </a></div>    
    <script type="text/javascript">
    
        var fo = new SWFObject&#40;"<?php echo WB_PATH ?>/modules/simpleviewer/viewer swf", "viewer", "100%", "100%", "8", "#181818"&#41;;
        
    
        fo write&#40;"flashcontent"&#41;;    
    </script>    

I have checked and swfobject js is found

Unfortunatly i get the "SimpleViewer requires JavaScript and the Flash Player Get Flash " message

Any ideas on getting this to work