haveflash = false;
var havejava = false;
var OSName = "unknown";
var bName = "unknown";
var bVer = 0.0;
var didVB = false;

if (navigator.appVersion.indexOf("Mac") > 0) OSName = "Mac";
if (navigator.platform.indexOf("Mac")>=0) OSName = "Mac";
if (navigator.appVersion.indexOf("Win") > 0) OSName = "Win";
if (navigator.appName.substring(0,8) == "Netscape") bName = "NN";
if (navigator.appName.substring(0,9) == "Microsoft") bName = "IE";


// Opera fix
if(navigator.userAgent.indexOf("Opera")>=0){
	bName = "OP";
}

if (bName == "NN") {
 bVer=parseFloat(navigator.appVersion);
};

if (bName == "IE") {
 vStart=navigator.appVersion.indexOf("MSIE")+4;
 bVer=parseFloat(navigator.appVersion.substr(vStart,255));
};

if (bVer >= 4.0) {
 havejava=navigator.javaEnabled(); // doesn't do it's job ...
 // geht bei Mac-NN 4.5 ziemlich gut
};

if ((bName == "IE") && (OSName == "Win")) {
 document.writeln('<script type="text/vbscript" language="VBscript">');
 document.writeln('On Error Resume Next');
 document.writeln('Set theObject = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")');
 document.writeln('On Error goto 0');
 document.writeln('If IsObject(theObject) Then');
 document.writeln('  interest = theObject.QuickTimeVersion');
 document.writeln('  If theObject.IsQuickTimeAvailable(0) Then');
 document.writeln('    haveqt = true');
 document.writeln('    If (theObject.QuickTimeVersion > 69206016) Then');
 document.writeln('      haveqt5 = true');
 document.writeln('    End If');
 document.writeln('  End If');
 document.writeln('End If');
 document.writeln('</'+'script>');
 document.writeln('<script type="text/vbscript" language="VBscript">');
 document.writeln('On Error Resume Next');
 document.writeln('haveqt5ax = (IsObject(CreateObject("QuickTime.QuickTime.1")))');
 document.writeln('</'+'script>');
 document.writeln('<script type="text/vbscript" language="VBscript">');
 document.writeln('On Error Resume Next');
 document.writeln('haveflash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))');
 document.writeln('</'+'script>');
 document.writeln('<script type="text/vbscript" language="VBscript">');
 document.writeln('On Error Resume Next');
 document.writeln('haveflash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))');
 document.writeln('</'+'script>');
 document.writeln('<script type="text/vbscript" language="VBscript">');
 document.writeln('On Error Resume Next');
 document.writeln('didVB = true');
 document.writeln('</'+'script>');
}

 if (navigator.plugins["Shockwave Flash"]){
  var flashDescription = navigator.plugins["Shockwave Flash"].description;
  var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
  haveflash = flashVersion == 6;
  haveflash = flashVersion == 7;
 }


if ((bName == "NN" || OSName == "Mac") && navigator.mimeTypes) {
 for(var i=0; i<navigator.mimeTypes.length; i++) {
  if(navigator.mimeTypes[i].type=="application/x-shockwave-flash" && navigator.mimeTypes[i].enabledPlugin) {
   haveflash = true;
  }
 };
}

if(bName=="OP"){		
	haveflash = false;	// beacause of poor Flash Support in Opera (Transparency/Accessing Javascript)
}
