function abrir(vl) {
mostraConteudo(vl);
}

function conteudos(v2) {
document.getElementById('mostraConteudos').style.display="";
mostraConteudo2(v2);
}
function fechar() {
document.getElementById('mostraConteudos').style.display="none";
}

function limpaCena(qtd) {
for (i=1;i<=qtd;i++){
document.getElementById("p" + i).style.display="none";
document.getElementById("f" + i).style.display="none";
}
} 

function IMESB(qual, qtd) {
limpaCena(qtd);
document.getElementById("p" + qual).style.display="";
document.getElementById("f" + qual).style.display="";
}

function icone(qual){
document.getElementById("icone"+qual).innerHTML = "<b>...</b>";
}
function limpa_icone(qual){
document.getElementById("icone"+qual).innerHTML = "";
}
function EMAIL(qual){
document.getElementById("emailescolhido").innerHTML = "<b>Enviar para:</b> "+qual;
document.getElementById("enviaPARA").value		    = qual;
}

function colorMENU(qual){
document.getElementById("m_"+qual).style.backgroundColor='#00ABAD';
}
function  semCOLOR(qual){
document.getElementById("m_"+qual).style.backgroundColor='';
}

function mostra(qual){
	if(qual=="0"){
	document.getElementById("previsao").style.visibility="visible";
	}else{
	document.getElementById("cotacao").style.visibility="visible";	
	}
}
function esconde(qual){
	if(qual=="0"){
	document.getElementById("previsao").style.visibility="hidden";
	}else{
	document.getElementById("cotacao").style.visibility="hidden";	
	}
}

var iditem = 0; 
function Maior(){
	if(iditem<6){ 
	iditem++;
	document.getElementById("TAM").className='fonte'+iditem;
	} 
}

function Menor(){
if(iditem<=6){ 
iditem--;
document.getElementById("TAM").className='fonte'+iditem;
}
}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+','
win = window.open(mypage,myname,settings)
}

function contato() {
  NewWindow('','resposta','340','190','no');
  document.form1.submit();
}

var win = null;

function verificaCurriculum() {  
  a = document.form1;
  err = '';
  if (a.nome.value.length < 1) {
      err += '\n- Digite o nome';
  }
  if (a.dia.value.length == 0){
	  err += "\n- Digite o dia de seu nascimento.";
  }
  if (a.mes.value.length == 0){
	  err += "\n- Digite o mes de seu nascimento.";
  }
  if (a.ano.value.length == 0){
	  err += "\n- Digite o ano de seu nascimento.";
  }
  if (a.estado_civil.value == '0') {
      err += '\n- Escolha o estado civil';
  }
  if (a.endereco.value.length < 1) {
      err += '\n- Digite o endereço';
  }
  if (a.bairro.value.length < 1) {
      err += '\n- Digite o bairro';
  }
  if (a.cidade.value.length < 1) {
      err += '\n- Digite a cidade';
  }
  if (a.cep.value.length < 1) {
      err += '\n- Digite o CEP';
  }
  if (a.estado.value == 'UF') {
      err += '\n- Escolha o estado';
  }
  texto = a.email.value;
	if (texto.length < 1) 
	 { 
		err+='\n- Entre com o seu e-mail.';
		erro=true;
 	 }
	else
	 { 
		//Validando o e-mail
		var str = texto; // email string
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
		if (!reg1.test(str) && reg2.test(str)) // if syntax is valid
		 {  texto=''  }
		else
		 { 
	 		err+='\n- O seu endereço de e-mail é inválido.';
			erro=true; 
		 }
	 }
  if (a.telefone.value.length < 1) {
      err += '\n- Digite o telefone';
  }
  
  if (err.length > 0) {
      alert('Ocorreu o seguinte erro ao tentar mandar seu curriculum: '+err);
  } else {
      contato();
  } 
}

/////
