<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Maiores Altas e Baixas da Bovespa"
author="DragonSoft Tecnologia"
author_email="infobovespa@dragonsoft.com.br"
author_link="http://www.dragonsoft.com.br"
author_affiliation="DragonSoft"
description="Listagem das maiores altas e baixas em oscilacoes em tempo real do pregao da Bovespa."
thumbnail="http://www.dragonsoft.com.br/gadgets/tb_bovespa.png"
screenshot="http://www.dragonsoft.com.br/gadgets/sc_bovespa.png"
render_inline="optional"
height="300" width="305" />
<UserPref name="intTaxaRefresh" display_name="Minutos Refresh" default_value="5" required="true"/>


<Content type="html">
<![CDATA[
<script type="text/javascript"> 
function CarregarDados(){
_IG_FetchContent("http://www.bmfbovespa.com.br/Pregao-Online/FormConsultaMaioresOscilacoes.asp?idLapela=divLapelaMaioresOcilacoes&idPainel=divMaiorOcilacao", function (response) { 
if (response == null) { _gel("carregando").innerHTML = "<br><font color=red>:. Falha Conex&atilde;o com a Bovespa!"; setTimeout('Recarregar()',5000); return; } 
conteudo = response.substring(response.indexOf("name=" + String.fromCharCode(34) + "#MIB" + String.fromCharCode(34) + ">A"));

linhas = conteudo.substring(conteudo.indexOf("MAIORES ALTAS"),conteudo.indexOf("</tbody>",conteudo.indexOf("MAIORES ALTAS"))).split("<tr");

if (linhas.length < 3) { _gel("carregando").innerHTML = "<br><font color=red>:. Falha Conex&atilde;o com a Bovespa!"; setTimeout('Recarregar()',5000); return; } ;
tbMaiores = "<table width=100% cellpadding=1 cellspacing=1 border=0><tr bgcolor=#0000FF><td colspan=5 align=left style=font-size:12px;color:#FFFFFF><b>&nbsp;&nbsp;Maiores Altas</td></tr><tr bgcolor=#4444FF style=color:#FFFFFF><td style=font-size:10px;><B>&nbsp;A&ccedil;&atilde;o</td><td align=center style=font-size:10px;><B>Hora</td><td align=right style=font-size:10px;><B>Pre&ccedil;o R$</td><td align=center style=font-size:10px;><B>Osc (%)</td></tr>"
for(x=1;x<7;x++){
   if (linhas[x] != null){
   tbMaiores += "<tr bgcolor=#CCCCFF >"
   colunas = linhas[x].split("<td ")
   for(y=1;y<6;y++){
    if (colunas.length == 6){
        if (y==1 || y==4 || y==5){
            tbMaiores += "<td style=font-size:11px;"
            if (y==4) { tbMaiores += " align=right" };
            if (y==5) { tbMaiores += " align=center" };
            tbMaiores += ">";
            } else { 
            if ( y==3 ){ tbMaiores += "<td style=font-size:9px; align=center>" } }


        dados = colunas[y].substr(colunas[y].indexOf(">")+1).replace("</td>","").replace("</tr>","");
        dados = dados.substr(dados.indexOf(">")+1).replace("</font>","");
        if (y==4) { dados = dados.replace("<img src=" + String.fromCharCode(34) + "./images/","").replace("cinzag","").replace("brancog","").replace(".jpg" + String.fromCharCode(34) + ">","") }
        if (y==1){
            tbMaiores += dados + " - <span style=font-size:10px;><i>&nbsp;"
        } else {
            tbMaiores += dados + "</td>"
        }
      
     }
    }
    tbMaiores += "</tr>"
    }
}
tbMaiores += "</table>"

linhas = conteudo.substring(conteudo.indexOf("Maiores Baixas"),conteudo.indexOf("</tbody>",conteudo.indexOf("Maiores Baixas"))).split("<tr");
tbMenores = "<table width=100% cellpadding=1 cellspacing=1 border=0><tr style=height:10px><td colspan=6></td></tr><tr bgcolor=#FF0000><td colspan=5 align=left style=font-size:12px;color:#FFFFFF><b>&nbsp;&nbsp;Maiores Baixas</td></tr><tr bgcolor=#FF4444 style=color:#FFFFFF><td style=font-size:10px;><B>&nbsp;A&ccedil;&atilde;o</td><td align=center style=font-size:10px;><B>Hora</td><td align=right style=font-size:10px;><B>Pre&ccedil;o R$</td><td align=center style=font-size:10px;><B>Osc (%)</td></tr>"
for(x=1;x<7;x++){
   if (linhas[x] != null){
   tbMenores += "<tr bgcolor=#FFCCCC >"
   colunas = linhas[x].split("<td ")
    for(y=1;y<6;y++){
    if (colunas.length == 6){
        if (y==1 || y==4 || y==5){
            tbMenores += "<td style=font-size:11px;"
            if (y==4) { tbMenores += " align=right" };
            if (y==5) { tbMenores += " align=center" };
            tbMenores += ">";
            } else { 
            if ( y==3 ){ tbMenores += "<td style=font-size:9px; align=center>" } }


        dados = colunas[y].substr(colunas[y].indexOf(">")+1).replace("</td>","").replace("</tr>","");
        dados = dados.substr(dados.indexOf(">")+1).replace("</font>","");
        if (y==4) { dados = dados.replace("<img src=" + String.fromCharCode(34) + "./images/","").replace("cinzag","").replace("brancog","").replace(".jpg" + String.fromCharCode(34) + ">","") }
        if (y==1){
            tbMenores += dados + " - <span style=font-size:10px;><i>&nbsp;"
        } else {
            tbMenores += dados + "</td>"
        }
      
     }
    }
    tbMenores += "</tr>"
    }
}
tbMenores += "</table>"


_gel("resultados").innerHTML = tbMaiores + tbMenores + "<span style=font-size:9px>&nbsp;Informa&ccedil;&otilde;es com delay de 15 minutos direto da <a href=http://www.bovespa.com.br/Cotacoes2000/MaioresOscilacoes.asp target=_NEW><B><Font Color=Blue>Bovespa</Font></B></a>.</span>";


_gel("carregando").style.display = "none";
_gel("resultados").style.display = "block";
var prefs = new _IG_Prefs();
setTimeout("Recarregar()",prefs.getInt("intTaxaRefresh")*60*1000);
},{ refreshInterval: 60 * 2});
}
_IG_RegisterOnloadHandler(CarregarDados);
function Recarregar(){
_gel("carregando").innerHTML = "<br>.:. Carregando Informa&ccedil;&otilde;es .:.";
_gel("carregando").style.display = "block";
_gel("resultados").style.display = "none";
CarregarDados();
}
</script><center>
<div id=resultados style="display:none">
</div>
<div id=carregando align=center style="font-size:10pt;color:#000000;"><br>.:. Carregando Informa&ccedil;&otilde;es .:.</div>
<table width=95% height=26px>
<tr><td align=left style="font-size:7pt;color:#FFFF00;"></td>
<td align=right style="font-size:7pt;color:#FFFF00;"><a target=_NEW href=http://www.dragonsoft.com.br>www.dragonsoft.com.br</a></td></tr>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-2431999-3";urchinTracker();</script>


]]> 
</Content> 
</Module>













