// JavaScript Document //globais var megaHtml = ""; var corMouseUp = "#5A83C0"; var corMouseDown = "#3B619C"; var corBorda = "#FFFFFF"; /// /// Nome: CriaMatrizAcessos() /// Ação: Monta os acessos Rapidos abaixo do cabecalho /// Modo de uso: Deve ser chamada no local ao qual o acessos devem ser inseridos /// function CriaItensMenu() { this.length = CriaItensMenu.arguments.length; for (var i=0; i < this.length; i++) { vetorMenu = CriaItensMenu.arguments[i]; html = ""; html += ""; html += ""; html += ""; html += "
"; html += "
"; html += ""; html += ""; html += ""; html += ""; html += "
"; html += " " + vetorMenu[x,2] + "
"; megaHtml += html; } } function ItemMenu(numero,linkMenu,texto) { itemMenu = new Array(); itemMenu[numero,1] = linkMenu; itemMenu[numero,2] = texto; return itemMenu; } function MontaMenu() { document.write(megaHtml); } function Trim(str) { return str.replace(/^\s*|\s*$/g,""); } function RemoveString(stringBase, stringASerRemovida) { var novaString; t = stringBase.indexOf(stringASerRemovida); if(stringBase.indexOf(stringASerRemovida) > -1) { fim = stringBase.substring(t + stringASerRemovida.length,stringBase.length); if(stringBase.indexOf(stringASerRemovida) !=0) inicio = stringBase.substring(0,stringBase.indexOf(stringASerRemovida)); else inicio = ""; novaString = inicio + fim; } return (novaString); } //Globais var niveis = new Array(); function ColetaNiveis(calandraNiveis) { calandraNivel = calandraNiveis.split(";"); var c= 0; for(x=0; x < calandraNivel.length; x++) { if (calandraNivel[x].indexOf("InternetNotícias") > -1) { nomeNivel = RemoveString(calandraNivel[x],"InternetNotícias"); nomeNivel = Trim(nomeNivel); //alert(nomeNivel.length); if (nomeNivel != "") niveis[c] = nomeNivel; c++; } } } function MontaMenuNiveis() { for(u=1; u < niveis.length; u++) { var itensMenu = new CriaItensMenu(ItemMenu(u,"link",niveis[u])); } MontaMenu(); } /// /// Nome: PosicionaSetas() /// Ação: Posiciona as setas no mouseover do botoes do menu. /// Modo de uso: Deve ser colocado no evento mouseover dos botões. /// /// Botão o qual o mouse passou em cima /// Booleano que diz se a seta deve ser mostrada ou escondida function PosicionaSetas(botao,mostra) { idSeta = 'imgSeta_' + botao; if(mostra) { document.getElementById(idSeta).className = 'visivel'; } else { if(!mostra) { document.getElementById(idSeta).className = 'escondido'; } } } /// /// Nome: getQueryVariable() /// Ação: Pega uma variável da query string /// Modo de uso: Deve ser chamada passando o nome da variável /// /// Nome da variável da qual se quer obter o valor function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i /// Nome: getParam() /// Ação: Pega uma variável de uma query /// Modo de uso: Deve ser chamada passando o nome da variável /// /// Nome da variável da qual se quer obter o valor function getParam(variable,query) { var vars = query.split("&"); for (var i=0;i /// Nome: MontaTopo() /// Ação: Monta o Topo das Paginas /// Modo de uso: Deve ser chamada no fim do código html /// /// Nome do botao que foi selecionado no menu function MontaTopo(nomeBotao) { if ( nomeBotao == "bt1") { document.getElementById('imgMiniatura1').src = 'images/imgSecAEmpresaTopoMiniatura1.jpg'; document.getElementById('imgMiniatura2').src = 'images/imgSecAEmpresaTopoMiniatura2.jpg'; document.getElementById('imgMiniatura3').src = 'images/imgSecAEmpresaTopoMiniatura3.jpg'; document.getElementById('imgTopoTexto').src = 'images/imgSecAEmpresaTopoTexto.gif'; } if ( nomeBotao == "bt2") { document.getElementById('imgMiniatura1').src = 'images/imgSecAtuacaoTopoMiniatura1.jpg'; document.getElementById('imgMiniatura2').src = 'images/imgSecAtuacaoTopoMiniatura2.jpg'; document.getElementById('imgMiniatura3').src = 'images/imgSecAtuacaoTopoMiniatura3.jpg'; document.getElementById('imgTopoTexto').src = 'images/imgSecAtuacaoTopoTexto.gif'; } if ( nomeBotao == "bt3") { document.getElementById('imgMiniatura1').src = 'images/imgSecEstatisticasTopoMiniatura1.jpg'; document.getElementById('imgMiniatura2').src = 'images/imgSecEstatisticasTopoMiniatura2.jpg'; document.getElementById('imgMiniatura3').src = 'images/imgSecEstatisticasTopoMiniatura3.jpg'; document.getElementById('imgTopoTexto').src = 'images/imgSecEstatisticasTopoTexto.gif'; } } /// /// Nome: CriaMatrizAcessos() /// Ação: Monta os acessos Rapidos abaixo do cabecalho /// Modo de uso: Deve ser chamada no local ao qual o acessos devem ser inseridos /// function CriaMatrizAcessos() { this.length = CriaMatrizAcessos.arguments.length; abreTabela = ""; document.write(abreTabela); for (var i=0; i < this.length; i++) { vetor = CriaMatrizAcessos.arguments[i]; html = ""; document.write(html); html = ""; } fechaTabela = "
"; html += ""; html += ""; html += ""; html += ""; html += ""; html += ""; html += ""; html += "
"; html += "

"; html += ""; html += "

 "; html += ""; html += vetor[i,2] + " 
"; html += "
"; document.write(fechaTabela); } function AcessoRapido(numero,link,imagem,texto) { acessoRapido = new Array(); acessoRapido[numero,1] = imagem; acessoRapido[numero,2] = texto; acessoRapido[numero,3] = link; return acessoRapido; } function CriaMatrizMenus() { this.length = CriaMatrizMenus.arguments.length; for (var i=0; i < this.length; i++) { vet = CriaMatrizMenus.arguments[i]; if((vet[i,3] != "javascript:void(0)") && (vet[i,1].indexOf("transp.gif") <0)) { html = ""; html += ""; html += ""; html += ""; html += "
"; html += "
"; html += ""; html += ""; html += ""; html += ""; html += ""; html += ""; html += "
"; html += ""; html += ""; html += "
"; document.write(html); html = ""; } } } function Menu(numero,linkMenu,imagem,texto) { menu = new Array(); menu[numero,1] = imagem; menu[numero,2] = texto; menu[numero,3] = linkMenu; return menu; } function CriaMatrizMenusASanepar() { this.length = CriaMatrizMenusASanepar.arguments.length; for (var i=0; i < this.length; i++) { vetMenusASanepar = CriaMatrizMenusASanepar.arguments[i]; html = ""; html += ""; html += ""; html += ""; html += "
"; html += "
"; html += ""; html += ""; html += ""; html += "
"; html += "
"; document.write(html); html = ""; } } function MenuASanepar(numero,linkMenu,imagem,texto) { menuASanepar = new Array(); menuASanepar [numero,1] = imagem; menuASanepar [numero,2] = texto; menuASanepar [numero,3] = linkMenu; return menuASanepar ; } function CriaMatrizDestaques() { this.length = CriaMatrizDestaques.arguments.length; for (var i=0; i < this.length; i++) { vetDestaques = CriaMatrizDestaques.arguments[i]; if((vetDestaques[i,3] != "javascript:void(0)") && (vetDestaques[i,1].indexOf("transp.gif") <0)) { if(vetDestaques[i,5]== 0) link = "javascript:AbreDestaque('" + vetDestaques[i,3] + "');"; if(vetDestaques[i,5]== 1) link = vetDestaques[i,3]; //alert(link); html = ""; html += ""; html += "" html += ""; html += "
"; html += ""; html += ""; html += ""; html += "
"; html += ""; html += vetDestaques[i,2] + "
"; html += ""; html += ""; html += ""; html += ""; html += "
"; html += ""; html += vetDestaques[i,4] + "
"; html += "
"; //alert(vetDestaques[i,1]); document.write(html); } } } function Destaque(numero,link,imagem,titulo,resumo,janela) { destaque = new Array(); destaque[numero,1] = imagem; destaque[numero,2] = titulo; destaque[numero,3] = link; destaque[numero,4] = resumo; destaque[numero,5] = janela; return destaque; } function CriaMatrizAcessosRapidosDestaques() { this.length = CriaMatrizAcessosRapidosDestaques.arguments.length; for (var i=0; i < this.length; i++) { vetAcessosRapidosDestaques = CriaMatrizAcessosRapidosDestaques.arguments[i]; html = ""; html += ""; html += ""; html += ""; html += "
"; html += ""; html += "
"; html += ""; html += ""; html += ""; html += ""; html += "
"; html += ""; html += ""; html += ""; html += ""; html += "
 
"; document.write(html); } } function AcessoRapidoDestaque(numero,link,imagem,titulo) { acessoRapidoDestaque = new Array(); acessoRapidoDestaque [numero,1] = imagem; acessoRapidoDestaque [numero,2] = titulo; acessoRapidoDestaque [numero,3] = link; return acessoRapidoDestaque ; } function CriaMatrizSitesRelacionados() { this.length = CriaMatrizSitesRelacionados.arguments.length; html = "
"; for (var i=0; i < this.length; i++) { vetSiteRelacionado = CriaMatrizSitesRelacionados.arguments[i]; if((vetSiteRelacionado [i,3] != "javascript:void") && (vetSiteRelacionado[i,1].indexOf('transp.gif')<0)) { if(i + 1 == 1) html += ""; if(i +1 != CriaMatrizSitesRelacionados.arguments.length) html += "
    "; } } } html += "
"; document.write(html); } function SiteRelacionado(numero,link,imagem,titulo,resumo) { siteRelacionado = new Array(); siteRelacionado [numero,1] = imagem; siteRelacionado [numero,2] = titulo; siteRelacionado [numero,3] = link; siteRelacionado [numero,4] = resumo; return siteRelacionado ; } function AjustaDivs(tamanho) { document.getElementById('div_linha').height = tamanho document.getElementById('div_transparente').height = tamanho; } function CriaMatrizNoticias() { this.length = CriaMatrizNoticias.arguments.length; for (var i=0; i < this.length; i++) { vetNoticias = CriaMatrizNoticias.arguments[i]; if((vetNoticias[i,1] != "javascript:void(0)") && (vetNoticias[i,2] != "")) { html = ""; html += ""; html += "
" + unescape(vetNoticias [i,2]) + "
"; document.write(html); } } } function CriaMatrizNoticiasMesmaJanela() { this.length = CriaMatrizNoticiasMesmaJanela.arguments.length; for (var i=0; i < this.length; i++) { vetNoticias = CriaMatrizNoticiasMesmaJanela.arguments[i]; html = ""; html += ""; html += "
" + unescape(vetNoticias [i,2]) + "
"; document.write(html); } } function Noticia(numero,link,titulo,resumo,dataPublicacao) { noticia = new Array(); noticia [numero,1] = link; noticia [numero,2] = escape(titulo); noticia [numero,3] = escape(resumo); noticia [numero,4] = escape(dataPublicacao); return noticia ; } function HelpAtendimentoVirtual(secao) { app = "http://www.sanepar.com.br/sanepar/agencia/agencia.nsf"; url = app+"/Ajuda?OpenPage"+secao; dimensoes = "width=600,height=470"; window.open(url,"msgfile",dimensoes+",top=15,left=190,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,status=no,toolbar=no,titlebar=no,hotkeys=no"); } function VerificaMatricula(id) { if(document.getElementById(id).value.length != 0) { if(isNaN(document.getElementById(id).value)) { alert("A matrícula só pode conter números!"); document.getElementById(id).value = ''; document.getElementById(id).focus(); } else { if(document.getElementById(id).value.length != 8) { pos = document.getElementById(id).value.length zeros = "00000000"; completa = zeros.substring(pos) + document.getElementById(id).value; document.getElementById(id).value = completa; } } } } function Foco(id) { if(document.getElementById(id).value.length == 8) document.getElementById('txe_Senha').focus(); } function AlteraSelect(regiao) { var idSelects = new Array(); idSelects[0] = "sel_centro"; idSelects[1] = "sel_oeste"; idSelects[2] = "sel_Norte"; idSelects[3] = "sel_sul-leste"; idSelects[4] = "sel_padrao"; id = regiao != "-1"?"sel_" + regiao:"sel_padrao"; for (x=0; x< idSelects.length; x++) { document.getElementById(idSelects[x]).style.display = 'none'; } document.getElementById(id).style.display = ''; } function VerAnalise(selectObj) { valor = selectObj.options[selectObj.selectedIndex].value; //alert(valor); if (valor != "-1") { dimensoes = "width=618,height=424"; window.open(valor,"AnalisesAgua",dimensoes + ",top=15,left=190,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,status=no,toolbar=no,titlebar=no,hotkeys=no"); }else { alert("Aviso:Escolha uma Cidade!"); } } function confirmacao() { app = document.frmAtendimento.app.value; url = app+"/confirmacao?openpage"; dimensoes = "width=330,height=150"; window.open(url,"msgfile",dimensoes+",top=210,left=230,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,status=no,toolbar=no,titlebar=no,hotkeys=no"); } function validacao(form) { if (form.txe_matricula.value == "") { confirmacao(); } else if (form.txe_senha.value =="") { confirmacao(); } else { form.Login.value = 1; form.submit(); } } function capturaTecla(e) { if (e.keyCode == '13') validacao(window.document.frmAtendimento) } function VersaoImpressao() { endereco = window.location.href; var parcelas = endereco.split('?'); docid= parcelas[0]; parametros= parcelas[1].split('&'); template = 'gen=Gen_VersaoImpressao'; novoendereco = docid + '?' + parametros[0] + '&' + parametros [1] + '&' + parametros[2] + '&' + template; // alert(novoendereco); window.open(novoendereco); } function AlteraTamanhoLetra(tamanho,objTitulo,objTexto) { var classeTitulo = new Array(); var classeTexto = new Array(); classeTitulo[0] = 'titulo'; classeTitulo[1] = 'tituloMedio'; classeTitulo[2] = 'tituloGrande'; classeTexto [0] = 'texto'; classeTexto [1] = 'textoMedio'; classeTexto [2] = 'textoGrande'; document.getElementById(objTitulo).className = classeTitulo[tamanho]; document.getElementById(objTexto).className = classeTexto[tamanho]; } function AbreNoticia(link) { dimensoes = "width=587,height=434"; window.open(link,"Noticia",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,status=yes,toolbar=no,titlebar=no,hotkeys=no"); } function AbreEmailAmigo(link) { dimensoes = "width=249,height=320"; window.open(link,"EMailAmigo",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,status=no,toolbar=no,titlebar=no,hotkeys=no"); } function AbreAbes(link) { dimensoes = "width=587,height=434"; window.open(link,"Abes",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,status=yes,toolbar=no,titlebar=no,hotkeys=no"); } function AbreRecadastramento(link) { dimensoes = "width=537,height=434"; window.open(link,"Recadastramento",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,status=yes,toolbar=no,titlebar=no,hotkeys=no"); } function AbreDestaque(link) { dimensoes = "width=600,height=434"; window.open(link,"Noticia",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,status=no,toolbar=no,titlebar=no,hotkeys=no"); } function AbreRelacionado(link) { vetlinks = link.split("/"); linkReal = "/" + vetlinks[3] + "/" + vetlinks[4] + "/" + vetlinks[5] + "/" + vetlinks[6] + "/" + vetlinks[7]; window.navigate(linkReal); } function AbreSanare(select) { link = select.options[select.selectedIndex].value; escolhida = select.options[select.selectedIndex].text; if (link != "-1") { mensagem = "Você deseja fazer o download da " + escolhida + "?"; if (confirm(mensagem)) { window.navigate(link); } } } function AbreResumoEdicoes(link) { dimensoes = "width=536,height=434"; window.open(link,"Edicoes",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,status=yes,toolbar=no,titlebar=no,hotkeys=no"); } function ConfiguraBuscaSanare(texto) { for (x=0; x< document.getElementById('secao').options.length; x++) { if(document.getElementById('secao').options[x].text.indexOf(texto) >= 0) { document.getElementById('secao').selectedIndex = x; } } } function MostraDivFade(divid,mostra) { document.getElementById(divid).filters[0].Apply(); if(mostra) { document.getElementById(divid).style.display = 'none' document.getElementById(divid).style.display = ''; } else { document.getElementById(divid).style.display = ''; document.getElementById(divid).style.display = 'none' } document.getElementById(divid).filters[0].Play(); } var opcoesBusca = 0; function Pesquisa(idImagem,secao,argumento) { RestauraOpcoesBusca(); if((opcoesBusca != 1) && secao != "") { opcoesBusca = 1; for (x=0; x< document.getElementById('secao').options.length; x++) { if(document.getElementById('secao').options[x].text.indexOf(secao) >= 0) { document.getElementById('secao').selectedIndex = x; document.getElementById('spaProcurando').style.display = ''; document.getElementById(idImagem).src = "/sanepar/calandrakbx/filesmng.nsf/53F2E12F19402BC18325704D006EB325/$File/imgCheckBox.gif?OpenElement"; setTimeout("document.getElementById('formBusca').submit()",200); } } } else { alert('Aviso: Esta seção não esta indexada na pesquisa. Utilize a pesquisa no site inteiro!'); } } function PesquisaAvancada(idImagem,linkPesquisaAvancada,argumento) { RestauraOpcoesBusca(); if(opcoesBusca != 1) { opcoesBusca = 1; //document.getElementById(idImagem).src = "/sanepar/calandrakbx/filesmng.nsf/53F2E12F19402BC18325704D006EB325/$File/imgCheckBox.gif?OpenElement"; //linkP = linkPesquisaAvancada + "&ArgumentoPesquisa=" + argumento; //document.getElementById('spaProcurando').style.display = ''; //setTimeout("window.navigate(linkP)",200); alert('Aviso: A Pesquisa Avançada está indisponível!'); } } function RestauraOpcoesBusca() { var idImgOpcoes = new Array(); opcoesBusca = 0; idImgOpcoes[0] = 'imgPesquisaSite'; idImgOpcoes[1] = 'imgPesquisaSecao'; idImgOpcoes[2] = 'imgPesquisaAvancada'; document.getElementById('spaProcurando').style.display = 'none'; for (x=0; x< idImgOpcoes.length; x++) { document.getElementById(idImgOpcoes[x]).src = "/sanepar/calandrakbx/filesmng.nsf/36B8D89BE9D2DEA78325704D006EAF3E/$File/imgCheckBoxUnChecked.gif?OpenElement"; } } function capturaTeclaPesquisa(e, valor) { if (e.keyCode == "13" && document.getElementById('txtPesquisa').value != "") { MostraDivFade('divBusca',true); } return (false); } function QuebraSecao(secao) { arraySecoes = secao.split(","); return(arraySecoes[0]); } function CriaMatrizBusca() { this.length = CriaMatrizBusca.arguments.length; for (var i=0; i < this.length; i++) { vetBusca = CriaMatrizBusca.arguments[i]; html = ""; html += ""; html += ""; html += ""; html += ""; html += "
"; html += ""; html += ""; html += ""; html += ""; html += "
"; html += ">" + vetBusca[i,2] + "
"; html += ""; html += ""; html += ""; html += ""; html += ""; html += "
 "; html += "" + vetBusca[i,3]; html += " [" + vetBusca[i,4] + "]
"; html += "
"; document.write(html); } } function Busca(numero,link,titulo,resumo,dataPublicacao,secao) { busca = new Array(); busca [numero,1] = link; busca [numero,2] = titulo; busca [numero,3] = resumo; busca [numero,4] = dataPublicacao; busca [numero,5] = secao; return busca ; } function CriaSelectsRegiao(optionsRegioes) { regioes = ""; document.write(regioes); regioes = ""; } function MontaRodapePesquisa(anterior,total,proximo,paginas) { rodape = ""; vazio = true; if( anterior.toLowerCase() != 'javascript:void(0)') { rodape += "Anterior |"; vazio = false; } if(parseInt(total) != 0) { rodape += " Página " + paginas + ""; vazio = false; } if( proximo.toLowerCase() != 'javascript:void(0)') { rodape += "| Próxima"; vazio = false; } if (vazio == true) { rodape = "Voltar"; } document.write(rodape); } function AutoPreenchimento(area) { opcao = parseInt(area); switch (opcao) { case 5: document.getElementById('txe_assunto').value = "Sou parceiro da Sanepar - Gostaria de participar dos Sites Relacionados"; alert("Preencha as demais informações!"); break; case 10: break; } document.getElementById('kwe_area').selectedIndex = area; } function AjustaDivs(tamanho) { document.getElementById('div_linha').style.height = tamanho; document.getElementById('div_transparente').style.height = tamanho; } var req = new Array(); var searchKeys = new Array(); var div = new Array(); function CarregaConcursoInformacoesGerais(url) { div[0] = "divInfoGerais" if (window.XMLHttpRequest) { req[0] = new XMLHttpRequest(); req[0].overrideMimeType('text/xml'); req[0].onreadystatechange = processReqChange_CarregaConcursoInformacoesGerais; req[0].open("GET", url , true); req[0].send(null); } else { if (window.ActiveXObject) { req[0] = new ActiveXObject("Microsoft.XMLHTTP"); if (req[0]) { req[0].onreadystatechange = processReqChange_CarregaConcursoInformacoesGerais; req[0].open("GET", url, true); req[0].send(); } } } } function processReqChange_CarregaConcursoInformacoesGerais() { if (req[0].readyState == 4) { if (req[0].status == 200) { response = req[0].responseText; getHTMLConcursoInfoGerais(response); } else { switch(req[0].status) { case (404): { detalhes = "URL não encontrada (" + req[0].status + "-" + req[0].statusText + ")."; break; } } alert("Ocorreu um problema carregando as informações gerais. Contate o administrador do site.\nDetalhes: " + detalhes); } } } function getHTMLConcursoInfoGerais(response) { if(response.indexOf("No documents found")<0) { var html = ""; html += "
Informações Gerais
"; html += "
"; html += response; html += "

"; document.getElementById(div[0]).innerHTML += html; } } function CarregaConcursoResultados(url) { div[1] = "divResultados" if (window.XMLHttpRequest) { req[1] = new XMLHttpRequest(); req[1].overrideMimeType('text/xml'); req[1].onreadystatechange = processReqChange_CarregaConcursoResultados; req[1].open("GET", url , true); req[1].send(null); } else { if (window.ActiveXObject) { req[1] = new ActiveXObject("Microsoft.XMLHTTP"); if (req[1]) { req[1].onreadystatechange = processReqChange_CarregaConcursoResultados; req[1].open("GET", url, true); req[1].send(); } } } } function processReqChange_CarregaConcursoResultados() { if (req[1].readyState == 4) { if (req[1].status == 200) { response = req[1].responseXML.documentElement; getHTMLConcursoResultados(response); } else { switch(req[1].status) { case (404): { detalhes = "URL não encontrada (" + req[1].status + "-" + req[1].statusText + ")."; break; } } alert("Ocorreu um problema carregando as informações gerais. Contate o administrador do site.\nDetalhes: " + detalhes); } } } function getHTMLConcursoResultados(response) { var html = ""; html += ""; NodeList = response.getElementsByTagName("viewentry"); if(NodeList.length >0) { for(var i=0; i0) { for(var i=0; i0) { for(var i=0; i0) { for(var i=0; i0) { for(var i=0; i" + nomeLocalidade + ""; } html += ""; html += "  "; document.getElementById(div[6]).innerHTML += html; } } } function ConsultarRodizio(url) { div[7] = "divMensagemRodizio"; if (window.XMLHttpRequest) { req[7] = new XMLHttpRequest(); req[7].overrideMimeType('text/xml'); req[7].onreadystatechange = processReqChange_ConsultarRodizio; req[7].open("GET", url , true); req[7].send(null); } else { if (window.ActiveXObject) { req[7] = new ActiveXObject("Microsoft.XMLHTTP"); if (req[7]) { req[7].onreadystatechange = processReqChange_ConsultarRodizio; req[7].open("GET", url, true); req[7].send(); } } } } function processReqChange_ConsultarRodizio() { if (req[7].readyState == 4) { if (req[7].status == 200) { response = req[7].responseXML.documentElement; populateConsultarRodizio(response); } else { switch(req[7].status) { case (404): { detalhes = "URL não encontrada (" + req[7].status + "-" + req[7].statusText + ")."; break; } } alert("Ocorreu um problema consultando o rodízio para esta matrícula. Contate o administrador do site.\nDetalhes: " + detalhes); } }else { document.getElementById(div[7]).innerHTML = "

"; } } function populateConsultarRodizio(responseXML) { try { var html = ""; var linha1 = ""; var linha2 = ""; var linha3 = ""; NodeList = responseXML.getElementsByTagName("mensagem"); for(var i=0; i" + "
  • " + linha2 + "

  • " + "
  • " + linha3 + "

  • " ; } document.getElementById(div[7]).innerHTML = html; }catch(Exception){} } function goConsultaRodizio(obj) { if(obj) { if(obj.value != "" || obj.length == 0) AbreRodizio('/sanepar/calandrakbx/calandra.nsf/weHP/PGTInternetSanepar-Gen_PopUpRodizio' + '?OpenDocument&AV=' + obj.value); else alert("Alerta: Você deve especificar uma matrícula. Obs. Não sabe sua matrícula? Clique no botão ajuda ao lado."); } } function AbreRodizio(link) { dimensoes = "width=500,height=150"; window.open(link,"Rodizio",dimensoes+",top=20,left=20,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,status=yes,toolbar=no,titlebar=no,hotkeys=no"); } function capturaTeclaRodizio(e) { if (e.keyCode == '13') { VerificaMatricula('txtRodizio'); document.getElementById('btRodizio').click(); } }
    "; html += "
    Resultados
    Formatos