function retargExtLinks() {
 var l, i = 0
 var r = new RegExp ('^' + location.protocol + '//' + location.hostname)
 while (l = document.links[i++]) {
  if (!r.test (l.href)) l.onclick = function () {
   window.open (this.href, '')
   return false
  }
 }
}
function retargDivLinks(divId){
  theDiv = document.getElementById(divId);
  links = theDiv.getElementsByTagName('a');
  for (var i=0, len=links.length; i < len; i++) {
    links[i].setAttribute('target', '_blank');
  }
}

