// // openwindow // // Uso: ow(x, y), target=window // function ow (x, y) { var t = window.open ('' , 'window', 'width=' + x + ',height=' + y + ',scrollbars=yes'); t.focus(); } 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(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; } function validateMail() { var obj = document.all['subscriberMail']; if(obj.value == "") { alert('Campo email em branco!'); obj.focus(); return false; } 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('---------------------------------- \n' + ' Endereço de email inválido!\n' + '----------------------------------'); obj.select(); obj.focus(); return false; } var t = window.open ('neocast/subscriber_action.php?subscriberMail=' + obj.value , 'window', 'width=400,height=370,scrollbars=yes'); t.focus(); //ajaxSendRequest('conteudo', 'principal.htm?subscriberMail=' + obj.value, null); } function submitIndicator() { var senderName = document.all['indicatorSenderName'].value; var senderMail = document.all['indicatorSenderMail'].value; var rcptName = document.all['indicatorRcptName_0'].value; var rcptMail = document.all['indicatorRcptMail_0'].value; if (!senderName) { alert('Digite seu nome!'); document.all['indicatorSenderName'].focus(); return false; } if (!isMail(senderMail)){ alert('E-mail inválido!'); document.all['indicatorSenderMail'].focus(); return false; } if (!rcptName) { alert('Digite o nome do destinatário!'); document.all['indicatorRcptName_0'].focus(); return false; } if (!isMail(rcptMail)){ alert('E-mail do destinatário inválido!'); document.all['indicatorRcptMail_0'].focus(); return false; } ajaxSendRequest('conteudo', 'indicator/index.php', document.getElementById('form1')); } function neoCast_ChPage(comboSelect, section, jsSearchString){ url = "conteudo.php?pagina=neocast/list.php&page=" + comboSelect[comboSelect.selectedIndex].value +"§ion="+ section + jsSearchString; ajaxSendRequest('conteudo', url, null); } function neoCast_SearchByKeyCode(KeyCode,section,classTitle){ if (KeyCode==13) { ajaxSendRequest('conteudo','conteudo.php?pagina=neocast/list.php&castSearchInput='+document.getElementById('castSearchInput').value+'§ion='+section+classTitle,null); } } function validaFormEnquete(){ var diainicio = trim(document.form1.diainicio.value); var mesinicio = trim(document.form1.mesinicio.value); var anoinicio = trim(document.form1.anoinicio.value); var diafim = trim(document.form1.diafim.value) var mesfim = trim(document.form1.mesfim.value); var anofim = trim(document.form1.anofim.value); if (trim(document.form1.pergunta.value) == ''){ alert('Pergunta em branco!') document.form1.pergunta.focus(); document.form1.pergunta.select(); return false; } if ((diainicio<1) || (diainicio>31)){ alert('Dia de inicio inválido!'); document.form1.diainicio.focus(); document.form1.diainicio.select(); return false; } if ((mesinicio<1) || (mesinicio>12)){ alert('Mês de inicio inválido!'); document.form1.mesinicio.focus(); document.form1.mesinicio.select(); return false; } if(anoinicio==''){ alert('Ano de inicio inválido!'); document.form1.anoinicio.focus(); document.form1.anoinicio.select(); return false; } if ((diafim<1) || (diafim>31)){ alert('Dia de fim inválido!'); document.form1.diafim.focus(); document.form1.diafim.select(); return false; } if ((mesfim<1) || (mesfim>12)){ alert('Mês de fim inválido!'); document.form1.mesfim.focus(); document.form1.mesfim.select(); return false; } if(anofim==''){ alert('Ano de fim inválido!'); document.form1.anofim.focus(); document.form1.anofim.select(); return false; } if (anoinicio>anofim){ alert('Ano de inicio maior que ano fim!'); document.form1.anoinicio.focus(); return false; } return true; } function validaFormResposta(){ if (trim(document.form1.resposta.value) == ''){ document.form1.resposta.focus(); alert('Resposta em branco!'); return false; } return true; } function neophoto_ChPage(comboSelect){ url = "conteudo.php?pagina=neophoto/list_images.php&PAGE_ID=7&CONTENT_ID=8&category=" + comboSelect[comboSelect.selectedIndex].value+"&classTitulo=conteudo_titulo_fotos"; ajaxSendRequest('conteudo', url, null); } function neophotoChPg(obj,category) { // Link para a nova página var url = "conteudo.php?pagina=neophoto/list_images.php&PAGE_ID=7&CONTENT_ID=8&category="+category+"&page="+ obj[obj.selectedIndex].value+"&classTitulo=conteudo_titulo_fotos"; ajaxSendRequest('conteudo', url, null); } function neophotoChPg02(obj,category) { // Link para a nova página var url = "conteudo.php?pagina=neophoto1/list_images.php&PAGE_ID=7&CONTENT_ID=8&category="+category+"&page="+ obj[obj.selectedIndex].value+"&classTitulo=conteudo_titulo_fotos"; //alert(url); ajaxSendRequest('conteudo', url, null); } function neoDownload_ChPage(comboSelect){ url = "conteudo.php?pagina=downloads.php&PAGE_ID=3&CONTENT_ID=3&category=" + comboSelect[comboSelect.selectedIndex].value+"&classTitulo=conteudo_titulo_downloads"; ajaxSendRequest('conteudo', url, null); } // JavaScript Document - menu Drop Down startList = function() { if (document.all&&document.getElementById) { navRoot = document.getElementById("botao"); for (i=0; i //function Preload(simplePreload.arguments args[]) { //var args = simplePreload.arguments; //document.imageArray = new Array(args.length); //for(var i=0; i