home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 March / PCWorld_2007-03_cd.bin / multimedia / infra / ir041_unicode.exe / Languages / Russian.chm / stylescript.js < prev   
Text File  |  2007-01-02  |  744b  |  29 lines

  1. window.onload = OnSize;
  2. window.onresize = OnSize;
  3.  
  4. function OnSize()
  5. {
  6.     var vHeader = document.all.item("header");
  7.     var vContent = document.all.item("content");
  8.  
  9.     if (vContent ==null) 
  10.         return;
  11.  
  12.     if (vHeader != null)
  13.     {
  14.         document.all.content.style.overflow = "auto";
  15.         document.all.header.style.width = document.body.offsetWidth;
  16.         document.all.content.style.width = document.body.offsetWidth - 4;
  17.         document.all.content.style.top = document.all.header.offsetHeight;
  18.  
  19.         if (document.body.offsetHeight > document.all.header.offsetHeight)
  20.         {
  21.             document.all.content.style.height = document.body.offsetHeight - document.all.header.offsetHeight - 3;
  22.         }
  23.         else 
  24.         {
  25.             document.all.content.style.height = 0;
  26.         }
  27.     }
  28. }
  29.