function abre_janela(width, height, nome) {
var top; var left;
top = ( (screen.height/2) - (height/2) )
left = ( (screen.width/2) - (width/2) )
window.open('',nome,'width='+width+',height='+height+',scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,left='+left+',top='+top);
}
function limparCampo(id, cont){
  var campo = document.getElementById(id);
  if (campo.value == cont){
  campo.value = '';
  }else if(campo.value == ''){
  campo.value = cont;
  }
}
function Valida_Guia() {
	if(document.form1.optPessoaFisica.value=="") {
		alert('Selecione o Tipo de Pessoa!');
		document.form1.optPessoaFisica.focus();
		return false;
	}
	if(document.form1.optSegAssistencial.value=="") {
		alert('Selecione um Segmento!');
		document.form1.optSegAssistencial.focus();
		return false;
	}
}	
function Valida_Newsletter() {
	if(document.form2.txtNome.value=="" || document.form2.txtNome.value=="Nome") {
		alert('Preencha o Campo Nome!');
		document.form2.txtNome.focus();
		return false;
	}
	if(document.form2.txtEmail.value=="" || document.form2.txtEmail.value=="E-mail") {
		alert('Preencha o Campo E-mail!');
		document.form2.txtEmail.focus();
		return false;
	}
	if (document.form2.txtEmail.value.search("@") == -1 || document.form2.txtEmail.value.search("[.*]") == -1){
	window.alert ("O e-mail não é válido!");   
	document.form2.txtEmail.focus();     
	return false;    
	}
}	

function Valida_Contato() {
	if(document.form4.txtNome.value=="") {
		alert('Preencha o Campo Nome!');
		document.form4.txtNome.focus();
		return false;
	}
	if(document.form4.txtEmail.value=="") {
		alert('Preencha o Campo E-mail!');
		document.form4.txtEmail.focus();
		return false;
	}
	if (document.form4.txtEmail.value.search("@") == -1 || document.form4.txtEmail.value.search("[.*]") == -1){
	window.alert ("O e-mail não é válido!");   
	document.form4.txtEmail.focus();     
	return false;    
	}
	if(document.form4.txtAssunto.value=="") {
		alert('Preencha o Campo Assunto!');
		document.form4.txtAssunto.focus();
		return false;
	}
	if(document.form4.txtMensagem.value=="") {
		alert('Preencha o Campo Assunto!');
		document.form4.txtMensagem.focus();
		return false;
	}
}	

function Valida_Recado() {
	if(document.form4.txtNome.value=="") {
		alert('Preencha o Campo Nome!');
		document.form4.txtNome.focus();
		return false;
	}
	if(document.form4.txtEmail.value=="") {
		alert('Preencha o Campo E-mail!');
		document.form4.txtEmail.focus();
		return false;
	}
	if (document.form4.txtEmail.value.search("@") == -1 || document.form4.txtEmail.value.search("[.*]") == -1){
	window.alert ("O e-mail não é válido!");   
	document.form4.txtEmail.focus();     
	return false;    
	}
	if(document.form4.txtEstado.value=="") {
		alert('Preencha o Campo Estado!');
		document.form4.txtEstado.focus();
		return false;
	}
	if(document.form4.txtEstado.value=="") {
		alert('Preencha o Campo Estado!');
		document.form4.txtEstado.focus();
		return false;
	}
	if(document.form4.txtCidade.value=="") {
		alert('Preencha o Campo Cidade!');
		document.form4.txtCidade.focus();
		return false;
	}
	if(document.form4.txtBairro.value=="") {
		alert('Preencha o Campo Cidade!');
		document.form4.txtBairro.focus();
		return false;
	}
	if(document.form4.txtRecado.value=="") {
		alert('Deixe seu Recado!');
		document.form4.txtRecado.focus();
		return false;
	}
}

