// resize content div to fit screen between header and footer (total size of these two in HplusFsize)
// minimum size gives full screen on 800x600

var rszCount = 0;
var contSize = 0;
var HplusFsize = 120;

function doResize() { 
  var divContent = document.getElementById("content");
  var tgtContSize = Math.max(document.documentElement.clientHeight-HplusFsize,268);  // note document Element not body
  
  if (tgtContSize != contSize) {
    divContent.style.height = tgtContSize+"px";
	contSize = tgtContSize;
    if (rszCount>100) { // it is possible to get stuck in loop if not careful
      //alert("resize limit");
	  divContent.style.height = "";
      divContent.style.overflow = "visible"; 
      window.onresize = null;
    } else {
      rszCount++;
    }
  }
} 

function initResize() {
//disable temporarily until printing issues sorted
}

function initResizeReal() {
  document.getElementById("content").style.overflow = "auto"; 
  doResize(); 
  window.onresize = doResize;
}