if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 1;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
			
			if (flashversion >= 6)
			{
				flashinstalled = 2;
			}
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 1;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 0;
	else
		flashinstalled = 1;
}
else
{
    // IE flash detection
	for(var i=7; i>0; i--)
	{
	    flashversion = 0;
	    try
	    {
		    var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
		    flashversion = i;
		    if (i>=6)
		    {
			    flashinstalled = 2;	
			}	
	    }
	    catch(e){}
    }
}

// Write out to Browser Window
/*
if (flashinstalled == 2)
{
	if (flashversion)
		document.write("You have Flash version " + flashversion + " installed.");
	else
		document.write("You have Flash installed, but I can't detect the version.");
}
else if (flashinstalled == 1)
{
    document.write("You don't have Flash installed.");
}
else
{
    document.write("I can't find out if you have Flash installed.");
}
*/
