/***********
** CENTERS FRAME DIV ON RESIZE
***********/

// Global 'corrector' for IE/Mac et al., but doesn't hurt others
var fudgeFactor = {top:-1, left:-1};
// Center a positionable element whose name is passed as 
// a parameter in the current window/frame, and show it
function centerIt() {
    // 'obj' is the positionable object
    var obj = getRawObject("content-wrapper");
    // set fudgeFactor values only first time
    if (fudgeFactor.top == -1) {
        if ((typeof obj.offsetTop == "number") && obj.offsetTop > 0) {
            fudgeFactor.top = obj.offsetTop;
            fudgeFactor.left = obj.offsetLeft;
        } else {
            fudgeFactor.top = 0;
            fudgeFactor.left = 0;
        }
        if (obj.offsetWidth && obj.scrollWidth) {
            if (obj.offsetWidth != obj.scrollWidth) {
                obj.style.width = obj.scrollWidth;    
            }
        }
    }
    var x = Math.round((getInsideWindowWidth()/2) - (getObjectWidth(obj)/2));
    shiftTo(obj, x - fudgeFactor.left, 0);
    show(obj);
}

// Special handling for CSS-P redraw bug in Navigator 4
function handleResize() {
    if (isNN4) {
        // causes extra re-draw, but gotta do it to get banner object color drawn
        location.reload();
    } else {
        centerIt("content-wrapper");
    }
}