function mostra(qual)
{
document.getElementById("indique").style.display="";


}

function mostra2(qual)
{	
	document.getElementById("indique2").style.display="";
}

function esconde(qual)
{
	document.getElementById("indique").style.display="none";

 }
 
 
function esconde2(qual)
{
	document.getElementById("indique2").style.display="none";
}

function ChecaForm() {
	with (document.form1)
  {
    
   if (!document.form1.TxtNome.value) 
   {
    alert ('Por favor, preencha o campo Nome!');
	document.getElementById("camponome").style.backgroundColor="#7bb8e5";
	TxtNome.focus();
    return (false);
   }
        
   if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test (document.form1.TxtEmail.value)))
   {
    alert ('Favor informar um Email válido!');
	document.getElementById("campoemail").style.backgroundColor="#7bb8e5";
	document.getElementById("camponome").style.backgroundColor="";
    TxtEmail.focus();
    return (false);
   	}   
       
      if (!document.form1.estado.value== 1) 
	{
	  	alert("Por favor, selecione seu Estado.")
	document.getElementById("campoestado").style.backgroundColor="#7bb8e5";
	document.getElementById("campoemail").style.backgroundColor="";
	document.getElementById("camponome").style.backgroundColor="";
		return false;
   	}
   
     if (!document.form1.cidade.value== 1) 
	{
	  	alert("Por favor, selecione sua Cidade.")
	document.getElementById("campocidade").style.backgroundColor="#7bb8e5";
	document.getElementById("campoestado").style.backgroundColor="";
	document.getElementById("campoemail").style.backgroundColor="";
	document.getElementById("camponome").style.backgroundColor="";
		return false;
   	}
   
   if (!document.form1.TxtEmpresa.value) 
   {
    alert ('Por favor, preencha o nome da Empresa onde Trabalha!');
    TxtEmpresa.focus();
	document.getElementById("campoempresa").style.backgroundColor="#7bb8e5";
	document.getElementById("campocidade").style.backgroundColor="";
	document.getElementById("campoestado").style.backgroundColor="";
	document.getElementById("campoemail").style.backgroundColor="";
	document.getElementById("camponome").style.backgroundColor="";
    return (false);
   }   
   
   if (!document.form1.TxtCargo.value) 
   {
    alert ('Por favor, preencha o cargo que ocupa na Empresa onde Trabalha!');
    TxtCargo.focus();
	document.getElementById("campocargo").style.backgroundColor="#7bb8e5";
	document.getElementById("campoempresa").style.backgroundColor="";
	document.getElementById("campocidade").style.backgroundColor="";
	document.getElementById("campoestado").style.backgroundColor="";
	document.getElementById("campoemail").style.backgroundColor="";
	document.getElementById("camponome").style.backgroundColor="";
    return (false);
   }   
   
   if (document.form1.sexo.value==1) 
   {
    alert ('Por favor, selecione um sexo.!');
    TxtCargo.focus();
	document.getElementById("camposexo").style.backgroundColor="#7bb8e5";
	document.getElementById("campocargo").style.backgroundColor="";
	document.getElementById("campoempresa").style.backgroundColor="";
	document.getElementById("campocidade").style.backgroundColor="";
	document.getElementById("campoestado").style.backgroundColor="";
	document.getElementById("campoemail").style.backgroundColor="";
	document.getElementById("camponome").style.backgroundColor="";
    return (false);
   } 
   
   
   if(document.form1.segmento.value == 'DCI')
			{
				alert("Por Favor, uma Newsletter")
				document.form1.segmento.focus();
				document.getElementById("camponews").style.backgroundColor="#7bb8e5";
				document.getElementById("camposexo").style.backgroundColor="";
				document.getElementById("campocidade").style.backgroundColor="";
				document.getElementById("campoestado").style.backgroundColor="";
				document.getElementById("campoemail").style.backgroundColor="";
				document.getElementById("camponome").style.backgroundColor="";
				return false;
			}
	
	<!-- No IF Abaixo ele verifica se foi selecionado a Opção outros-->
	  if(document.form1.segmento1.value == 'DCI')
			{
				alert("Por Favor, selecione a segunda Newsletter")
				document.form1.segmento1.focus();
				document.getElementById("campooutro").style.backgroundColor="#7bb8e5";
				document.getElementById("camponews").style.backgroundColor="";
				document.getElementById("campocidade").style.backgroundColor="";
				document.getElementById("campoestado").style.backgroundColor="";
				document.getElementById("campoemail").style.backgroundColor="";
				document.getElementById("camponome").style.backgroundColor="";
				return false;
			}
			
			
		if(document.getElementById('indique').style.display=='')
			{
	<!-- Se a condição acima for verdadeira ele valida o campo Outros -->
			if(!document.form1.TxtNomeIndicado1.value)
				{
			alert("Por Favor, Preencha o nome do Indicado.")
			document.form1.TxtNomeIndicado1.focus();
			return false;
				}
				
			if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test (document.form1.TxtEmailIndicado1.value)))
			   {
				alert ('Favor informar um Email válido para o indicado!');
				TxtEmailIndicado1.focus();
				return (false);
				}   
			}
			
		
		if(document.getElementById('indique2').style.display=='')
			{
	<!-- Se a condição acima for verdadeira ele valida o campo Outros -->
			if(!document.form1.TxtNomeIndicado2.value)
				{
			alert("Por Favor, Preencha o nome do segundo indicado.")
			document.form1.TxtNomeIndicado2.focus();
			return false;
				}
				
			if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test (document.form1.TxtEmailIndicado2.value)))
			   {
				alert ('Favor informar um Email válido para o segundo indicado!');
				TxtEmailIndicado2.focus();
				return (false);
				}   
			}
   
   
 return (true);
 }
}

<!-- Script para retirar a opção selecionada no primeiro combo do segundo -->
function Case(selec)
	{ 
			document.getElementById("segmento1").remove(selec.selectedIndex);
			if(document.form1.segmento.value == 'DCI')
			{
			document.getElementById("outros").style.display="none";
			document.getElementById("outros1").style.display="none";
			
			return false;
			}
			
			else
			{
			document.getElementById("outros").style.display="";
			document.getElementById("outros1").style.display="";
			
			return false;
			}
			
	}





<!-- Script para retirar a opção selecionada no primeiro combo do segundo -->
function retiraOption(selec)
{
   document.getElementById("segmento1").remove(selec.selectedIndex);
}
