//Flash detector 0.1
//  This module detects the version of flash from 5 to 8
//  First it checks M$ plugins using VBscript, then Netscape style plugins

var isFlash5 = false;
var isFlash6 = false;
var isFlash7 = false;
var isFlash8 = false;
var iVersion = 0;

if ((navigator.appVersion.indexOf("MSIE") != -1) && (navigator.appVersion.indexOf("Windows") != -1)){
    sOut='<scr' + 'ipt language="VBScript"\> \n';
    sOut+='on error resume next \n';
    sOut+='isFlash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n';  
    sOut+='isFlash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n';   
    sOut+='isFlash7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n';  
    sOut+='isFlash8 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n';  
    sOut+='</scr' + 'ipt\> \n';
    document.write(sOut);
}

if (navigator.plugins) {
    if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]){
	var s2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
	var sD = navigator.plugins["Shockwave Flash" + s2].description;
	var iV = parseInt(sD.charAt(sD.indexOf(".") - 1));
	isFlash5 = iV == 5;
	isFlash6 = iV == 6;
	isFlash7 = iV == 7;
	isFlash8 = iV == 8;
    }
}

for (var i = 5; i <= 8; i++) {  
    if (eval("isFlash" + i) == true){iVersion = i;}
}

if(navigator.userAgent.indexOf("WebTV") != -1){iVersion = 3;}  
