bodyLayer=document.all.Body; bottomServiceLayer=document.all.BottomServices; function MoveBottomServices() { windowHeight=document.body.clientHeight; bodyBottom=bodyLayer.offsetTop+bodyLayer.offsetHeight; bottomServiceTop=bottomServiceLayer.offsetTop+bodyLayer.offsetTop; if(windowHeight>bodyBottom+bottomServiceLayer.offsetHeight+5) { bottomServiceLayer.style.top=windowHeight-bodyLayer.offsetTop-bottomServiceLayer.offsetHeight-5; } if(bodyBottom>bottomServiceTop || windowHeight<(bodyBottom+bottomServiceLayer.offsetHeight)) { bottomServiceLayer.style.top=bodyBottom-bodyLayer.offsetTop; } } barLayer=document.all.SideBar; barBottom=barLayer.offsetTop+barLayer.offsetHeight; function BarResize() { barLayer=document.all.SideBar; windowHeight=document.body.clientHeight; serviceBottom=bottomServiceLayer.offsetTop+bottomServiceLayer.offsetHeight+bodyLayer.offsetTop; if(windowHeight>serviceBottom) { barLayer.style.height=windowHeight; } else { barLayer.style.height=serviceBottom-barLayer.offsetTop; } } function AdjustPage() { MoveBottomServices(); BarResize(); } function AdjustElements() { AdjustPage(); } if(document.all) { document.body.onresize=AdjustPage; document.body.onscroll=AdjustPage; AdjustPage(); }