//Flash.6
//----------------------------------------------
var pluginTargetVersion = 6;
var flashWidth = "65";
var flashHeight = "10"
//----------------------------------------------


var bName = navigator.appName;
var bType = navigator.appVersion;
var browserName;
var browserVersion;
var browserPlatform;
var pluginDetected = false;

browserName = (bName.indexOf('Netscape')>=0)? '0':(bName.indexOf('MSIE')>=0 || bName.indexOf('Microsoft Internet Explorer')>=0)? '1':'2';
browserPlatform = (bType.indexOf('Win')>=0)? '0':(bType.indexOf('Mac')>=0 || bType.indexOf('PPC')>=0)? '1':'3';
browserVersion = (browserName == '1')? parseInt(bType.slice(22,bType.length)):parseInt(bType);

if (navigator.userAgent && browserName == '1' && browserPlatform == '0'){
	document.writeln('<script language="VBscript">');
	document.writeln('detectableWithVB = False');
	document.writeln('If ScriptEngineMajorVersion >= 2 then');
	document.writeln('  detectableWithVB = True');
	document.writeln('End If');
	document.writeln('Function detectActiveXControl(activeXControlName)');
	document.writeln('  on error resume next');
	document.writeln('  detectActiveXControl = False');
	document.writeln('  If detectableWithVB Then');
	document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
	document.writeln('  End If');
	document.writeln('End Function');
	document.writeln('<\/scr' + 'ipt>');
}

function checkForPlugin(){
	if(navigator.plugins && browserName == '0' || navigator.plugins && browserName == '1' && browserPlatform == '1'){
 		for (i=0;i<navigator.plugins.length;i++){
			for(j=0;j<navigator.plugins[i].length;j++){
	 			if (navigator.mimeTypes && navigator.plugins[i][j].type.indexOf('application/x-shockwave-flash') != -1 && (navigator.plugins[i][j].suffixes.indexOf('swf') != -1) && navigator.plugins[i].description.indexOf('Flash') != -1 && parseInt(navigator.plugins[i].description.split(" ")[2].split(".")[0]) >= pluginTargetVersion) pluginDetected = true;
			}
		}
	}
	else if (navigator.userAgent && browserName == '1' && browserPlatform == '0') pluginDetected = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.'+pluginTargetVersion);
}

	if(browserVersion > 2) checkForPlugin();
