function pollVote(option, poll, lang) 
{ 
 var xmlhttp = (window.XMLHttpRequest ? new XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : false));
 if (!xmlhttp) return false; 
 url = '/poll_vote.php?id=' + option + '&poll='+poll+'&lang='+lang;
 xmlhttp.open('GET', url); 
 pollLoader(poll);
 xmlhttp.onreadystatechange = function()
 	{
		 if (xmlhttp.readyState == 4) {
	        // aktualizace odpovědí na základě aktuálního stavu
	        var id = (xmlhttp.responseXML.getElementsByTagName('id'))[0].firstChild.data;
	        var html = (xmlhttp.responseXML.getElementsByTagName('html'))[0].firstChild.data;	        
	        var al = (xmlhttp.responseXML.getElementsByTagName('alert'))[0].firstChild.data;	        
	        if(al != '-')
	        {
	        	alert(al);
	        }
	        else document.getElementById('poll_' + id).innerHTML = html;
	        
    	}

	};
 xmlhttp.send('');
 return true;
}

function pollLoader(poll)
{
	html = '<div class="pollloader">...</div>';
	//document.getElementById('poll_' + poll).style.visibility = 'hidden';
	//document.getElementById('poll_' + poll).innerHTML = html;
}