var flashInstalled = false;
var isIE = (navigator.userAgent.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.userAgent.indexOf("Win") != -1) ? true : false;

if (navigator.plugins && navigator.plugins.length){
var x = navigator.plugins["Shockwave Flash"];
if (x){
if (x.description){
y = x.description;
var flashVersion = y.charAt(y.indexOf('.')-1); //checks flash version
if (flashVersion>=6){ //checks for version 6 and above.\
flashInstalled = true;
}
}
}
}

if(isIE && isWin){ //can't read from plugins array on ie pc...
document.write('<scr' + 'ipt language=VBScript> \n');
document.write('on error resume next \n');
document.write('flashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
document.write('flashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
document.write('flashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
document.write('<\/scr' + 'ipt> \n');
}
