/*
	(c)2004 GE Medical Systems


	Version control:
*/
// <SCRIPT>	

//
// BrowserVersion()
//
function BrowserVersion()
{
	// determine version and major version
	var	strVersion = new String(navigator.appVersion);
	var ichMSIE    = strVersion.indexOf('MSIE');

	if (ichMSIE == -1)
		return 0;

	strVersion = strVersion.substr(ichMSIE + 4);
	var	ichSC  = strVersion.indexOf(';');

	if (ichSC == -1)
		return 0;

	strVersion = strVersion.substr(0, ichSC);

	var ichDot = strVersion.indexOf('.');
	var strVersionMajor = strVersion.substr(0, ichDot);

	// determine minor version (SP)
	var nVersionMinor	= 0;
	var	strVersionMinor = new String(navigator.appMinorVersion);
	var ichSP		    = strVersionMinor.indexOf('SP');

	if (ichSP != -1)
	{
		strVersionMinor = strVersionMinor.substr(ichSP + 2);
		ichSC			= strVersionMinor.indexOf(';');

		if (ichSC != -1)
		{
			strVersionMinor = strVersionMinor.substr(0, ichSC);

			if (!isNaN(strVersionMinor))
			{
				nVersionMinor = parseInt(strVersionMinor)
			}
		}
	}


	if (!isNaN(strVersion))
		return strVersion * 100 + nVersionMinor;
	else if (!isNaN(strVersionMajor))
		return strVersionMajor * 100;  // skip minor version info
	else
		return 0;
}
