var indexulinks = document.getElementsByTagName("a");
for(i = 0; i < indexulinks.length; i++) {
	if (indexulinks[i].name != '' && (indexulinks[i].name.indexOf("link") != -1 || indexulinks[i].name.indexOf("cat") != -1)) {
		indexulinks[i].onclick = indexu_click;
    indexulinks[i].oncontextmenu = indexu_click;
	}
}

function indexu_click() {
  if (document.images) {
    img = new Image();
    img.src = "trackclick.php?id=" + this.name;
    var date = new Date();
    do {
      var curDate = null;
      curDate = new Date();
    }
    while(curDate-date < 300);
    date = null;
    curDate = null;
  }
  return true;
}