home *** CD-ROM | disk | FTP | other *** search
/ PC Active 2009 July/August / PC Active NR.227.iso / Software / ShellLess / ShellLess_setup_XP.exe / {app} / shellless.chm / msdn.js < prev    next >
Encoding:
Text File  |  2008-08-05  |  504 b   |  19 lines

  1. window.onload = Resize;
  2. window.onresize = Resize;
  3.  
  4. function Resize() {
  5.     if (document.body.clientWidth == 0) return;
  6.  
  7.     var PageHeader = document.all("PageHeader");
  8.     var PageFooter = document.all("PageFooter");
  9.     var PageBody   = document.all("PageBody");
  10.     
  11.     PageBody.style.width  = document.body.offsetWidth - 4;
  12.      PageBody.style.height = Math.max(document.body.offsetHeight - PageHeader.offsetHeight - PageFooter.offsetHeight - 4, 0);
  13.  
  14.     try {
  15.         PageBody.setActive();
  16.     }
  17.     catch(e) {
  18.     }
  19. }