// JavaScript Document

<!--javascript for detecting flash versions and redirecting if needed. --->
;
var flash_Version = 0;				// version the user really has
var javaScript_Version = 1.0;		// the version of javascript supported
var flash4 = 0;
var flash5 = 0;

// check the browser...we're looking for ie/win
var isIE = (navigator.appVersion.indexOf('MSIE') != -1) ? true : false;		// true if we're on ie
var isWin = (navigator.appVersion.indexOf('Windows') != -1) ? true : false; // true if we're on windows

// this is a js1.1 code block, so make note that js1.1 is supported.
jsVersion = 1.1;

// write vbscript detection if we're not on mac.
if(isIE && isWin){ // don't write vbscript tags on anything but ie win
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');	
	document.write('</SCR' + 'IPT\> \n'); // break up end tag so it doesn't end our script
}

// use the navigator plugins array to check for the version we are looking for

function flash5Installed(){	

	if (navigator.plugins){								// can we check for the plugins?
		if (navigator.plugins['Shockwave Flash']){		// or flash 3+ installed?

			// a flash plugin-description looks like this: Shockwave Flash 4.0 r5
			// so we can get the major version by grabbing the character before the period
			var description = navigator.plugins['Shockwave Flash'].description;
			// get the version (in front of the dot)
			flash_Version = parseInt(description.charAt(description.indexOf('.') - 1));
		}
	}
	//debugging stuff
	//alert("flash_version"+flash_Version);
	//alert("flash5:"+flash5);
	//alert("flash4:"+flash4);

	// now that we have the version, if we have four or five, continue, otherwise redirect to the no-flash page.
}

flash5Installed();	// Do the deed!
//-->
