I want to develop a web part (For: MOSS2007 and SP2010) that displays Flash file (.swf), and I found out this source code (http://www.codeproject.com/KB/sharepoint/MOSSFlashWebPart.aspx) which seems good. 

However, my problem is that I want to improve this web part by letting the web part checks if the visitor's browser supports Flash or not. I have checked out the script on: (http://www.adobe.com/products/flashplayer/download/detection\_kit/), But I am not able to get it working within my web part.

In my web part, I am calling the script in page load. But it seems that the script runs before rendering html content. Therefore, I am unable to get the output from the script in the server side code.

**So, could you please tell me how to tackle this issue ?**