var isPositioned = false;

function positionFoot(){  
  
  if (isPositioned) {
    return;
  }
    
  objLeftBottom = 0;
  objWrapperBottom = 0;
  
  objFoot  = document.getElementById('foot');
  objLeft  = document.getElementById('left');

  if (document.getElementById('contentDivision')) {
    objCont = document.getElementById('contentDivision');
  } else {
    objCont = document.getElementById('content');
  }

  objLeftBottom = objLeft.offsetHeight + objLeft.offsetTop;
  objWrapper = document.getElementById('wrapper');
  objWrapperBottom = objWrapper.offsetHeight + objWrapper.offsetTop;

  if (document.getElementById('right')) {
    objRightBottom = 0;
    objRight = document.getElementById('right');
    objRightBottom = objRight.offsetHeight + objRight.offsetTop;
  } else {
    objRightBottom = 0;
  }

  if (!document.all) {
    objFoot.style.position="absolute";
  } 
 
  max = 0  
  
  if (document.getElementById('right')) {
    if (objRightBottom > max) {
      max = objRightBottom;
    }
  }
  
  if (objLeftBottom > max) {
    max = objLeftBottom;
  }
  
  if (objWrapperBottom > max) {
    max = objWrapperBottom;
  }
 
 objFoot.style.top = max + "px";
 objCont.style.height = max - objWrapper.offsetTop + 'px';
 objFoot.style.display = "block"; 
 isPositioned = true;
 
}
