/*---------------------------------------------------------------------------
 *
 *         Glossary of JavaScript functions contained in this file
 *
 *--------------------------------------------------------------------------
 *
 * hasJavaScript12() - if browser is Netscape 3 + or IE 4 + which are 
 *					   JavaScript 1.2 compatible sets the global boolean 
 *					   variable 'gbJavaScript12' to true or false.
 *
 * isMSIE() - true if the current browser is MS Internet Explorer
 *
 * isNav() - true if the current browser is Netscape Navigator 
 *
 * Dependencies: string.js
 *
 *--------------------------------------------------------------------------
 *
 *--------------------------------------------------------------------------*/

 /*--------------------------------------------------------------------------*/

/*
	Detects if browser is Netscape 3 + or IE 4 + which are JavaScript 1.2 compatible
	and set the global boolean variable 'gbJavaScript12 to true or false accordingly.
 */

var gbHasJavaScript12 = hasJavaScript12();
var gbIsNav = isNav();
var gbIsMSIE = isMSIE();

function isNav()
{
	return navigator.userAgent.indexOf( "MSIE" ) < 0;
}

function isMSIE()
{
	return navigator.userAgent.indexOf( "MSIE" ) >= 0;
}

function hasJavaScript12()
{
	var browserName = navigator.userAgent;
	var browserVersion = navigator.userAgent.substring(8,9);

	if (navigator.userAgent.indexOf("Mozilla") >= 0 && browserVersion >= 3)
	{
		return true; 
	}

	alert( "unsupported borwser: " + browserName + " " + browserVerion );

	return false;
}

