flash_versions = 50;
flash_installed = 0;
flash_version = "0.0";

// Netscape style plugin detection
if (navigator.plugins && navigator.plugins.length) 
{
	for (x = 0; x <navigator.plugins.length; x++) 
	{
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) 
		{
			flash_version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash_installed = 1;
			break;
		}
	}
}

// ActiveX style plugin detection
else if (window.ActiveXObject) 
{
	for (x = 2; x <= flash_versions; x++) 
	{
		try 
		{
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if (oFlash) 
			{
				flash_installed = 1;
				flash_version = x + '.0';
			}
		}
		catch(e)
		{ }
	}
}
