function extLinks2() {
    var extl = document.getElementsByTagName('a');
    var re = new RegExp('^http://' + location.host, 'i');
    for(var i = 0; i < extl.length; i++) {
        if(extl[i].href.match('http://') && !re.test(extl[i].href)) {
            extl[i].target = '_blank';
            extl[i].className += ' external';
        }
    }
}


window.onload = function() {
  
    extLinks2();
}