// browser version
var g_bIE4 = (document.all && !document.getElementById) ? true : false;
var g_bIE5 = (document.all && document.getElementById) ? true : false;
var g_bNS4 = (document.layers) ? true : false;
var g_bN6 = (document.getElementById && !document.all) ? true : false;
var g_fBrowserVer=parseFloat(navigator.appVersion);

if (g_bNS4)
{
	document.contextual(document.classes.topNavCell.all, document.tags.A).textDecoration = "underline";
	document.contextual(document.classes.btmNavCell.all, document.tags.A).textDecoration = "underline";
}

//-----------------------------------------------------------------------------
function WasReferrer(strTest)
{
	var bRet = false;

	// compare strTest with the end of the referral document, right up
	// to the search (?) character
	var strRef = document.referrer;
	var nRefLen = strRef.length;

	var nSrch = strRef.indexOf("?");
	var nEnd = nRefLen
	if (-1 != nSrch)
		nEnd = nSrch;

	var nFromLen = strTest.length;

	strRef = strRef.toLowerCase();

	if (strRef.substring(nEnd - nFromLen, nEnd) == strTest)
		bRet = true;

	return bRet;
}

//-----------------------------------------------------------------------------
function IfNotCameFromThenGoTo(strFrom, strTo)
{
	if (!WasReferrer(strFrom))
		document.location.replace(strTo);
}

