function calculateHeight(id)
{
    var ref = document.getElementById(id);
    return ref.offsetHeight;
}

function calculateTop(id)
{
    var ref = document.getElementById(id);
    return ref.offsetTop;
}

function calculateBottom(id)
{
    return calculateTop(id) + calculateHeight(id);
}

function setBackgroundLeftHeight(height, min)
{
	var bg_left = document.getElementById('bg_left');
	if(height < min)
	{
		height = min;
	}
	bg_left.style.height = height + 'px';
}
