function setCook(nom,valeur) {
    document.cookie = nom + "=" + escape(valeur);
}

function getCook(nom) {
    deb = document.cookie.indexOf(nom + "=")
    if (deb >= 0) {
        deb += nom.length + 1
        fin = document.cookie.indexOf(";",deb)
        if (fin < 0) fin = document.cookie.length
        return unescape(document.cookie.substring(deb,fin))
     }
     return '';
}

function exit_display() {

    cook = getCook('out');
    if(cook.length > 0)
        return;

    url = '/cgi-bin/atc/out.cgi?gr=TOP';

    if(navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("MSIE 8") != -1){
        exit_win = window.open(url, '_blank', 'width=1024, height=950 , toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1');
        if (exit_win != null)
            exit_win.blur();
    }else{
        window.open(url, '_blank', 'width=1024, height=950 , toolbar=1, location=1, directories=1, status=1, scrollbars=1, resizable=1, copyhistory=1, menuBar=1');
        self.focus();
    }

    setCook('out', '1');
    pageTracker._trackEvent('Out', 'Popup Pagination', 'TDX');
}

