function neoCast_SearchByKeyCode(KeyCode){ var section = document.getElementById('section').value; if (KeyCode==13 && section>0){ ajaxSendRequest('conteudo','neocast/list.php?castSearchInput='+document.getElementById('castSearchInput').value+'§ion='+section,null); } } function neoCast_ChPage(comboSelect,section){ var newPage = comboSelect[comboSelect.selectedIndex].value; url = "neocast/list.php?section="+section+"&page="+newPage; ajax('conteudo',url); } function neoDownload_ChPage(comboSelect){ url = "downloads.php?category=" + comboSelect[comboSelect.selectedIndex].value; ajax('conteudo',url); } function neoPhotoChPg(obj,category){ var newPage = obj[obj.selectedIndex].value; url = 'neophoto1/list_images.php?'+'category='+category+'&page='+newPage; ajaxSendRequest('conteudo2',url,null); } function neoPhotoChPg01(obj,category){ var newPage = obj[obj.selectedIndex].value; url = 'neophoto/list_images.php?'+'category='+category+'&page='+newPage; ajaxSendRequest('conteudo2',url,null); } function trim(sString){ while (sString.substring(0,1) == ' ') { sString = sString.substring(1, sString.length); } while (sString.substring(sString.length-1, sString.length) == ' ') { sString = sString.substring(0,sString.length-1); } return sString; } function isMail(m) { if (!m) return false; var reg = new RegExp('^([\.a-zA-Z0-9_-]+)@([\.a-zA-Z0-9_-]){1,}[\.]{1,1}[a-zA-Z]{2,3}$'); if(!reg.test(m)) return false; return true; } /*Cadastra-se newsLetter*/ function openSubscriberWindow() { var obj = document.getElementById('frNewsletterEmail'); var regex = new RegExp('^([\.a-zA-Z0-9_-]+)@([\.a-zA-Z0-9_-]){1,}[\.]{1,1}[a-zA-Z]{2,3}$'); if(!regex.test(obj.value)) { alert('Endereço de email inválido!'); return false; } window.open('/neocast/subscriber.php?view=$view&subscriberMail='+obj.value, '', 'width=400, height=250, scrollbars=yes, resizable:no, scroll:no, location:no'); obj.value = ''; } /*Validação do formulário de contato*/ function verificaFormContato(form) { //var form = document.frmContato; if (trim(form.EMPRESA.value) == "") { alert('Preencha corretamente a empresa') form.EMPRESA.focus(); return false } if (trim(form.NOME.value) == "") { alert('Preencha corretamente o nome') form.NOME.focus(); return false } if (trim(form.TELEFONE.value) == "") { alert('Preencha corretamente o telefone') form.TELEFONE.focus(); return false } if (!isMail(trim(form.EMAIL.value))) { alert('Preencha corretamente o email') form.EMAIL.focus(); return false } if (trim(form.MENSAGEM.value) == "") { alert('Preencha corretamente o comentário') form.MENSAGEM.focus(); return false } /*document.location.href = "neoMailer/action.php"; form.submit();*/ return true; } /*Fim Validação do formulário de contato*/ function verificaLogin() { var email = document.getElementById('frLoginEmail').value var senha = document.getElementById('frLoginSenha').value var url = "neoNovo/neoCadastro/login.php?email=" + email + "&senha=" + senha ajaxSendRequest('conteudo',url,null); ajaxSendRequest('login-home','login_logout.php',null); } function verificaCadastro(form) { var email = form.email.value var senha = form.senha.value var url = "neoNovo/neoCadastro/login.php?email=" + email + "&senha=" + senha ajaxSendRequest('conteudo',url,null); ajaxSendRequest('login','login_logout.php',null); return false; } function ajaxSearch(id,section){ url = "neocast/list.php?section="+section+"&castSearchID="+id+"_Client"; ajax('conteudo',url); } /* Função que grava log de vizualização do neoBanner */ function logView(imgId,area,logPage){ document.getElementById('neoBannerHiddenFrame_'+area).src = logPage + '?logView=TRUE&bannerId='+imgId+'&area='+area; } /* Fim da Função que grava log de vizualização do neoBanner */