var myWindow;

function getInternetExplorerVersion() {
    // Returns the version of Internet Explorer or a -1
    // (indicating the use of another browser).
    var rv = -1; // Return value assumes failure.
    if (navigator.appName == 'Microsoft Internet Explorer') {
        var ua = navigator.userAgent;
        var r="MSIE ([0-9]{1,}[\.0-9]{0,})";
        var re  = new RegExp(r);
        if (re.exec(ua) !== null) {rv = parseFloat( RegExp.$1);}
    }
    return rv;
}


function openCenteredWindow(url) {
    var width = screen.availWidth-100;
    var height = 450;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + ",status=0,scrollbars=1,resizable,location=0,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);
}

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