Flash version detection!

Hi guys. I’ve been using a little javascript in my index page to detect the version of Flash Player and either display my flash index or a message suggesting they install the Player. It works splendidly except for one irritating problem: After the users have installed Flash Player from the Macromedia site, it doesn’t detect the new install, and still shows the “get Flash” page! Apparently, even after restarting the browser and even the computer, this is still a problem! Here’s my code, adapted from some different places on the web. I don’t think caching could be a problem because the javascript uses document.writes to generate the page, but I’m not a java expert.

<SCRIPT LANGUAGE="Javascript">
<!--

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
    x = navigator.plugins["Shockwave Flash"];
    if (x)
    {
        flashinstalled = 2;
        if (x.description)
        {
            y = x.description;
            flashversion = y.charAt(y.indexOf('.')-1);
        }
    }
    else
        flashinstalled = 1;
    if (navigator.plugins["Shockwave Flash 2.0"])
    {
        flashinstalled = 2;
        flashversion = 2;
    }
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
    x = navigator.mimeTypes['application/x-shockwave-flash'];
    if (x && x.enabledPlugin)
        flashinstalled = 2;
    else
        flashinstalled = 1;
}
else
    MSDetect = "true";

// -->
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">

on error resume next

If MSDetect = "true" Then
    For i = 2 to 6
        If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then

        Else
            flashinstalled = 2
            flashversion = i
        End If
    Next
End If

If flashinstalled = 0 Then
    flashinstalled = 1
End If

</SCRIPT>

Does anyone have any insight into the problem? What are some of the ways the pros have tackled version detection strategies?
Thanks so much in advance!!