// date     who     change
// 12/27/02 greg    disable resize for IE

// Netscape Resize Fix
widthCheck      = window.innerWidth;
heightCheck     = window.innerHeight;
window.onResize = resizeFix;
leftPix         = 0;

// IE has document.body.clientWidth but can only
// be checked after onLoad().  Not much use here.

if (is_nav)
{   // calc the left value for CSS ID #content on every resize of the window
    if (widthCheck <= 800)
    {   leftPix = 0;
    }
    else
    {   leftPix = ((widthCheck - 800) / 2);
    }
    document.write('<meta http-equiv="no-cache">');
    document.write('<style type="text/css">');
    if (nav_post_5)
    {    document.write('#content {position:relative; z-index: 1;top: 0px; left: '+leftPix+'px; width: 760px;}');
    }
    else
    {    document.write('#content {z-index: 1;top: 0px; left: '+leftPix+'px; width: 760px;}');
    }
    document.write('</style>');
}
else
{   document.write('<style type="text/css">');
    document.write('#content    {position:relative;z-index: 2;top: 0px; width: 760px; color: #000000; left-margin: auto; right-margin: auto;}');
    document.write('</style>');
}

function resizeFix()
{   /*
        Unfortunately early Netscape 4?s have a very nasty bug:
        the resize event also fires when a page has loaded, just
        like the load event. The result was that the user resizes
        his window, firing resize which forces a reload which again
        fires a resize, which forces yet another reload etc. This
        bug has been solved somewhere before Netscape 4.5 but has
        caused many web developers sleepless nights.

        The trick is to check if the window still has the same width
        and height after the resize event. If it hasn?t a real resize
        took place and the page should be reloaded.
    */

    if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
    window.location.reload();
}

function handler(e)
{ if (is_nav)
  { if (e.type == "resize")
    {  resizeFix();
    }
  }
}

function addhandlers(o)
{   o.onresize = handler;
}

function setUp()
{   // use addhandlers() to register handlers on all objects of interest
    if (is_nav) {
        addhandlers(window);
        addhandlers(document);
    }
}

function resizeForIE()
{
    if (ie_post_5 && (document.body.clientWidth > 796))
    {
        //document.getElementById('content').style.left=((document.body.clientWidth- 767) / 2);
    }
}

