 <!-- Início da função de criar máscara
  function criaMascara(_RefObjeto, _Modelo){
    var valorAtual = _RefObjeto.value;        
    var valorNumerico = '';
    var nIndexModelo = 0;
    var nIndexString = 0;
    var valorFinal = '';
    var adicionarValor = true;     
      // limpa a string valor atual para verificar 
      // se todos os caracteres são números
      for (i=0;i<_Modelo.length;i++){
        if (_Modelo.substr(i,1) != '#'){
          valorAtual = valorAtual.replace(_Modelo.substr(i,1),'');
      }}
      // verifica se todos os caracteres são números
      for (i=0;i<valorAtual.length;i++){
        if (!isNaN(parseFloat(valorAtual.substr(i,1)))){
          valorNumerico = valorNumerico + valorAtual.substr(i,1);
      }}
      // aplica a máscara ao campo informado usando
      // o modelo de máscara informado no script
      for (i=0;i<_Modelo.length;i++){
        if (_Modelo.substr(i,1) == '#'){
          if (valorNumerico.substr(nIndexModelo,1) != ''){
            valorFinal = valorFinal + valorNumerico.substr(nIndexModelo,1);
            nIndexModelo++;nIndexString++;
          } 
            else {
              adicionarValor = false;
        }}
          else {
            if (adicionarValor && valorNumerico.substr(nIndexModelo,1) != ''){
            valorFinal = valorFinal + _Modelo.substr(nIndexString,1)
            nIndexString++;
          }}
      }
      //alert(valorFinal)
      _RefObjeto.value = valorFinal 
  }
  //--> Fim da função de criar máscara
  
  
  
 <!-- Valida Contato
function valida_contato(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.nome.value.length == 0){
ok = false;
msg += "Digite seu NOME!\n";
}
if (f.email.value.length == 0){
ok = false;
msg += "Digite seu E-MAIL!\n";
}							
if (f.mensagem.value.length == 0){
ok = false;
msg += "Digite sua MENSAGEM!\n";
}
if (!ok) alert(msg); 
return ok;
}
 //-->
 

 

<!-- Valida Horário
function valida_horarios(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.id_horario.value.length == 0){
ok = false;
msg += "Selecione um HORÁRIO!\n";
}
if (!ok) alert(msg); 
return ok;
}
 //-->


<!-- Valida Horário
function valida_horarios2(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.id_horario.value.length == 0){
ok = false;
msg += "Selecione um HORÁRIO!\n";
}
if (f.id_horario.value == f.id_horario2.value){
ok = false;
msg += "O HORÁRIO 1 não pode ser o mesmo que o HORÁRIO 2!\n";
}
if (!ok) alert(msg); 
return ok;
}
 //-->




 <!-- Valida Cadastro
function validar_EE(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.cpf.value.length == 0){
ok = false;
msg += "Digite o CPF!\n";
}
if (f.nome.value.length == 0){
ok = false;
msg += "Digite seu NOME!\n";
}

if (f.dia.value.length == 0){
ok = false;
msg += "Digite o DIA do seu nascimento!\n";
}
if (f.mes.value.length == 0){
ok = false;
msg += "Digite o MÊS do seu nascimento!\n";
}
if (f.ano.value.length == 0){
ok = false;
msg += "Digite o ANO do seu nascimento!\n";
}

if (f.ident_num.value.length == 0){
ok = false;
msg += "Digite o NÚMERO de seu RG!\n";
}
if (f.ident_org.value.length == 0){
ok = false;
msg += "Digite o ORGÂO de seu RG!\n";
}
if (f.ident_uf.value.length == 0){
ok = false;
msg += "Selecione o ESTADO do seu RG!\n";
}



if (f.cep.value.length == 0){
ok = false;
msg += "Digite seu CEP!\n";
}
if (f.rua.value.length == 0){
ok = false;
msg += "Digite seu ENDEREÇO!\n";
}
if (f.num.value.length == 0){
ok = false;
msg += "Digite o NÚMERO!\n";
}
if (f.bairro.value.length == 0){
ok = false;
msg += "Digite seu BAIRRO!\n";
}
if (f.cidade.value.length == 0){
ok = false;
msg += "Digite seu CIDADE!\n";
}
if (f.uf.value.length == 0){
ok = false;
msg += "Selecione o ESTADO!\n";
}



if (f.email.value.length == 0){
ok = false;
msg += "Digite o seu E-MAIL!\n";
}
if (f.codpolo.value.length == 0){
ok = false;
msg += "Selecione o POLO!\n";
}


if (f.formacao_academica.value.length == 0){
ok = false;
msg += "Selecione a FORMAÇÃO ACADÊMICA!\n";
}
if (f.experiencia_tutoria.value.length == 0){
ok = false;
msg += "Selecione a EXPERIÊNCIA EM TUTORIA!\n";
}
if (f.capacitacao.value.length == 0){
ok = false;
msg += "Selecione o CAPACITAÇÃO!\n";
}
if (f.pratica_tutoria.value.length == 0){
ok = false;
msg += "Selecione a PRÁTICA TUTORIA!\n";
}
if (f.arquivo.value.length == 0){
ok = false;
msg += "Selecione o ARQUIVO!\n";
}


if (!ok) alert(msg); 
return ok;
}
 //-->

 <!-- Valida Cadastro
function valida_form(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.nome.value.length == 0){
ok = false;
msg += "Digite seu NOME!\n";
}

if (f.dia.value.length == 0){
ok = false;
msg += "Digite o DIA do seu nascimento!\n";
}
if (f.mes.value.length == 0){
ok = false;
msg += "Digite o MÊS do seu nascimento!\n";
}
if (f.ano.value.length == 0){
ok = false;
msg += "Digite o ANO do seu nascimento!\n";
}


if (f.endereco.value.length == 0){
ok = false;
msg += "Digite seu ENDEREÇO!\n";
}
if (f.num.value.length == 0){
ok = false;
msg += "Digite o NÚMERO!\n";
}
if (f.bairro.value.length == 0){
ok = false;
msg += "Digite seu BAIRRO!\n";
}
if (f.cidade.value.length == 0){
ok = false;
msg += "Digite seu CIDADE!\n";
}
if (f.uf.value.length == 0){
ok = false;
msg += "Selecione o ESTADO!\n";
}



if (f.email.value.length == 0){
ok = false;
msg += "Digite o seu E-MAIL!\n";
}
if (f.id_vaga.value.length == 0){
ok = false;
msg += "Selecione o TIPO DE VAGA!\n";
}

if (!ok) alert(msg); 
return ok;
}
 //-->


<!-- Fade nas fotos
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){ 
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout
	("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
   }
}
 //-->
 
 
   <!----------Pop Up---------->
function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    this.major = parseInt(navigator.appVersion)
    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav3 = (this.nav && (this.major == 3)) 
    this.ie   = (agt.indexOf("msie") != -1)
}
var is = new Is();

function popup(url,width,height) {
        if (is.nav) {
                width  += (is.nav3) ? 20 : 15;
                height += (is.nav3) ? 30 : 15;
        } else {
                width  += 0;
                height += 0;
        }
        newWinObj = window.open(url,'','toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=yes,resizable=0,copyhistory=0,width=' + width + ',height=' + height);
        newWinObj.moveTo(100,50); 

}

 <!-- Busca Endereço
    function getEndereco() {
            // Se o campo CEP não estiver vazio
            if($.trim($("#cep").val()) != ""){
                $.getScript("http://cep.republicavirtual.com.br/web_cep.php?formato=javascript&cep="+$("#cep").val(), function(){
                    //Se o resultado for igual a 1
                      if(resultadoCEP["resultado"]){
                        // troca o valor dos elementos
                        $("#rua").val(unescape(resultadoCEP["tipo_logradouro"])+" "+unescape(resultadoCEP["logradouro"]));
                        $("#bairro").val(unescape(resultadoCEP["bairro"]));
                        $("#cidade").val(unescape(resultadoCEP["cidade"]));
                        $("#estado").val(unescape(resultadoCEP["uf"]));
                    }else{
                        alert("Endereço não encontrado");
                    }
                });                
            }            
    }
	//-->

