function GetXmlHttpObject(){
	if( window.XMLHttpRequest ){
		// code for IE7+, Firefox, Chrome, Opera, Safari
		return new XMLHttpRequest();
	}
	if (window.ActiveXObject){
		// code for IE6, IE5
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
	return null;
}


function ajaxVoteFunction(voteform) {
	var xmlhttp = GetXmlHttpObject();
	var vote = voteform.vote;

	var vote_value = 0;
	
	for (var i=0; i <= vote.length-1; i++){
		if (vote[i].checked){
			vote_value = vote[i].value;
		}
	}

	xmlhttp.onreadystatechange=function(){
		if( xmlhttp.readyState==4 ){
			document.getElementById('voting').innerHTML = xmlhttp.responseText;
		}
	}
	voteurl = "ajx.php?vote=" + vote_value;
	xmlhttp.open("GET",voteurl,true);
	xmlhttp.send(null);

	return false;
}