
this.window.onload = DivHeightMatch;

function DivHeightMatch()
{
	var oLeftNav;
	var oContentPane;
	var oBottomPane;
	
	oLeftNav = GetDOMObject("leftNav", "div");
	oContentPane = GetDOMObject("ContentPane", "div");
	oBottomPane = GetDOMObject("BottomPane", "div");
	
	if(oLeftNav && oContentPane && oBottomPane)
	{		
		if(oLeftNav.offsetHeight && oContentPane.offsetHeight && oBottomPane.offsetHeight)
		{	
			if(oLeftNav.offsetHeight > (oContentPane.offsetHeight + oBottomPane.offsetHeight))
			{				
				//oLeftNav.style.height = oLeftNav.offsetHeight + "px";
				//oContentPane.style.height = (oLeftNav.offsetHeight - oBottomPane.offsetHeight) + "px";
			}
			else			
			{								
				//oLeftNav.style.height = (oContentPane.offsetHeight) + "px";				
			}	
		}	
	}
		
}

function GetDOMObject(sClassName, sDOMType)
{
	var oDOMs;
	var iObjectPosition;
	
	oDOMs = document.getElementsByTagName(sDOMType);
	iObjectPosition = -1;
	
	for(var i = 0; i < oDOMs.length; i++)
	{
		if(oDOMs[i].className == sClassName)
		{
			iObjectPosition = i;
			i = oDOMs.length + 1;
		}
	}
	
	if(iObjectPosition < oDOMs.length && iObjectPosition != -1)
	{
		return oDOMs[iObjectPosition];	
	}
	else
	{
		return null;	
	}
	
}