var lep_url = "http://www.armor-site.com/"; var lep_a = document.getElementsByTagName("a"); for(i = 0; i < lep_a.length; i++) { if (lep_a[i].name != '') { lep_a[i].onclick = lep_click(lep_a[i].name); lep_a[i].oncontextmenu = lep_click(lep_a[i].name); } } function lep_click(lep_id) { img = new Image(); img.src = lep_url+"click.php?id=" + lep_id; pausecomp(50); return true; } function pausecomp(millis) { var date = new Date(); var curDate = null; do { curDate = new Date(); } while(curDate-date < millis); }