There are easier ways to embed flash these days than adding the required tags by hand. I have used SWFObject and UFO int past to handle that task easily and dynamically in my applications. Both are unobtrusive libraries, which means that all (X)HTML, CSS and JavaScript code is fully separated from each other.

SWFObject
SWFObject is a small Javascript file used for embedding Adobe Flash
content. The script can detect the Flash plug-in in all major web
browsers (on Mac and PC) and is designed to make embedding Flash movies
as easy as possible. It is also very search engine friendly, degrades
gracefully, can be used in valid HTML and XHTML 1.0 documents.

Link

UFO
UFO is a DOM script that detects the Flash plug-in and embeds Flash
objects (files with the .swf extension). It has its roots in the Web
Standards community and is designed to support W3C standards compliant,
accessible and search engine friendly web design. It also contains
several features and best practice techniques that other scripts
currently don’t have.UFO is a DOM script that detects the Flash plug-in and embeds Flash objects.

Link

Both projects have joined forces and are developing SWFFix, which is still in beta.