function praFrente() { document.getElementById("fMenu").style.height = "160px"; document.getElementById("fMenu").style.zIndex = 500; } /*Checa o email*/ function isMail(string) { var reg = new RegExp('^([\.a-zA-Z0-9_-]+)@([\.a-zA-Z0-9_-]){1,}[\.]{1,1}[a-zA-Z]{2,3}$'); if (!reg.test(string)) return false; return true; } /*Tira os espaços em branco*/ 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; } /*Pesquisa do neoCast*/ function neoCast_SearchByKeyCode(KeyCode){ var section = document.getElementById('section').value*1; var submenu = document.getElementById('sub').value*1; var castSearch=document.getElementById('castSearchInput').value; if (KeyCode==13&§ion>0) { event.keyCode=null; url = "index.php?neoAjax=css/cast_list§ion="+section+"&sub="+submenu+"&castSearchInput="+castSearch; document.location.href = url; } } /*Combo de paginação do neoCast*/ function neoCast_ChPage(comboSelect,section,sub){ var newPage = comboSelect[comboSelect.selectedIndex].value; url = "index.php?neoAjax=css/cast_list§ion="+section+"&sub="+sub+"&page="+newPage; document.location.href = url; } function neoFoto_ChPage(comboSelect,section){ var newPage = comboSelect[comboSelect.selectedIndex].value; url = "index.php?neoAjax=css/fotos_eventos&page="+newPage; document.location.href = url; } /*Validação do formulário de contato*/ function checkFormContato(){ form = document.frContato; if(trim(form.nome.value) == '') { alert('Informe o nome'); form.nome.focus(); return false; } return true; } /*Cadastra-se newsLetter*/ function openSubscriberWindow() { var obj = document.getElementById('newsletter'); var email = document.getElementById('chkemail'); 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; } if(email){ if(trim(email.value)!=trim(obj.value)){ alert('E-mail de usuario nao logado!\n Favor verificar o endereço digitado.') return false } } //showModalDialog('/neocast/subscriber.php?view=$view&subscriberMail='+obj.value, '', 'dialogWidth:350px; dialogHeight:350px; center:yes; help:no; resizable:no; status: no; scroll:no'); window.open('/neocast/subscriber.php?view=$view&subscriberMail='+obj.value, '', 'width=500, height=400, scrollbars=yes, resizable:no, scroll:no, location:no'); obj.value = ''; } function popUp (x, y) { var t = window.open ('' , 'window', 'width=' + x + ',height=' + y + ',scrollbars=yes'); t.focus(); } function click() { if (event.button==2) { alert('Click Direito Desabilitado!'); } } document.onmousedown=click function neocastPopup(imgSrc) { var win = window.open('/neocast/show_image.php?file='+imgSrc, '', 'scrollbars=no, toolbar=no, width=100, height=100'); } /* Função que lista os arquivos para uma determinada categoria escolhida */ function neoDownload_ChPage(){ url = "neodownload/listaArquivos.php?category=" + document.getElementById('category').value; ajaxSendRequest ('neoDownload_listaArquivos', url, null); } /* Fim da Função que lista os arquivos para uma determinada categoria escolhida */ /* Função que lista os arquivos para uma determinada categoria escolhida */ function neoDownload_ChPageRes(){ url = "neodownloadRes/listaArquivos.php?category=" + document.getElementById('category').value; ajaxSendRequest ('neoDownload_listaArquivos', url, null); } /* Fim da Função que lista os arquivos para uma determinada categoria escolhida */ function popVideo(cod, area) { if (area == "R") { var strUrl = 'neovideo/popVideoRestrito.php?codvideo='+cod; } else { var strUrl = 'neovideo/popVideo.php?codvideo='+cod; } var strWindowName = "Janela"; var strWindowFeatures = "width=600, height=410"; var WindowObjectReference = window.open(strUrl, strWindowName, strWindowFeatures); }