I need to find a javascript that detect flash player, if there is no flash player then use image instead of flash. (I don't want to redirect, just want it all in one page)

Can someone help me out?