function updateOutLink (a)
{
	var href = a.getAttribute('href');
	a.onclick = function ()
	{
		try
		{
			//alert('[' + href + ']');
			pageTracker._trackPageview('/outgoing/' + href);
		}
		catch (ex)
		{
		}
	};
}

function updateOutLinks ()
{
	var a, l = document.getElementsByTagName('a');

	for (var i = 0; i < l.length; i++)
	{
		a = l[i];
		href = a.getAttribute('href');

		if (href.indexOf('http:') == 0 || href.indexOf('.html') < 0)
		{
			updateOutLink(a);
		}
  }
  return true;
}

// call updateOutLinks() on document load
if (window.addEventListener) {
  window.addEventListener('load', updateOutLinks, false);
} else if (window.attachEvent) {
  window.attachEvent('onload', updateOutLinks);
}
