window.addEvent("domready",function () 
{
	var span = new Element("span", { "id" : "debug" } );
	var body = $(document).getElement("body");

	span.inject(body, "bottom");

	var as = $$("a[href^=http]");

	as.each(function (a) 
	{
		var href = a.href;
		// exit if internal link		
			if (href && href.match(/^https?:\/\/(desktopxp1\/)?www\.betterlifehealthcare/i)) return;

		// let's try and grab the domain bit
			href = href.replace(/^https?:\/\//i, "");

		// let's remove the bit after the first slash (comment out if not req'd)
			href = href.replace(/^([^\/]+)\/.*$/i,"$1");
			
		// add click event to the link
			a.addEvent("click",function () 
			{
				if (!pageTracker || typeof(pageTracker) == "undefined") return;
				pageTracker._trackPageview('/outgoing/' + href);			
			});
	});	
});