window.onresize = resize_divs;

if (navigator.appVersion.substring(0, 25) == "4.0 (compatible; MSIE 6.0")
  window.onscroll = resize_divs;

function resize_divs()
{
  document.getElementById("page").style.display = "none";

  if (document.documentElement.clientWidth)
    window_width = document.documentElement.clientWidth;
  else
  if (document.body.offsetWidth)
    window_width = document.body.offsetWidth;
  else
    window_width = window.innerWidth;

  i = (100 * window_width / 800) / 9;
  i = i * i - 50;
  if (i > 300)
    i = 300;
  else
  if (i <= 0)
    i = 0;

  document.getElementById("right").style.width = i + "px";

  if (navigator.appVersion.substring(0, 25) != "4.0 (compatible; MSIE 6.0")
    document.getElementById("middle").style.width = (window_width - i - 240 - 50) + "px";

  document.getElementById("middle").style.marginRight = (i + 1) + "px";

  document.getElementById("logo").style.right = i + "px";
  document.getElementById("logo").style.display = "block";
  document.getElementById("right").style.display = "block";

  if (navigator.appVersion.substring(0, 25) == "4.0 (compatible; MSIE 6.0")
  {
    document.getElementById("left").style.top = document.body.scrollTop + "px";
    document.getElementById("right").style.top = document.body.scrollTop + "px";
  }
  
  document.getElementById("page").style.display = "block";

}
