// JavaScript Document

// Only links written to the page (already in the DOM) will be tagged

// This version is for ga.js (July 15th 2008)

 

 

function addLinkerEvents() {

      var as = document.getElementsByTagName("a");

      var extTrack = ["www.automacenter.it"];

      // List of local sites that should not be treated as an outbound link. Include at least your own domain here

      

      //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:

            

            /mailto/email-address-clicked

      */

 

      for(var i=0; i<as.length; i++) {

            var flag = 0;

            var tmp = as[i].getAttribute("onclick");

            

            

            // IE6-IE7 fix (null values error) with thanks to Julien Bissonnette for this

            if (tmp != null) {

              tmp = String(tmp);

              if (tmp.indexOf('urchinTracker') > -1 || tmp.indexOf('_trackPageview') > -1) continue;

            }

                  

            

            // added to track mailto links 23-Oct-2007

            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])

            }

 

 

      }

}


