function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


    var wim = {};

    wim.Safari = function() {
        return (navigator.userAgent.match(/Safari/));
    };

    wim.IE = function() {
        return (navigator.userAgent.match(/MSIE/));
    }

    wim.launchPopout = function() {
        var url = "http://o.aolcdn.com/aim/gromit/beta_2_aim_express/WidgetMain.html";
        var attributes = "resizable=yes,width=300,height=600,directories=no,titlebar=no,scrollbars=no,status=no,menubar=no,toolbar=no,";

        if (wim.Safari()) {
            window.open(url, "_blank", attributes+"location=no");
        } else {
            window.open(url, "_blank", attributes+"location=1");
        }
    };

    function __launch() {
        wim.launchPopout(); 
        return false;
    }

    document.onload=function() {
        anchor = document.getElementById('slot_0').getElementsByTagName('a')[0];

        old_func = anchor.onclick;

        anchor.onclick= function() {
            __launch();
            return false;
        };
    };

document.onerror=function(errType, errURL, errLineNum ) { return true;};