var isNS3, isNS4, isNS6, isNS4above, isIE, isIE4, isIE5, isIE6, isIE5above, isOpera, isOpera3, isOpera4, isOpera5, isKonqueror;
var isWin, isWinNT, isWin98, isWin95, isWin2000, isMac, isLinux, isUnix;
var isBrand = navigator.appName;
var agt = navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();
var navVer = parseInt(navigator.appVersion);
var os = "no information available";
var browser = "no information available";


// netscape 3
if (isBrand == "Netscape" && navVer < 4 && agt.indexOf("opera") == -1) {
	isNS3 = true;
	browser = "NS3";
}
else {
	isNS3 = false;
}

// netscape 4
if (isBrand == "Netscape" && navVer < 5 && navVer > 3 && agt.indexOf("opera") == -1) {
	isNS4 = true;
	browser = "NS4";
}
else {
	isNS4 = false;
}

// netscape 6
if (isBrand == "Netscape" && navVer >= 5 && agt.indexOf("opera") == -1) {
	isNS6 = true;
	browser = "NS6";
}
else {
	isNS6 = false;
}

// netscape 4 or better?
if (isBrand == "Netscape" && navVer >= 4 && agt.indexOf("opera") == -1) {
	isNS4above = true;
}
else {
	isNS4above = false;
}

// internet explorer 
if (agt.indexOf("msie") != -1) {
	isIE = true;
	browser = "IE3";
}
else {
	isIE = false;
}

// internet explorer 4
if (agt.indexOf("msie 4") != -1) {
	isIE4 = true;
	browser = "IE4";
}
else {
	isIE4 = false;
}

// internet explorer 5
if (agt.indexOf("msie 5") != -1) {
	isIE5 = true;	
	browser = "IE5";
}
else {
	isIE5 = false;
}

// internet explorer 6
if (agt.indexOf("msie 6") != -1) {
	isIE6 = true;
	browser = "IE6";
}
else {
	isIE6 = false;
}

// internet explorer 5 or better
if (isIE5 || isIE6) { 
	isIE5above=true; 
}
else {
	isIE5above=false;
}

// konqueror
if (agt.indexOf("konqueror") != -1) {
	isKonqueror = true;
	browser = "Konqueror";
	os = "Linux";
}
else {
	isKonqueror = false;
}

// Opera
if (agt.indexOf("opera") != -1) {
	isOpera = true;
	browser = "Opera";
}
else {
	isOpera = false;
}

// Opera 3
if (agt.indexOf("opera 3") != -1) {
	isOpera3 = true;
	browser = "Opera3";
}
else {
	isOpera3 = false;
}

// Opera 4
if (agt.indexOf("opera 4") != -1) {
	isOpera4 = true;
	browser = "Opera4";
}
else {
	isOpera4 = false;
}

// Opera 5
if (agt.indexOf("opera 5") != -1) {
	isOpera5 = true;
	browser = "Opera5";
}
else {
	isOpera5 = false;
}


// OS: windows
if (agt.indexOf('win') != -1) {
	isWin = true;
	os = "Win";
}
else {
	isWin = false;
}

// OS: windows 2000
if (agt.indexOf('windows nt 5') != -1) {
	isWin2000 = true;
	os = "Win2000";
}
else {
	isWin2000 = false;
}

// OS: windows nt
if ((agt.indexOf('winnt') != -1 || agt.indexOf('windows nt') != -1) && !isWin2000) {
	isWinNT = true;
	os = "WinNT";
}
else {
	isWinNT = false;
}

// OS: windows 98
if (agt.indexOf('win98') != -1 || agt.indexOf('windows 98') != -1) {
	isWin98 = true;
	os = "Win98";
}
else {
	isWin98 = false;
}

// OS: windows 95
if (agt.indexOf('win95') != -1 || agt.indexOf('windows 95') != -1) {
	isWin95 = true;
	os = "Win95";
}
else {
	isWin95 = false;
}

// OS: mac os
if (agt.indexOf('mac') != -1 || agt.indexOf('macintosh') != -1) {
	isMac = true;
	os = "Mac";
}
else {
	isMac = false;
}

// OS: Linux
if (agt.indexOf('linux') != -1) {
	isLinux = true;
	os = "Linux";
}
else {
	isLinux = false;
}

// OS: Unix
if (agt.indexOf('unix') != -1) {
	isUnix = true;
	os = "Linux";
}
else {
	isUnix = false;
}

/*
document.write("----------------------------------------------------------------------------<br>");
document.write(appVer+"<br>");
document.write("----------------------------------------------------------------------------<br><br>");

document.write("----------------------------------------------------------------------------<br>");
document.write(agt+"<br>");
document.write("----------------------------------------------------------------------------<br>");
document.write("Netscape 3: "+isNS3+"<br>");
document.write("Netscape 4: "+isNS4+"<br>");
document.write("Netscape 4 or higher version: "+isNS4above+"<br>");
document.write("Netscape 6: "+isNS6+"<br>");
document.write("IE: "+isIE+"<br>");
document.write("IE4: "+isIE4+"<br>");
document.write("IE5: "+isIE5+"<br>");
document.write("Opera: "+isOpera+"<br>");
document.write("Opera 3: "+isOpera3+"<br>");
document.write("Opera 4: "+isOpera4+"<br>");
document.write("----------------------------------------------------------------------------<br><br><br>");

document.write("----------------------------------------------------------------------------<br>");
document.write(agt+"<br>");
document.write("----------------------------------------------------------------------------<br>");
document.write("Windows: "+isWin+"<br>");
document.write("Windows NT: "+isWinNT+"<br>");
document.write("Windows 98: "+isWin98+"<br>");
document.write("Windows 95: "+isWin95+"<br>");
document.write("Windows 2000: "+isWin2000+"<br>");
document.write("Mac: "+isMac+"<br>");
document.write("Linux: "+isLinux+"<br>");
document.write("Unix: "+isUnix+"<br>");
document.write("----------------------------------------------------------------------------<br><br><br>");
*/
//alert(os);


