First of all, I would challenge the base assumption - you can safely assume that the only people who don't have Flash don't have it by choice or necessity, not by accident or because they didn't know about it. So catering to people who don't have Flash means offering alternative content, not a link for them to download it.
No detection script is necessary. <object> semantics include a mechanism for providing content to browsers that don't support the object mime-type. The basic syntax goes like this:
<!-- flash content -->
data="flash_file.swf" width="500" height="350">
<param name="movie" value="flash_file.swf" />
<!-- noflash content -->
... etc ...
Plus whatever other <param/>s you're using.