var all = document.getElementsByTagName('a');
var n = all.length;
for (i = 0; i < n; ++i) {
	var el = all[i];
	var tag = el.tagName;
	if (tag == "A") {
		el.onclick = gocount;
	}
}
function wget(url)
{
	var http = null;
	if (window.XMLHttpRequest) {
		http = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try { http = new ActiveXObject("Msxml2.XMLHTTP"); }
		catch (e) {
			try { http = new ActiveXObject("Microsoft.XMLHTTP"); }
			catch (e) { return null; }
		}
	}
	http.open("GET", url, false);
	http.send(null);
	return http.responseText;
}
function gocount()
{
	var el = this;
	var url = el.href;
	wget("./h_get.cgi?" + url);
}
