function addLinkerEvents() {
	var as = document.getElementsByTagName("a");
	var extTrack = ["maurice.localhost","nsw.localhost","qld.localhost"];
	// List of local sites that should not be treated as an outbound link. Include at least your own domain here

	var extAllowTrack = ["www.mauriceblackburn.com.au","www.mauriceblackburnnsw.com.au","www.mauriceblackburnqld.com.au","www.wefightforfair.com.au","www.superclaims.com.au"];
	// List of sites that we want to track
	
	var extDoc = [".doc",".xls",".exe",".zip",".pdf",".js"];
	//List of file extensions on your site. Add/edit as you require
	
	/*If you edit no further below this line, Top Content will report as follows:
		/ext/url-of-external-site
		/downloads/filename
		/mailto/email-address-clicked
	*/
	
	for(var i=0; i<as.length; i++) {
		var flag = 0;
		var tmp = as[i].getAttribute("onclick");

		if (tmp != null) {
		  tmp = String(tmp);
		  if (tmp.indexOf('urchinTracker') > -1 || tmp.indexOf('_trackPageview') > -1) continue;
    		}

		// Tracking outbound links off site - no GATC
		for (var j=0; j<extTrack.length; j++) {	
			if (as[i].href.indexOf(extTrack[j]) == -1 && as[i].href.indexOf('google-analytics.com') == -1 ) {
				flag++;		
			}
		}
		
		
		if (flag == extTrack.length){
			var splitResult = as[i].href.split("//");
			
			var str = as[i].href;
			// Tracking outbound links off site - no GATC
			for (var k=0; k<extAllowTrack.length; k++) {	
				if (as[i].href.indexOf(extAllowTrack[k]) > -1) {

					if (str.indexOf(document.domain) == -1)
					{
						if (as[i].target == '_blank'){
					        	as[i].setAttribute("onclick", ((tmp != null) ? tmp + ";" : "") + "return openWindow(this);");
						}
						else
						{
					        	as[i].setAttribute("onclick", ((tmp != null) ? tmp + ";" : "") + "_gaq.push(['_link', 'http://" + splitResult[1] + "']); return false;");
						}					
					}
				}
			}


			

		}

		// Tracking electronic documents - doc, xls, pdf, exe, zip
		/*
		for (var j = 0; j < extDoc.length; j++) {
		    for (var k = 0; k < extTrack.length; k++) {
		        if (as[i].href.indexOf(extTrack[k]) != -1 && as[i].href.indexOf(extDoc[j]) != -1) {
		            var splitResult = as[i].href.split(extTrack[k]);		            
		            as[i].setAttribute("onclick", ((tmp != null) ? tmp + ";" : "") + "_gaq.push(['_trackPageview', '/downloads" + splitResult[1] + "']);");
		            break;
		        }
		    }
		}
		*/

		/*if (as[i].href.indexOf("mailto:") != -1  && as[i].href.indexOf("gashbug@google.com") == -1 ) {
			var splitResult = as[i].href.split(":");
			as[i].setAttribute("onclick",((tmp != null) ? tmp+";" : "") + "pageTracker._trackPageview('/mailto/" +splitResult[1]+ "');");
			//alert(splitResult[1])
		}*/
	}
}


