// JavaScript Document
function valida(theForm){
	
	var msgErro = document.getElementById("msgErro");
	msgErro.innerHTML = "";
	msgErro.className = "";
	

	var nome = document.getElementById("nome");
	if (theForm.nome.value == ""){
		nome.style.color = "#CC0000";
		theForm.nome.focus();
		msgErro.innerHTML = "Por favor, digite o nome do consorciado";
		msgErro.className = "erro";
		return (false);
	}else{
		nome.style.color = "#000000";	
	}



	


	var n_grupo = document.getElementById("n_grupo");
	if (theForm.n_grupo.value == ""){
		n_grupo.style.color = "#CC0000";
		theForm.n_grupo.focus();
		msgErro.innerHTML = "Por favor, digite o número do grupo.";
		msgErro.className = "erro";
		return (false);
	}else{
		n_grupo.style.color = "#000000";	
	}
	var n_cota = document.getElementById("n_cota");
	if (theForm.n_cota.value == ""){
		n_cota.style.color = "#CC0000";
		theForm.n_cota.focus();
		msgErro.innerHTML = "Por favor, digite o número da cota.";
		msgErro.className = "erro";
		return (false);
	}else{
		n_cota.style.color = "#000000";	
	}
	var lance = document.getElementById("lance");
	if (theForm.lance.value == ""){
		lance.style.color = "#CC0000";
		theForm.lance.focus();
		msgErro.innerHTML = "Por favor, digite seu lance.";
		msgErro.className = "erro";
		return (false);
	}else{
		lance.style.color = "#000000";	
	}

}