﻿function validacao(form)
{
	var campo; 
	var tipo;
	var quant = 0; 
	
	for (i = 0; i < form.length; i++)
	{
		tipo = form[i].type; 
		if (tipo == "radio") 
		{
			quant += 1
			campo = form[i].id; 
		}
		
	}

	for (x = 0; x < quant; x++) 
	{
		
		//alert(document.getElementById(campo).checked);
		if(document.getElementById(campo).checked)
		{
			return true; 
			break; 
		}
		else
		{
			alert("Escolha uma das opções!"); 
			return false; 
		}
	}
	return false; 
}

