// JavaScript Document

function detectPopupBlocker() {
    var myWin = window.open("about:blank", "", "top=2000,left=2000,directories=no,height=1,width=1, menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
    //myWin.blur();
    window.focus();
    if (!myWin) {
        alert('Veuillez d' + String.fromCharCode(233) + 'sactiver votre logiciel anti-popup pour ce site s.v.p.');
    } else {
        myWin.close();
    }
}

function popup(URLStr, width, height, selectionner) {
    if (selectionner) {
        var ck_sel = document.getElementById(selectionner);
        if (ck_sel == null) {
            return;
        }
        ck_sel.checked = true;
    }

    if (URLStr && URLStr != "none") {
        var popupwin = window.open('about:blank', 'popup', 'border=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + width + ',height=' + height);
        if (popupwin) {
            popupwin.close();
            popupwin = window.open(URLStr, 'popup', 'border=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + width + ',height=' + height);
            popupwin.focus();
        }
    }
}

function help(page) {
    if (page) {
        var w = window.open('help/' + page + '.htm', 'hlp', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, top=0, left=0, width=670, height=' + (screen.availHeight - 100));
        w.moveTo(screen.width - 680, 0);
        w.focus();
    }
}