//sniffer functions

function isV3()
{
	return parseInt(navigator.appVersion) < 4;
}

function isWebTV()
{
	return navigator.userAgent.toLowerCase().indexOf('webtv') != -1;
}

function isNN4()
{
	return navigator.appName.indexOf('Netscape') != -1 && parseInt(navigator.appVersion) == 4;
}

function isNN6()
{
	return navigator.appName.indexOf('Netscape') != -1 && navigator.userAgent.indexOf('Netscape6') != -1;
}

function isNN7()
{
		return navigator.appName.indexOf('Netscape') != -1 && navigator.userAgent.indexOf('Netscape/7') != -1;
}

function isOpera()
{
	return navigator.userAgent.indexOf('Opera') != -1;
}

function isIE4()
{
	if(isOpera())
		return false;
		
	return navigator.appName.indexOf('Microsoft') != -1 && navigator.userAgent.indexOf('MSIE 4') != -1;
}

function isIE5()
{
	if(isOpera())
		return false;
	
	return !isIE5p5() && navigator.appName.indexOf('Microsoft') != -1 && navigator.userAgent.indexOf('MSIE 5') != -1;
}

function isIE5p5()
{
	if(isOpera())
		return false;
	
	return navigator.appName.indexOf('Microsoft') != -1 && navigator.userAgent.indexOf('MSIE 5.5') != -1;
}

function isIE6()
{
	if(isOpera())
		return false;
	
	return navigator.appName.indexOf('Microsoft') != -1 && navigator.userAgent.indexOf('MSIE 6') != -1;
}

function isIE7()
{
	if(isOpera())
		return false;
	
	return navigator.appName.indexOf('Microsoft') != -1 && navigator.userAgent.indexOf('MSIE 7') != -1;
}

function isIE8()
{
	if(isOpera())
		return false;
	
	return navigator.appName.indexOf('Microsoft') != -1 && navigator.userAgent.indexOf('MSIE 8') != -1;
}

function isPlatform(box)
{
	return navigator.userAgent.toLowerCase().indexOf(box.toLowerCase()) != -1;
}

function isIECompat()
{
	return (IE7 || IE6 || IE5p5) && !isPlatform("mac");
}


var NN4 = isNN4();

if(isV3() || NN4 || isWebTV())
	location = "unsupported.htm";
	
var Opera = isOpera();	
var NN6 = isNN6();
var NN7 = isNN7();
var IE4 = isIE4();
var IE5 = isIE5();
var IE5p5 = isIE5p5();
var IE6 = isIE6();
var IE7 = isIE7();
var IE8 = isIE8();
var IE = IE4 || IE5 || IE5p5 || IE6 || IE7 || IE8;

var isFlashEnabled = 0;

if(IE && isPlatform("win")){
   document.write('<SCRIPT LANGUAGE=VBScript\> \n');
   document.write('on error resume next \n');
   document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
   document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
   document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
   document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))\n');
   document.write('</SCRIPT\> \n');
   
   isFlashEnabled = plugin;
}

isFlasEnabled = isFlashEnabled || NN7;	//Safe to assume Gecko users will have the plugin
isIECompat = IE || NN7;

