function IsBrowser(sN)
{
	var oRe = new RegExp(sN, "i");
	if ((navigator.appName.match (oRe)) != null) return true;
	else return false;
}

function MoveTitle(oHeadSrcColl)
{
	if (typeof(oHeadSrcColl)!='object') {alert('Void'); return;}
	var oHeadSrc;
	if (oHeadSrcColl.length==0) return; else oHeadSrc =  oHeadSrcColl(0);
	var oHeadTgtColl = document.getElementsByTagName('HEAD');
	var oHeadTgt;
	if (oHeadTgtColl.length==0) {return;}
	else {oHeadTgt = oHeadTgtColl(0);}
	
	var oTitSrcColl = oHeadSrc.getElementsByTagName('TITLE');
	var oTitSrc;
	if (oTitSrcColl.length==0) {window.status = "Source title collection is empty; cannot continue."; return;}
	var oTitSrc = oTitSrcColl(0);

	var oTitTgtColl = oHeadTgtColl(0).getElementsByTagName('TITLE');
	var oTitTgt;
	if (oTitTgtColl.length==0) {oTitTgt = document.createElement("TITLE"); oHeadTgt.applyElement(oTitTgt);}
	else {oTitTgt = oTitTgtColl(0);}
	oTitTgt.nodeValue = oTitSrc.innerHTML;
	document.title = oTitSrc.innerHTML;
}

var sgSiteRoot = "/UtilSol/";
var sgSiteRootLg = "/UtilSol/Lg";

function LoadFrameCnt(sPCd,sLCd)
{
	//document.getElementById('frmCnt').src = '/UtilSol_' + sLCd + '/' + sPCd +'Cnt.asp';
	document.getElementById('frmCnt').src = sgSiteRootLg + sLCd + '/' + sPCd +'Cnt.asp';
}

function LoadFrames(sPCd,sLCd)
{
	if (parent.location.href == self.location.href)
	{
		//var sA = '/UtilSol/FrameBase.asp?LgCd='+sLCd+'&PgCd='+sPCd;
		var sA = sgSiteRoot + 'FrameBase.asp?LgCd='+sLCd+'&PgCd='+sPCd;
		if (window.location.href.replace) //Does not leave trace in nav history
		{
			window.location.replace(sA); //Old script
		}
		else window.location.href = sA; // causes problems with back button, but works
	}
	else
	{
		//top.frmLft.location.replace('/UtilSol_' + sLCd + '/' + sPCd +'Lft.asp');
		//top.frmRgt.location.replace('/UtilSol_' + sLCd + '/' + sPCd +'Rgt.asp');
		top.frmLft.location.replace(sgSiteRootLg + sLCd + '/' + sPCd +'Lft.asp');
		top.frmRgt.location.replace(sgSiteRootLg + sLCd + '/' + sPCd +'Rgt.asp');
		parent.LastPageInfoSet(sPCd,sLCd);
	}
}

function TableCntResize()
{
	var oTn = document.getElementById('divNav');
	var oTc = document.getElementById('tblCnt');
	if (IsBrowser('Explorer'))
	{
		oTc.height = document.body.clientHeight - oTn.offsetHeight;
	}
	else
	{
		var iN = new Number(document.body.clientHeight - oTn.offsetHeight);
		oTc.style.height = iN.toString() + 'px';
	}
}
