function GetBase()
{
    var oBaseColl = oBal.getElementsByTagName('BASE');
    return ( (oBaseColl && oBaseColl.length) ? oBaseColl[0].href : '' );
}

function GetTop()
{
	var openerRef = top.opener;
	var topRef = top;
					
	while (openerRef != null)
	{
		if (topRef.IsTopWindow == null)
		{	// It is not the real top
			topRef = openerRef.top;
			openerRef = topRef.opener;
		}
		else
			openerRef = null;
	}
	
	return topRef;
}

function GetFramePath( localWindow )
{
	var nameStack = new Array();
	var w 
	
	w = localWindow;
	while(w.name.length > 0)
	{
		nameStack.push(w.name);
		w = w.parent;
	}
	var framePath;
	framePath = '';
	while (nameStack.length > 0)
	{
		framePath = framePath + nameStack.pop();
		if (nameStack.length > 0)
		{
			framePath = framePath + '.';
		}
	}
	return(framePath);
}

function GetFrameWindow( framePath )
{
	var sArray
	var w;
	sArray = framePath.split('.');
	w = GetTop();
	for (i=0; i < sArray.length; i++)
	{
		w = w.frames[sArray[i]];
	}
	return(w);
}

