function submitVote() {
	var checked=0;
	for (var i=0; i < document.poll.vote.length; i++)
	{
		if (document.poll.vote[i].checked)
		{
			var check_val = document.poll.vote[i].value;
			checked=1;
		}
	}
	if(checked==1) {
		$.ajax({
			url: 'poll/poll.php?mode=vote&vote=' + check_val, 
			cache: false, 
			success: function(xmlHttp) {
				document.getElementById("pollcontainer").innerHTML=xmlHttp;
			}
		});
	}
}

function pollMode(mode) {
	$.ajax({
		url: 'poll/poll.php?mode=' + mode, 
		cache: false, 
		success: function(xmlHttp) {
			document.getElementById("pollcontainer").innerHTML=xmlHttp;
		}
	});
}

// Anropar röstningssidan
pollMode("");

