<!--
/******************************************************************************
 Produzido por Gustavo Valle
 Conteúdo protegido pela lei Nº 9.610/98 de Direitos Autorais.
 É expressamente proibida a cópia ou reprodução sem autorização.
/******************************************************************************/
/********************* FUNÇÕES GERAIS DO ADMINISTRADOR DO SISTEMA *************/
/******************************************************************************/
// LINK NO DIV
/******************************************************************************/
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
/******************************************************************************/
// POPUP
/******************************************************************************/
function Popup(mypage, popup, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage, popup, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
/******************************************************************************/
// RESTRINGE OS CAMPOS A NUMÉRICO
/******************************************************************************/
function Numerico(Campo) {
	var	strValor = Campo.value;
	var intTam = strValor.length;
	var intLoop = 0;
	var strCaracter;
	for (; intLoop < intTam; intLoop++){
		strCaracter = strValor.substring(intLoop, intLoop + 1);
		if (strCaracter == 0 || strCaracter == 1 || strCaracter == 2 || strCaracter == 3 || strCaracter == 4 || strCaracter == 5 || strCaracter == 6 || strCaracter == 7 || strCaracter == 8 || strCaracter == 9 || strCaracter == ',' || strCaracter == '(' || strCaracter == ')' || strCaracter == '-' || strCaracter == ':' || strCaracter == '/' || strCaracter == '.') {
		}
		else{
			Campo.value = strValor.substring(0, intLoop );
		}
	}
}
/******************************************************************************/
// RESTRINGE SOMENTE PARA NÚMEROS
/******************************************************************************/
function Numeros(Campo) {
	var	strValor = Campo.value;
	var intTam = strValor.length;
	var intLoop = 0;
	var strCaracter;
	for (; intLoop < intTam; intLoop++){
		strCaracter = strValor.substring(intLoop, intLoop + 1);
		if (strCaracter == 0 || strCaracter == 1 || strCaracter == 2 || strCaracter == 3 || strCaracter == 4 || strCaracter == 5 || strCaracter == 6 || strCaracter == 7 || strCaracter == 8 || strCaracter == 9) {
		}
		else{
			Campo.value = strValor.substring(0, intLoop );
		}
	}
}
/******************************************************************************/
//Formata número tipo moeda usando o evento onKeyDown 

function MascaraMoeda(objTextBox, SeparadorMilesimo, SeparadorDecimal, e){
    var sep = 0;
    var key = '';
    var i = j = 0;
    var len = len2 = 0;
    var strCheck = '0123456789';
    var aux = aux2 = '';
    var whichCode = (window.Event) ? e.which : e.keyCode;
    if (whichCode == 13) return true;
    key = String.fromCharCode(whichCode); // Valor para o código da Chave
    if (strCheck.indexOf(key) == -1) return false; // Chave inválida
    len = objTextBox.value.length;
    for(i = 0; i < len; i++)
        if ((objTextBox.value.charAt(i) != '0') && (objTextBox.value.charAt(i) != SeparadorDecimal)) break;
    aux = '';
    for(; i < len; i++)
        if (strCheck.indexOf(objTextBox.value.charAt(i))!=-1) aux += objTextBox.value.charAt(i);
    aux += key;
    len = aux.length;
    if (len == 0) objTextBox.value = '';
    if (len == 1) objTextBox.value = '0'+ SeparadorDecimal + '0' + aux;
    if (len == 2) objTextBox.value = '0'+ SeparadorDecimal + aux;
    if (len > 2) {
        aux2 = '';
        for (j = 0, i = len - 3; i >= 0; i--) {
            if (j == 3) {
                aux2 += SeparadorMilesimo;
                j = 0;
            }
            aux2 += aux.charAt(i);
            j++;
        }
        objTextBox.value = '';
        len2 = aux2.length;
        for (i = len2 - 1; i >= 0; i--)
        objTextBox.value += aux2.charAt(i);
        objTextBox.value += SeparadorDecimal + aux.substr(len - 2, len);
    }
    return false;
}
/******************************************************************************/
//COLOCA BARRAS NA DATA
/******************************************************************************/
function DataVer (formato,objeto)
{
	Campo = eval (objeto);
	// DATA
	if (formato=='data')
	{
		separador = '/'; 
		conjunto1 = 2;
		conjunto2 = 5;
		if (Campo.value.length == conjunto1)
		{
			Campo.value = Campo.value + separador;
		}
		if (Campo.value.length == conjunto2)
		{
			Campo.value = Campo.value + separador;
		}
	}
}
/******************************************************************************/
// VERIFICA QUANTIDADE DE DIAS EM FEVEREIRO
/******************************************************************************/
function DiasInFevereiro (pnAno) {
    return (  ((pnAno % 4 == 0) && ( (!(pnAno % 100 == 0)) || (pnAno % 400 == 0) ) ) ? 29 : 28 );
}

// VALIDA DATA
function ValidaData(field) {
	if (field.value == "") {
		return true;
	}
	var hoje = new Date();
	var anoAtual = hoje.getFullYear();
	var barras = field.value.split("/");
	if (barras.length == 3) {
		var dia = barras[0];
		var mes = barras[1];
		var ano = barras[2];
		var resultado = (!isNaN(dia) && (dia > 0) && (dia < 32)) && (!isNaN(mes) && (mes > 0) && (mes < 13)) && (!isNaN(ano) && (ano.length == 4));
		if (!resultado) {
			alert("Formato de data inválido. Ex.: (dd/mm/aaaa)");
			field.focus();
			field.select();
			return false;
		}
		if (ano.length != 4) {
			alert("O ano deve ter 4 digitos.");
			field.focus();
			field.select();
			return false;
		}
		//if (ano < anoAtual) {
			//alert("O ano não pode ser menor que o ano atual.");
			//field.focus();
			//field.select();
			//return false;
		//}
		dias = new Array(13);
		dias[1] = 31;
		dias[2] = DiasInFevereiro(ano);   // deve ser verificado o caso de anos bissextos
		dias[3] = 31;
		dias[4] = 30;
		dias[5] = 31;
		dias[6] = 30;
		dias[7] = 31;
		dias[8] = 31;
		dias[9] = 30;
		dias[10] = 31;
		dias[11] = 30;
		dias[12] = 31;
		if (dia > dias[mes]) {
			alert("Dia inválido.");
			field.focus();
			field.select();
			return false;
		}
	} else {
		alert("Formato de data inválido. Ex.: (dd/mm/aaaa)");
		field.focus();
		field.select();
		return false;
	}
}
/******************************************************************************/
// VALIDA HORA MINUTO
/******************************************************************************/
function ValidaHora(field) {
	if (field.value == "") {
		return true;
	}
	if (field.value.length != 5) {
		alert("Formato de hora inválido. Ex.: (hh:mm)");
		field.focus();
		field.select();
		return false;
	}
	var barras = field.value.split(":");
	if (barras.length == 2) {
		var hora = barras[0];
		var minuto = barras[1];
		var resultado = (!isNaN(hora) && (hora >= 0) && (hora < 24)) && (!isNaN(minuto) && (minuto >= 0) && (minuto < 60));
		if (!resultado) {
			alert("Formato de hora inválido. Ex.: (hh:mm)");
			field.focus();
			field.select();
			return false;
		}
	}
	else {
		alert("Formato da hora inválido. Ex.: (hh:mm)");
		field.focus();
		field.select();
		return false;
	}
}
/******************************************************************************/
//COLOCA PONTO E TRACO NO CEP
/******************************************************************************/
function CEPVer (formato,objeto)
{
	Campo = eval (objeto);
	// CEP
	if (formato=='cep')
	{
		separador1 = '.';
		separador2 = '-';
		conjunto1 = 2;
		conjunto2 = 6;
		if (Campo.value.length == conjunto1)
		{
			Campo.value = Campo.value + separador1;
		}
		if (Campo.value.length == conjunto2)
		{
			Campo.value = Campo.value + separador2;
		}
	}
}
/******************************************************************************/
// Valida o CEP
/******************************************************************************/
function ValidaCEP(field) {
	var lcValor = new String(field.value); 
	if (lcValor.length == 0) {
		return true;
	}
	// Último Caracter Digitado
	var lcCaracter_Digitado = lcValor.substring(lcValor.length - 1, 10);
	
	// Verifica se o usuário entrou com um caracter válido
	if ( !(lcCaracter_Digitado.charCodeAt() >=48 && lcCaracter_Digitado.charCodeAt() <= 57) ) {
		field.value = lcValor.substring(0, lcValor.length - 1);
		alert("Caracter inválido!");
		field.focus();
	}
	if (lcValor.length < 5) {
		if (lcCaracter_Digitado == "/") {
			// Remove caracter
			field.value = lcValor.substring(0, lcValor.length - 1);
			field.value = "";
			field.focus();
		}
	}
	if (lcValor.length == 5) {
		// Adiciona caracter
		field.value = poObjeto.value + "-";
		field.focus();
	}
	if (lcValor.length > 9) {
		if (lcCaracter_Digitado == "/") {
			// Remove caracter
			field.value = lcValor.substring(0, lcValor.length - 1);
			field.value = "";
			field.focus();
		}
	}
	return true;
}
/******************************************************************************/
//COLOCA BARRAS NO CPF
/******************************************************************************/
function CPFVer (formato,objeto)
{
	Campo = eval (objeto);
	// CPF
	if (formato=='cpf')
	{
		separador = '.';
		separador1 = '-';
		conjunto1 = 3;
		conjunto2 = 7;
		conjunto3 = 11;
		if (Campo.value.length == conjunto1)
		{
			Campo.value = Campo.value + separador;
		}
		if (Campo.value.length == conjunto2)
		{
			Campo.value = Campo.value + separador;
		}
		if (Campo.value.length == conjunto3)
		{
			Campo.value = Campo.value + separador1;
		}
	}
}
/******************************************************************************/
//VALIDA CPF
/******************************************************************************/
function validaCPF(campo) {
    cpf = campo.value;
    numeros = "0123456789"
    cpfx = "";
      for (x = 0; x <= 14; x++)
      {
      if (numeros.indexOf(cpf.charAt(x)) >= 0)
      cpfx = cpfx + cpf.charAt(x);
      }
  valor = true;
  erro = new String;
  //if (cpf.length < 11) erro += "CPF incompleto. ";
  //campo.value = "";
  var nonNumbers = /\D/;
  if (nonNumbers.test(cpfx)) erro += "A verificacao de CPF suporta apenas Números!";
  if (cpf == "000.000.000-00" || cpf == "111.111.111-11" || cpf == "222.222.222-22" || cpf == "333.333.333-33" || cpf == "444.444.444-44" || cpf == "555.555.555-55" || cpf == "666.666.666-66" || cpf == "777.777.777-77" || cpf == "888.888.888-88" || cpf == "999.999.999-99"){
      erro += "Número de CPF invalido!"
      //campo.value = "";
  }
  var a = [];
  var b = new Number;
  var c = 11;
  for (i=0; i<11; i++){
    a[i] = cpfx.charAt(i);
    if (i < 9) b += (a[i] *  --c);
  }
  if ((x = b % 11) < 2) { a[9] = 0 } else { a[9] = 11-x }
  b = 0;
  c = 11;
  for (y=0; y<10; y++) b += (a[y] *  c--);
  if ((x = b % 11) < 2) { a[10] = 0; } else { a[10] = 11-x; }
  if ((cpfx.charAt(9) != a[9]) || (cpfx.charAt(10) != a[10])){
    erro +="Número de CPF invalido!";
    //campo.value = "";
  }
  if (erro.length > 0){
    alert(erro);
    campo.focus();
    return false;
  }
  return true;
  }
/******************************************************************************/
// VALIDA EMAILS
/******************************************************************************/
function ValidaEmail(field) {
	var mail='';
	if (field.value == '') { return false; }
	else { mail = field; }
	
	if (mail.value == "") {
		alert("Informe seu e-mail.");
		mail.focus();
		mail.select();
		return false;
	}
	else {
		prim = mail.value.indexOf("@")
		if (prim < 2) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("@",prim + 1) != -1) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf(".") < 1) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf(" ") != -1) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("zipmeil.com") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("hotmeil.com") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf(".@") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("@.") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf(".com.br.") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("/") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("[") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("]") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("(") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf(")") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
		if (mail.value.indexOf("..") > 0) {
			alert("O e-mail informado parece não estar correto.");
			mail.focus();
			mail.select();
			return false;
		}
	}
	return true;
}
/******************************************************************************/
//VALIDA A IMAGEM
/******************************************************************************/
function Submit_Imagem(){

var nomeForm = document.Registro_Imagem;

var txt_imagem=nomeForm.txt_imagem.value;
if (txt_imagem==""){
alert("Insira uma imagem.")
nomeForm.txt_imagem.focus()
return false
	}

extArray = new Array(".jpg");
var file=nomeForm.txt_imagem.value;
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) nomeForm.submit();
else
alert("Por favor, só serão aceitos arquivos nas terminações:  " 
+ (extArray.join("  ")) + "\nEscolha uma nova "
+ "imagem e envie novamente.");
return false

nomeForm.submit();
}
/******************************************************************************/
//VALIDA O ARQUIVO
/******************************************************************************/
function Submit_Arquivo(){

var nomeForm = document.Registro_Arquivo;

var txt_arquivo=nomeForm.txt_arquivo.value;
if (txt_arquivo==""){
alert("Insira um arquivo.")
nomeForm.txt_arquivo.focus()
return false
	}

extArray = new Array(".xls",".pdf");
var file=nomeForm.txt_arquivo.value;
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) nomeForm.submit();
else
alert("Por favor, só serão aceitos arquivos nas terminações:  " 
+ (extArray.join("  ")) + "\nEscolha um novo "
+ "arquivo e envie novamente.");
return false

nomeForm.submit();
}
/******************************************************************************/
// USUÁRIO E SENHA NO LOGIN
/******************************************************************************/
function Submit_Login(){

var nomeForm = document.Reg_Login;

var txt_email=nomeForm.txt_email.value;
if (txt_email==""){
alert("Digite seu E-mail.")
nomeForm.txt_email.focus()
return false
	}
/*TROCA ASPAS SIMPLES E DUPLAS POR CODIGO HTML*/
var HTMLEncode = txt_email;
HTMLEncode = HTMLEncode.replace(/["]+/g,'&quot;');
HTMLEncode = HTMLEncode.replace(/[']+/g,'&quot;');
HTMLEncode = HTMLEncode.replace(/[<]+/g,'&lt;');
HTMLEncode = HTMLEncode.replace(/[>]+/g,'&gt;');
/*********************************************/
nomeForm.txt_email.value = HTMLEncode

var txt_senha=nomeForm.txt_senha.value;
if (txt_senha==""){
alert("Digite sua Senha.")
nomeForm.txt_senha.focus()
return false
	}
/*TROCA ASPAS SIMPLES E DUPLAS POR CODIGO HTML*/
var HTMLEncode1 = txt_senha;
HTMLEncode1 = HTMLEncode1.replace(/["]+/g,'&quot;');
HTMLEncode1 = HTMLEncode1.replace(/[']+/g,'&quot;');
HTMLEncode1 = HTMLEncode1.replace(/[<]+/g,'&lt;');
HTMLEncode1 = HTMLEncode1.replace(/[>]+/g,'&gt;');
/*********************************************/
nomeForm.txt_senha.value = HTMLEncode1

}

/******************************************************************************/
// VALIDA BUSCA
/******************************************************************************/
function Submit_Busca(){

var nomeForm = document.Registro_Busca;

var txt_tipo=nomeForm.txt_tipo.value;
if (txt_tipo==""){
alert("Escolha o Tipo.")
nomeForm.txt_tipo.focus()
return false
	}

nomeForm.submit();
}
/******************************************************************************/
// VALIDA NEWSLETTER
/******************************************************************************/
function Submit_Newsletter(){

var nomeForm = document.Reg_Newsletter;

var txt_nome=nomeForm.txt_nome.value;
if (txt_nome==""){
alert("Digite seu Nome.")
nomeForm.txt_nome.focus()
return false
	}

var txt_email=nomeForm.txt_email.value;
if (txt_email==""){
alert("Digite seu E-mail.")
nomeForm.txt_email.focus()
return false
	}
	
nomeForm.submit();
}
/******************************************************************************/
// VALIDA BUSCA
/******************************************************************************/
function Submit_Busca1(){

var nomeForm = document.Reg_Busca;
	
var txt_busca=nomeForm.txt_busca.value;
if (txt_busca==""){
alert("Digite uma palavra para a Busca.")
nomeForm.txt_busca.focus()
return false
	}
	
var txt_tipo=nomeForm.txt_tipo.value;
if (txt_tipo==""){
alert("Escolha uma opção para a busca.")
nomeForm.txt_tipo.focus()
return false
	}
	
nomeForm.submit();
}


function Submit_Busca_Reload(){

var nomeForm = document.Reg_Busca;

nomeForm.submit();
}
//******************************************************************************/
//VALIDA ENVIO DE CONTATO
/******************************************************************************/
function Submit_Contato(){

var nomeForm = document.Registro_Contato;

var txt_nome=nomeForm.txt_nome.value;
if (txt_nome==""){
alert("Digite o seu nome.")
nomeForm.txt_nome.focus()
return false
	}

var txt_email=nomeForm.txt_email.value;
if (txt_email==""){
alert("Didite o seu e-mail.")
nomeForm.txt_email.focus()
return false
	}
	
var txt_telefone=nomeForm.txt_telefone.value;
if (txt_telefone==""){
alert("Didite o seu telefone.")
nomeForm.txt_telefone.focus()
return false
	}

var txt_assunto=nomeForm.txt_assunto.value;
if (txt_assunto==""){
alert("Selecione um assunto.")
nomeForm.txt_assunto.focus()
return false
	}

var txt_texto=nomeForm.txt_texto.value;
if (txt_texto==""){
alert("Didite o texto.")
nomeForm.txt_texto.focus()
return false
	}

nomeForm.submit();
}
/******************************************************************************/
//VALIDA BUSCA DE ARTIGO
/******************************************************************************/
function Submit_Artigo(){

var nomeForm = document.Reg_Artigo;

var txt_busca=nomeForm.txt_busca.value;
if (txt_busca==""){
alert("Digite uma palavra para a busca.")
nomeForm.txt_busca.focus()
return false
	}

nomeForm.submit();
}
/******************************************************************************/
//VALIDA ENQUETE
/******************************************************************************/
function Submit_Enquete(){

var nomeForm = document.Reg_Enquete;

	marcado = -1
	for (i=0; i<nomeForm.txt_opcao.length; i++) {
		if (nomeForm.txt_opcao[i].checked) {
			marcado = i
			resposta = nomeForm.txt_opcao[i].value
		}
	}
	
	if (marcado == -1) {
		alert("Selecione uma resposta.");
		nomeForm.txt_opcao[0].focus();
		return false;
	} 

with (nomeForm) {
method = "POST";
action="enquete.asp?acao=1";
jan=Popup('enquete.asp?acao=1','popup','370','390','yes');
target='popup';
submit();
}
return true;

}
/******************************************************************************/
//VALIDA ENVIO DE MATÉRIA
/******************************************************************************/
function Submit_Materia(){

var nomeForm = document.Registro_Materia;

var txt_nome_dest=nomeForm.txt_nome_dest.value;
if (txt_nome_dest==""){
alert("Digite o nome do destinatário.")
nomeForm.txt_nome_dest.focus()
return false
	}
	
var txt_email_dest=nomeForm.txt_email_dest.value;
if (txt_email_dest==""){
alert("Didite o e-mail do destinatário.")
nomeForm.txt_email_dest.focus()
return false
	}


var txt_nome=nomeForm.txt_nome.value;
if (txt_nome==""){
alert("Digite o seu nome.")
nomeForm.txt_nome.focus()
return false
	}
	
var txt_email=nomeForm.txt_email.value;
if (txt_email==""){
alert("Didite o seu e-mail.")
nomeForm.txt_email.focus()
return false
	}

	
nomeForm.submit();
}
/******************************************************************************/
//VALIDA ENVIO TRABALHE CONOSCO
/******************************************************************************/
function Submit_Trabalhe(){

var nomeForm = document.Registro_Trabalhe;

var txt_nome=nomeForm.txt_nome.value;
if (txt_nome==""){
alert("Digite o seu nome.")
nomeForm.txt_nome.focus()
return false
	}
	
var txt_email=nomeForm.txt_email.value;
if (txt_email==""){
alert("Digite o seu e-mail.")
nomeForm.txt_email.focus()
return false
	}

var txt_fone=nomeForm.txt_fone.value;
if (txt_fone==""){
alert("Digite o seu telefone.")
nomeForm.txt_fone.focus()
return false
	}
	
var txt_nascimento=nomeForm.txt_nascimento.value;
if (txt_nascimento==""){
alert("Digite sua data de nascimento.")
nomeForm.txt_nascimento.focus()
return false
	}
	
var txt_escolaridade=nomeForm.txt_escolaridade.value;
if (txt_escolaridade==""){
alert("Escolha uma escolaridade.")
nomeForm.txt_escolaridade.focus()
return false
	}
	
var txt_anexo=nomeForm.txt_anexo.value;
if (txt_anexo==""){
alert("Insira o arquivo word(.doc) que contém o seu currículo.")
nomeForm.txt_anexo.focus()
return false
	}
	
var txt_texto=nomeForm.txt_texto.value;
if (txt_texto==""){
alert("Digite a descrição.")
nomeForm.txt_texto.focus()
return false
	}

extArray = new Array(".doc");
var file=nomeForm.txt_anexo.value;
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) Registro_Trabalhe.submit();
else
alert("Por favor, só serão aceitos arquivos nas terminações:  " 
+ (extArray.join("  ")) + "\nEscolha um novo "
+ "arquivo e tente novamente.");
nomeForm.txt_anexo.focus()
return false

nomeForm.submit()
}
/******************************************************************************/
// VALIDA ADMINISTRADORES
/******************************************************************************/
function Submit_Usuario(){

var nomeForm = document.Registro_Usuario;

var txt_nome=nomeForm.txt_nome.value;
if (txt_nome==""){
alert("Digite o Nome.")
nomeForm.txt_nome.focus()
return false
	}

var txt_email=nomeForm.txt_email.value;
if (txt_email==""){
alert("Digite o E-mail.")
nomeForm.txt_email.focus()
return false
	}

var txt_cpf=nomeForm.txt_cpf.value;
if (txt_cpf==""){
alert("Digite o CPF.")
nomeForm.txt_cpf.focus()
return false
	}

var txt_telefone=nomeForm.txt_telefone.value;
if (txt_telefone==""){
alert("Digite o Telefone.")
nomeForm.txt_telefone.focus()
return false
	}

var txt_endereco=nomeForm.txt_endereco.value;
if (txt_endereco==""){
alert("Digite o Endereço.")
nomeForm.txt_endereco.focus()
return false
	}

var txt_cidade=nomeForm.txt_cidade.value;
if (txt_cidade==""){
alert("Digite a Cidade.")
nomeForm.txt_cidade.focus()
return false
	}

var txt_estado=nomeForm.txt_estado.value;
if (txt_estado==""){
alert("Selecione o Estado.")
nomeForm.txt_estado.focus()
return false
	}

var txt_senha=nomeForm.txt_senha.value;
if (txt_senha==""){
alert("Digite a Senha.")
nomeForm.txt_senha.focus()
return false
	}

var txt_senha1=nomeForm.txt_senha1.value;
if (txt_senha1==""){
alert("Digite a Senha novamente.")
nomeForm.txt_senha1.focus()
return false
	}
	
var txt_senha=nomeForm.txt_senha.value;
var txt_senha1=nomeForm.txt_senha1.value;
if (txt_senha!=txt_senha1){
alert("A Senha nao foi digitada correntamente nos dois campos.")
nomeForm.txt_senha1.focus()
return false
	}

var txt_tipo=nomeForm.txt_tipo.value;
if (txt_tipo==""){
alert("Selecione o Tipo.")
nomeForm.txt_tipo.focus()
return false
	}

var txt_status=nomeForm.txt_status.value;
if (txt_status==""){
alert("Selecione o Status.")
nomeForm.txt_status.focus()
return false
	}

nomeForm.submit();
}
/******************************************************************************/
// -->	