// JavaScript below

function popup(url, target, width, height, features)
{
    var wnd, features1;

    features1 = 'width=' + width + ',height=' + height;
    if (screen)
        features1 += ',left=' + (screen.width - width) / 2 +
                ',top=' + (screen.height - height) /2;
    if (features)
        features1 += ',' + features;

    wnd = window.open(url, target, features1);
    wnd.focus();
}

function confirm_url(msg, url)
{
    if (confirm(msg)) {
        location.href = url;
    }
}

function pause(numberMillis) {
    var now = new Date();
    var exitTime = now.getTime() + numberMillis;
    while (true) {
        now = new Date();
        if (now.getTime() > exitTime)
            return;
    }
}