function startAjax()
{
	var http = false;

	if(navigator.appName == "Microsoft Internet Explorer")
	{
		http = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		http = new XMLHttpRequest();
	}
				
	return http;
}

function vote(id, what)
{
	http = startAjax();
	
	http.open("GET", "/ajax.php?id=" + id + "&what=" + what, true);
	http.onreadystatechange=function()
	{
		if(http.readyState == 4)
		{
				
			var ni = document.getElementById('quote' + id);
			ni.innerHTML = http.responseText;
		}			
	}
	http.send(null);
}