
function checkSize() {
    maximize(window);
}

function maximize(wnd) {

    var scr_w = wnd.screen.availWidth;
    var scr_h = wnd.screen.availHeight;

    scr_w = 800;
    scr_h = 600;

    pref_w = 700;
    pref_h = 450;

    var real_w = (document.all) ? wnd.document.body.clientWidth : wnd.innerWidth;
    var real_h = (document.all) ? wnd.document.body.clientHeight : wnd.innerHeight;


    var pos_x = screen.availWidth / 2 - (scr_w / 2);
    var pos_y = screen.availHeight / 2 - (scr_h / 2);

    if (real_w < pref_w || real_h < pref_h ) {
        // don't go below a certain size
         wnd.moveTo(pos_x, pos_y);
         wnd.resizeTo(scr_w, scr_h);
    }
    wnd.focus();
}
