function Browser() { 
this.isIE=false;
this.isNS=false;
this.isOpera=false;
this.isMozilla=false;

this.isWin=false;
this.isMac=false;
this.isLinux=false;

this.version=0;
this.isFlashed=false;

var requiredFlashVersion=4;
var maxFlashVersion=6;
var agent=navigator.userAgent.toLowerCase();

this.isIE = agent.indexOf("msie") != -1 && agent.indexOf("opera") == -1; 
this.isNS = (agent.indexOf("netscape") != -1 || navigator.appName == "Netscape") && agent.indexOf("opera") == -1;//in netscape4 "netscape" doesn't appear in navigator.userAgent
this.isOpera = agent.indexOf("opera") != -1;
this.isMozilla = agent.indexOf("mozilla") != -1;
this.isKonqueror = agent.indexOf("konqueror") != -1;

this.isWin = agent.indexOf("win") != -1;
    this.isMac = agent.indexOf("mac") != -1;
    this.isLinux = agent.indexOf("linux") != -1;
        
var minor = parseFloat(navigator.appVersion);

if (this.isNS){
if (minor >= 5) {
this.version=6;
} else {
this.version=minor;
}
}else if(this.isKonqueror){
this.version=minor;
}else if(this.isIE){
if (agent.indexOf("msie 5") != -1 && minor == 4) {
this.version = 5;
} else {
this.version = minor;
}
}else if (this.isOpera){
if (agent.indexOf("opera 2") != -1 || agent.indexOf("opera/2") != -1) 
this.version=2;
if (agent.indexOf("opera 3") != -1 || agent.indexOf("opera/3") != -1) 
this.version=3;
if (agent.indexOf("opera 4") != -1 || agent.indexOf("opera/4") != -1) 
this.version=4;
if (agent.indexOf("opera 5") != -1 || agent.indexOf("opera/5") != -1) 
this.version=5;
if (agent.indexOf("opera 6") != -1 || agent.indexOf("opera/6") != -1) 
this.version=6;    
}

// Robin 10.07.2003: Test für Flash-Log
this.flashversion = "X";
if (this.isIE && this.isWin) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
for (i = requiredFlashVersion; i<maxFlashVersion+1; i++) {
document.write('flash_' + i + 'Installed = false \n');
document.write('flash_' + i + 'Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + i + '"))) \n');
}
document.write('<' + '/SCR' + 'IPT\> \n');

for (i = maxFlashVersion; i >= requiredFlashVersion; i--) {
if (eval("flash_" + i + "Installed")) {
this.flashversion = i;
this.isFlashed=true;
break;
}
}
} else if (navigator.plugins && navigator.plugins["Shockwave Flash"]) {
var plugin = navigator.plugins["Shockwave Flash"];
this.flashversion = plugin.description.charAt(plugin.description.indexOf(".")-1);
this.isFlashed = (this.flashversion >= requiredFlashVersion);
}
}
var myBrowser = new Browser();
