function open_win(janela, win_w, win_h, url, scrollbar, resizable, status)
{
	var w = screen.width;
	var h = screen.height;
	w = w - win_w;
	h = h - win_h;
	w = w/2;
	h = h/2;
	zoom = window.open(url, janela, 'width='+win_w+', height='+win_h+', toolbar=no,copyhistory=no,location=no,status='+status+',menubar=no,scrollbars='+scrollbar+',resizable='+resizable+',top='+h+',left='+w+'');
	zoom.focus();
}

function getCheckedValue(radioObj) {
	if(!radioObj)
		return false;
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return false;
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return false;
}
function show_results()
{
	for(x=1;x<=nr_respostas;x++)
	{
		get('enquete'+x).style.display = 'none';
		get('tr_resultado_'+x).style.display = '';
	}
	get('tr_nr_total').style.display = '';
	get('tr_votando').style.display = 'none';
}
function get(obj)
{
	return document.getElementById(obj);
}
