// Open a new tab more safely than target="__blank"
var targetBlank = document.querySelectorAll('.targetBlank');
if (targetBlank !== null) {
    var nb = targetBlank.length;
    for (var i = 0; i < nb; i++) {
        targetBlank[i].addEventListener('click', function(evt) { 
            evt.preventDefault(); 
            evt.returnValue = false; 
            openNew(this.href);
        });
    }
}

function openNew(url) {
    var otherWindow = window.open();
    otherWindow.opener = null;
    otherWindow.location = url;
}