// $Id: page.js 275 2009-09-22 15:20:48Z willem $
// (c) Virtual PC Services B.V.

function checkSize(o) {
    if(o) return;
    maximize(window);
}

function maximize(wnd) {

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

    pref_w = scr_w;
    pref_h = scr_h;

    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 = 0;
    var pos_y = 0;

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