
<!--


// ####### Check Browser #######
// yourBro[0] = Browser Code  ##
// yourBro[1] = Browser Name  ##
// #############################

var yourBro = [];

//perform checks for different browsers
if( navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ) ) { yourBro[0] = 'kde'; yourBro[1] = 'Konqueror / Safari / OmniWeb 4.5+'; }
else if( document.layers && !document.classes ) { yourBro[0] = 'omn'; yourBro[1] = 'Omniweb 4.2-'; }
else if( document.layers ) { yourBro[0] = 'ns4'; yourBro[1] = 'Netscape 4.x'; }
else if( window.opera && document.childNodes ) { yourBro[0] = 'op7'; yourBro[1] = 'Opera 7+'; }
else if( navigator.userAgent.toLowerCase().indexOf( 'opera' ) + 1 ) { yourBro[0] = 'opr'; yourBro[1] = 'Opera 6-'; }
else if( navigator.appName.indexOf( 'WebTV' ) + 1 ) { yourBro[0] = 'wtv'; yourBro[1] = 'WebTV'; }
else if( navigator.product == 'Gecko' ) { yourBro[0] = 'gek'; yourBro[1] = 'Gecko engine (Mozilla, Netscape 6+ etc.)'; }
else if( document.getElementById ) { yourBro[0] = 'ie5'; yourBro[1] = 'Internet Explorer 5+'; }
else if( document.all ) { yourBro[0] = 'ie4'; yourBro[1] = 'Internet Explorer 4'; }
else { yourBro[0] = 'oth'; yourBro[1] = 'an unknown browser'; }

//perform checks for different operating systems
if( navigator.userAgent.toLowerCase().indexOf( 'linux' ) + 1 ) { yourBro[2] = 'lin'; yourBro[3] = 'Linux'; }
else if( navigator.userAgent.toLowerCase().indexOf( 'x11' ) + 1 ) { yourBro[2] = 'unx'; yourBro[3] = 'Unix'; }
else if( navigator.userAgent.toLowerCase().indexOf( 'mac' ) + 1 ) { yourBro[2] = 'mac'; yourBro[3] = 'MacOS'; }
else if( navigator.userAgent.toLowerCase().indexOf( 'win' ) + 1 ) { yourBro[2] = 'win'; yourBro[3] = 'Windows PC'; }
else if( navigator.userAgent.toLowerCase().indexOf( 'webtv' ) + 1 ) { yourBro[2] = 'wtv'; yourBro[3] = 'WebTV Platform'; }
else { yourBro[2] = 'oth'; yourBro[3] = 'an unknown operating system'; }


// ################## Check for folder level ##################
// strPath = 2 (root level) - "/file.ext"                    ##
// strPath = 3 (1 level down) - "/folder/file.ext"           ##
// strPath = 4 (2 level down) - "/folder/subfolder/file.ext" ##
// strPath > 4 (404 error) - "/folder/file.ext" 	     ##
// ############################################################

var strPath = window.location.pathname;
var strMatch = strPath.toLowerCase();

strPath = strPath.split("/");
strPath = strPath.length;

function checkBro() {
	if (yourBro[0] == "ns4") {
		if (strPath == 2) {
			window.location.href = "redirect.asp";
		} else if (strPath == 3) {
			window.location.href = "../redirect.asp";
		} else if (strPath == 4) {
			window.location.href = "../../redirect.asp";
		} else if (strPath > 4) {
			window.location.href = "../redirect.asp";			
		}
	}
}


//alert(window.location.pathname + " = " + strPath);
//alert("Browser = " + yourBro[1] + "\nOS = " + yourBro[3]);


//-->