function changeDivHeight() {
    // scroll height:
    var test1 = document.body.scrollHeight;
    var test2 = document.body.offsetHeight;
    if (test1 > test2) // all but Explorer Mac
        { var sy = document.body.scrollHeight }
    else // Explorer Mac; would also work in Explorer 6 Strict, Mozilla and Safari
        { var sy = document.body.offsetHeight };
    // window inner height:
    if (self.innerHeight) // all except Explorer
        { var iy = self.innerHeight }
    else if (document.body) // other Explorers
        { iy = document.body.clientHeight };
    var maxy = sy;
    //header and footer height:
    var hdr = document.getElementById('head').offsetHeight;
    var ftr = document.getElementById('footer').offsetHeight;
    if (iy>sy) { maxy = iy };
    if (hdr==maxy) { hdr = 0 };
    var sbr = maxy - hdr - ftr - 12;
  //testing://  window.alert ("maxy: "+maxy+"; hdr: "+hdr+"; ftr: "+ftr+"; sidebar:"+sbr);
    if (self.innerHeight) {
    document.getElementById('sidebar').style.height =  sbr + "px"; }
    else document.getElementById('sidebar').style.height = sbr -7 + "px";
}
