function popup(page, name, w, h, scroll) {
    LeftPosition = ( screen.width ) ? (screen.width - w) / 2 : 100;
    TopPosition = ( screen.height ) ? (screen.height - h) / 2.5 : 100;

    settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition;
    settings += ',status=no,location=no,directories=no,scrollbars=' + scroll + ',menubar=no,toolbar=no,resizable=yes';

    window.open(page, name, settings);
}
