<!--
// ####################################
// convert all characters to lowercase
// ####################################
var agt=navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();

// ####################################
// check browser version
// ####################################
var is_minor = parseFloat(appVer);
var is_major = parseInt(is_minor);

// IE browser checks...
var iePos  = appVer.indexOf('msie');
if (iePos !=-1) {
	is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
    is_major = parseInt(is_minor);
}

var is_ie   = (iePos!=-1);
var is_ie4up = (is_ie && is_minor >= 4);

// Netscape browser checks...
var nav6Pos = agt.indexOf('netscape6');
if (nav6Pos !=-1) {
	is_minor = parseFloat(agt.substring(nav6Pos+10))
    is_major = parseInt(is_minor)
}

var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1));
var is_nav4up = (is_nav && is_minor >= 4);
var is_nav5up = (is_nav && is_minor >= 5);
var is_nav6up = (is_nav && is_minor >= 6);
	
// #####################################
// check to see if OS is Win32 or Linux
// #####################################
var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
var is_win32 = (is_win95 || is_winnt || is_win98 ||
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
var is_linux = (agt.indexOf("inux")!=-1);
	
// #####################################
// see if java is enabled...
// #####################################
var is_java = (navigator.javaEnabled());
	

// #####################################
// write appropriate messages...
// #####################################

function checkBrowserSupport() {

	if (!is_java) {
		errStr='';
		errStr += 'Java is currently disabled or unavailable in your browser.\n';
		errStr += 'In order to use the MapCiti viewer, you must have a\n';
		errStr += 'java-enabled browser.\n';
		alert(errStr);
		return false;
	}

	if (!is_win32 && !is_linux) {
		errStr='';
		errStr += 'Your operating system is not officially supported by the\n';
		errStr += 'MapCiti viewer at this time. You may experience difficulty\n';
		errStr += 'using the map viewer applet. MapCiti\'s viewer applet\n';
		errStr += 'currently supports the following operating systems:\n\n';
		errStr += 'Windows 95/98 and NT/2000\n';
		errStr += 'Linux 6.2\n';
		alert(errStr);
		return false;
	}

	if (!is_nav4up && !is_ie4up) {
		errStr='';
		errStr += 'Your browser is not officially supported by the MapCiti viewer\n';
		errStr += 'applet. You may experience difficulty using the map viewer.\n';
		errStr += 'MapCiti\'s viewer applet currently supports the following browsers:\n\n';
		errStr += 'Windows: Internet Explorer 4.0 and above, Netscape 4.x and 6.1\n';
		errStr += 'Linux: Netscape 6.1\n';
		alert(errStr);
		return false;
	}

	if (is_linux && is_nav4up && !is_nav5up) {
		errStr='';
		errStr += 'Your browser is not officially supported by the MapCiti viewer applet\n';
		errStr += 'on the Linux platform. You may experience difficulty using the map\n';
		errStr += 'viewer applet. MapCiti\'s viewer currently supports the following\n';
		errStr += 'browsers for your platform:\n\n';
		errStr += 'Netscape 6.1\n';
		alert(errStr);
		return false;
	}
		
	return true;

} // end function checkBrowserSupport();

// -->

