function Validar()
{check = false;tot = document.all.tags("INPUT");
for(i = 0; i < tot.length; i++) 
{if(tot.item (i) .type == 'checkbox' && tot.item (i) .checked == true)
{check = true;}
}
if(!check)
{alert('Você deve selecionar ao menos uma operadora de plano de saúde.');return false;}
soma = eval(document.form1.vida18.value) + eval(document.form1.vida23.value) + eval(document.form1.vida28.value)
+ eval(document.form1.vida33.value) + eval(document.form1.vida38.value) + eval(document.form1.vida43.value)
+ eval(document.form1.vida48.value) + eval(document.form1.vida53.value) + eval(document.form1.vida58.value)
+ eval(document.form1.vida59.value);if(soma ==0){alert("Favor preencher a quantidade de usuários!");return false;}
return true;}
function popup(f,l,a) 
{var i = (screen.width - l)/2;var j = (screen.height - a)/2;window.open(f,'janelapopup','height='+a+',width='+l+',top='+j+',left='+i);}function abreJanela(f,l,a) 
{var i = (screen.width - l)/2;var j = (screen.height - a)/2;window.open(f,'janelapopup','height='+a+',resizable=yes,scrollbars=yes,width='+l+',top='+j+',left='+i);}
function limpa(){
if (document.form1.vida18.value == "0"){document.form1.vida18.value = "";}
if (document.form1.vida23.value == "0"){document.form1.vida23.value = "";}
if (document.form1.vida28.value == "0"){document.form1.vida28.value = "";}
if (document.form1.vida33.value == "0"){document.form1.vida33.value = "";}
if (document.form1.vida38.value == "0"){document.form1.vida38.value = "";}
if (document.form1.vida43.value == "0"){document.form1.vida43.value = "";}
if (document.form1.vida48.value == "0"){document.form1.vida48.value = "";}
if (document.form1.vida53.value == "0"){document.form1.vida53.value = "";}
if (document.form1.vida58.value == "0"){document.form1.vida58.value = "";}
if (document.form1.vida59.value == "0"){document.form1.vida59.value = "";}}

function preenche(){
if (document.form1.vida18.value == "") {document.form1.vida18.value = "0";}
if (document.form1.vida23.value == "") {document.form1.vida23.value = "0";}
if (document.form1.vida28.value == "") {document.form1.vida28.value = "0";}
if (document.form1.vida33.value == "") {document.form1.vida33.value = "0";}
if (document.form1.vida38.value == "") {document.form1.vida38.value = "0";}
if (document.form1.vida43.value == "") {document.form1.vida43.value = "0";}
if (document.form1.vida48.value == "") {document.form1.vida48.value = "0";}
if (document.form1.vida53.value == "") {document.form1.vida53.value = "0";}
if (document.form1.vida58.value == "") {document.form1.vida58.value = "0";}
if (document.form1.vida59.value == "") {document.form1.vida59.value = "0";}}
