function setatag(){ var all = document.getElementsByTagName('a'); for (i = 0; i < all.length; ++i) { all[i].onclick = new Function("wget('type=CLICK&url="+encodeURIComponent( all[i].href )+"');"); } } //]]>