function janela_popup(largura, altura) { window.open("bibliotecas.php?cat=popup","_blank","resizable=no,toolbar=no,status=no,menubar=no,top=20,left=50,scrollbars=no,width=" + largura + ",height=" + altura) }; function Mensagem (texto) { alert (texto); } function MM_findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'+unescape(msg)+'') if(d.all) dy=dy+d.body.scrollTop;x=(!x)?50:Number(x); y=(!y)?-20:Number(y);l.s.left=dx+x; l.s.top=dy+y;l.s.visibility='visible'} } function NovaJanela(url, width, height){ window.open(url,"_blank","resizable=yes,toolbar=no,status=no,menubar=no,top=1,left=50,scrollbars=yes,width=" + width + ",height=" + height) } function MM_jumpMenu(targ,selObj,restore){ eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } function valida_email(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1) return false if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) return false if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) return false if (str.indexOf(at,(lat+1))!=-1) return false if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) return false if (str.indexOf(dot,(lat+2))==-1) return false if (str.indexOf(" ")!=-1) return false return true } function checar_indicacao(){ for (i=0; i<3; i++){ campo = document.forma_indicacao.elements[i]; if (!campo.value){ alert('Você deve preencher todos os campos corretamente!'); campo.focus() return false; } } if(valida_email(document.forma_indicacao.elements[0].value) == false){ alert('Seu e-mail é inválido! Por favor preencha corretamente!'); document.forma_indicacao.elements[0].focus() return false; } if(valida_email(document.forma_indicacao.elements[2].value) == false){ alert('O e-mail do seu amigo é invalido! Por favor preencha corretamente!'); document.forma_indicacao.elements[2].focus() return false; } return true; } function checar_dados(){ for (i=0; i<3; i++){ campo = document.forma_atendimento.elements[i]; if (!campo.value){ alert('Você deve preencher todos os campos corretamente!'); campo.focus() return false; } } if(valida_email(document.forma_atendimento.elements[1].value) == false){ alert('Seu e-mail é inválido! Por favor preencha corretamente!'); document.forma_atendimento.elements[1].focus() return false; } return true; }