function getLeft(obj){
    var leftValue= 0;
    while(obj){
	leftValue+= obj.offsetLeft;
	obj= obj.offsetParent;
    }
    return leftValue;
}
function getTop(obj){
    var topValue= 0
    while(obj){
	topValue+= obj.offsetTop;
	obj= obj.offsetParent;
    }
    return topValue;
}
onload=function(){
var content = document.getElementById('content');
var contentHeight = document.getElementById('content').offsetHeight;
var contentWidth = document.getElementById('content').offsetWidth;
var assoc = document.getElementById('assoc');
var assocHeight = document.getElementById('assoc').offsetHeight;
var endblock = document.getElementById('endblock');
var endblockHeight = document.getElementById('endblock').offsetHeight;
if (contentHeight < assocHeight)
{
  content.style.height = assocHeight + 'px';
  endblock.style.position = "absolute";
  endblock.style.left = getLeft(content) + 'px';
  endblock.style.width = contentWidth + 'px';
  endblock.style.top = getTop(assoc) + assocHeight - endblockHeight + 'px';
}
else
{
  assoc.style.height = contentHeight + 'px';
}
}

