function rez(result)
	{
	text = result.responseText;
	el = document.getElementById('zamjena-anketa');
	el.innerHTML = text;

	}

function get_result(url, id_buttona)
{
	
//  	document.getElementById('div_right_half').innerHTML='<img src="adminmax/images/ajax-loader.gif">';

 	new ajax(url,
				{
					method: 'post',
					postBody: '&glasaj='+id_buttona,
					onComplete: rez
				}
		)

}

function get_result0(url, id_buttona)
{
	
//  	document.getElementById('div_right_half').innerHTML='<img src="adminmax/images/ajax-loader.gif">';

 	new ajax(url,
				{
					method: 'post',
					postBody: '&rezultat='+id_buttona,
					onComplete: rez
				}
		)

}


// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}
