
function votar(imageid, vote){

	if(imageid == undefined){
		alert("imageid?");
		return;
	}

	if(vote == undefined){
		alert("vote?");
		return;
	}

	$.ajax({
		type: "GET",
		url: "ajax.php",
		data: "action=vote&imageid="+imageid+"&vote="+vote,
		success: function(msg){
			document.getElementById("image_"+imageid).innerHTML = msg;
		}, 
		error: function(xho){
			document.getElementById("image_"+imageid).innerHTML = "Error:"+xho.responseText;
		}
	});
}