
function setLayout() {
     if (document.getElementById) {
          var bc = document.getElementById('bc');
          var bcHeight = bc.offsetHeight;
          if (bcHeight < 475) {
          	bc.style.height = 475 + 'px';
          	bcHeight = 475;
          	}
          
          var r = document.getElementById('r');
          var rHeight  = r.offsetHeight;
          var g = document.getElementById('g');
          if (bcHeight > rHeight) {
               r.style.height = (bcHeight) + 'px';
               g.style.height = (bcHeight-8) + 'px';
          }
          // next handle mac IE 5.1 probs - first, handle the prob with not recognizing 'bottom' 
		var s = document.getElementById('s');
        	s.style.top = (bcHeight-265)+'px';
        	s.style.display = "block";
		if(document.getElementById('sa') != null){ 
			var sa = document.getElementById('sa');
			sa.style.top = (bcHeight-52-5)+'px';
		}
		// this next one is necessary because nested elements in a relatively positioned container inherit top and left properties so paragraphs indent adnauseum. I'm making the container absolutely positioned now so it's necessary to calculate the footer placement
     		var f = document.getElementById('f');
     		f.style.top = (bcHeight+38)+'px';
     		f.style.display = 'block';
     }
}
window.onload = function(){ setLayout(); }
window.onresize = function(){ setLayout(); }

