
function outbound_links() {

  var as,i,islink;

// grab all links, and loop over them

  as=document.getElementsByTagName('a');

  for(i=0;i<as.length;i++) {

// take the link's href

    islink=as[i].href;

// and check if it contains the current location

    if(islink.indexOf(window.location.hostname)==-1) {
      re = /http:\/\//gi;
      s = as[i].href.replace(re,"");
      re = /\//gi;
      s = s.replace(re,"_");
      re = /\./gi;
      s = s.replace(re,"-");
      as[i].onclick=function(){urchinTracker('/outgoing/'+s);};
    }
  }
}

