<!--

// This script tests for Shockwave Flash

flash_versions = 15;	// set the maximum number of versions to test for. 15 indicates
						// testing up to Flash v.15
						

// create an object to organize the flash attributes within
var flash = new Object();

// set the default version 
flash.version='0';

// default the object to not installed
flash.installed=false;


// based on the browser, test for plugins or activeX


// --------------------------   NETSCAPE	--------------------------   
// sence all Netscape plug-ins for flash.
if (navigator.plugins && navigator.plugins.length) 
{
	for (x=0; x < navigator.plugins.length; x++) 
	{ 
		// look in the description of all the plugins for 'Shockwave Flash'
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) 
		{
			// grab the version and bail.
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}



// --------------------------   IE 	--------------------------   
if (window.ActiveXObject) 
{
	for (x = 2; x <= flash_versions; x++) 
	{
		try 
		{
			// try to create the flash for each version we are testing for.
			// .... i.e. ShockwaveFlash.ShockwaveFlash.x
			oFlash = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.' + x + '');
			if(oFlash) 
			{
				//if  we're here, it's created.
				flash.installed = true;
				flash.version = x ;
		    }
	    }
	    catch(e)    
	    {
			// This catches the error when you cannot create the object
	    }
    }
}



// -------------------  Build out the variable -------------------
// Create an array in the following style: flash.ver[x]
// load it with either true or false if  Flash is installed and there is a version >= the current
flash.ver = Array();
for(i = 2; i <= flash_versions; i++) 
{
	flash.ver[i] = (flash.installed && parseInt(flash.version) >= i);
}

//-->
