/*
 * ------------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <choan@alice.0z0ne.com> wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return 
 * ------------------------------------------------------------------------------
 */

(function() {
    function popups_init() {
        var el;
        var links = document.getElementsByTagName("a");
        for (var i = 0; null != (el = links[i]); ++i) {
            if (/\bexterno\b/.test(el.rel)) {
                el.onclick = function() {
                    var w = window.open(this.href, 'mywin');
                    if (!w) return true;
                    w.focus();
                    return w.closed;
                    };
            };
        };
    };
  
    var oldOnload = window.onload;
    if (typeof oldOnload == 'function') {
        window.onload = function() {
          oldOnload();
          popups_init();
        };
    } else {
        window.onload = popups_init;
    };
})();

