function resize() {
    var x = 0;
    var y = 0;
    var isXP = navigator.appVersion.match(/Windows NT 5\.1/);
    if (screen.width > 800) {
        x += normal_x;
        y += normal_y;
        if (y > screen.height) {
            y = $small_y;
        }
    } else {
        x += small_x;
        y += small_y;
    }
    if (y > screen.height)
        y = screen.height - 40;
    if (isXP) {
        y += 15;
        x += 5;
    }
    window.resizeTo(x, y);
    y += 25;
    window.moveTo((screen.width - x) / 2, (screen.height - y) / 2);
}

var resize_old_onload = window.onload;
window.onload = function () {
    if (resize_old_onload) resize_old_onload();
    resize();
}
