function setComboValue (combo, valor)
{
	// fazendo a opção selecionada ser a posição descoberta
	combo.selectedIndex = getComboIndice(combo,valor);
}

function getComboIndice (combo,valor)
{
	if (combo.length)
	{
		for (var b = 0; b < combo.length; b++)
		{
			if (combo[b].text == valor)
			{
				return(b);
				break;
			}	
			
		}	
	}
  
}

function getComboText (combo)
{
	return (combo[combo.selectedIndex].text)  ;
}

function getComboValue (combo)
{
	return (combo[combo.selectedIndex].value)  ;
}

function getRadioValue (radioButton) 
{
	//Retorna o valor de campo radio button
	var value = null;
	if (radioButton.length) // group 
	{
		for (var b = 0; b < radioButton.length; b++)
		{
			if (radioButton[b].checked)
			{
				value = radioButton[b].value;
		        	break;
     	   }
     	}
        
	}
	else if (radioButton.checked)
		value = radioButton.value;
	return value;
}
