Javascript error when inserting an SWF into a page from tempplate

HI, Ive set up a very simple template in Dreamweaver CS4, then created a new html page from this template.
my problem is when I insert an SWF into a table I get this error message…

while executing objecttag in image.htm a javascript error occurred” and wont insert it at all. :*(

I dont get this message when inserting an SWF into a table from a non templated page ?
any ideas why?.. Thanks