function sendVote(vote){
    var wFactor = 1.5;	// for more votes assign lower values


    var opt = {
	method: "get",
	asynchronous: true,
	onSuccess: function(r){
	    var result = r.responseText.evalJSON();
	    if (result["alreadyPolled"]){
		$("poll-status").innerHTML = "Litujeme, ale z této adresy už hlasování proběhlo.";
		$("poll-status").className = "bad";
	    } else {
		$("poll-status").innerHTML = "Hlasování proběhlo úspěšně.";		
		$("poll-status").className = "good";
	    }
	    
	    $("poll-results").select("* .histogram-item").each(function(h){
		h.remove();
	    });
	    $("poll-results").select("* .histogram-item-count").each(function(h){
		h.remove();
	    });

	    for (var i in result["polles"]){
		var w = result["polles"][i.toString()];
		w = wFactor * w;
		if (w > 95)
		    w = 95;
		var s = {
		    height: "10px",
		    width: w.toString() + "px",
		    backgroundColor: "#FF9300",
		    "float": "left"
		};
		var g = new Element("div", {"class":"histogram-item"});
		g.setStyle(s);

		var hp = new Element("span", {"class":"histogram-item-count"});
		hp.setStyle({fontSize: "9px"});
		hp.innerHTML = result["polles"][i.toString()];

		$("poll-result-" + (i).toString()).innerHTML = "";
		$("poll-result-" + (i).toString()).insert(g);
		$("poll-result-" + (i).toString()).insert(hp);
		//		$("poll-result-" + i.toString()).innerHTML = result["polles"][i.toString()];
		$("poll-results").show();
	    }
	},
	onFailure: function(r){
	    ajax_error(r);
	}
    };
    new Ajax.Request(s_ajax_poll + "?action=poll&vote=" + vote, opt);
}
