if (document.getElementsByTagName && document.createElement) { window.onload = function() { var links = document.getElementsByTagName('a'); for (var i=0; i -1 && links[i].hostname.indexOf('promo-code.net') == -1) { // track pageviews links[i].style.backgroundImage = 'url(http://www.promo-code.net/track/?pageview=true&url='+escape(links[i].href)+')'; // track clicks links[i].onclick = function() {window.location = 'http://www.promo-code.net/track/?url='+escape(this.href)+'&location='+escape(location.href); return false;} links[i].oncontextmenu = function() { if (this.href.indexOf('track') == -1) { tmpurl = this.href; this.href = 'http://www.promo-code.net/track/?url='+escape(this.href)+'&location='+escape(location.href)+'&action=rightclick'; } } links[i].onblur = function() { if (typeof tmpurl != 'undefined') { this.href = tmpurl; delete tmpurl; } } } } } }