// This variable contains the number of clicks corresponding to the linked URLs
var clickCount = {}
// List of all a tags
, aList = document.getElementsByTagName('a')
// Function called every time a link is clicked on
, clickCounter = function()
{
clickCount[this.href] = clickCount[this.href] ? clickCount[this.href]+1 : 1;
}
;
// The event is attached to every link having a "href" attribute
for (var i=0 ; i