/* Flash Version Detect Script ©2010 John Davenport Scheuer
   as first seen in http://www.dynamicdrive.com/forums/
   username: jscheuer1 - This Notice Must Remain for Legal Use
   */

function detectFlash(){
	var flashIsInstalled = false;
	if(typeof ActiveXObject !== 'undefined'){
		// Check ActiveXObject for Flash version capability
		/*@cc_on @*/
		/*@if(@_jscript_version >= 5)
			try {
				flashIsInstalled = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
			} catch (e) {}
		@end @*/
		if(flashIsInstalled){
			flashIsInstalled = true;
		}
	} else {
		// Check navigator.plugins for "Shockwave Flash"
		var p = navigator.plugins, i = p.length - 1, re = /Shockwave Flash/;
		for (i; i > -1; --i){
			if(re.test(p[i].name)){
				flashIsInstalled = p[i];
				break;
			}
		}
		if(flashIsInstalled){
			flashIsInstalled = true;
		}
	}
	return flashIsInstalled;
}
