// open a window (popups ahoy ;) )
function openWin(url, name, features) {
	window.open(url, name, features);
}

// center a window
function centerWin(url, name, width, height, features) {
	var win;
    var top = (screen.height - height)/2;
	var left = (screen.width - width)/2;
    win = window.open
    (
        url, name," top = " + top + ", left = " + left
        + ", width = " + width + ", height = " + height
        + ", " + features
    );
    setTimeout('win.focus();', 250);
}

// open fullscreen
var win;
function fullScreenWin(url, name) {
    var w = (screen.width  - 10);
    var h = (screen.height - 30);

    features = ('width = ' + w + ', height = ' + h +
                ', screenX = 0, screenY = 0, directories = 0, ' +
                'fullscreen = 1, location = 0, menubar = 0, ' +
                'scrollbars = no, status = 0, toolbar = 0');

    win = window.open(url, name, features);
    setTimeout('win.focus();', 250);
}
