    //variavel que define aonde vai ser exibida a janela modal
    var leftPopUp = false;
    var leftTopo = false;
    var topModal = '0';
    if(isIE)    {
      topModal = '25';
    }
    else    {
      topModal = '20';
    }

    http.onreadystatechange = function ()
    {
      if (http.readyState == 2)
      {
        if(mostraPoema)
        {
          hideLoading();
          showPoema();
        }
        else
        {
          showLoading();
        }
      }

      if (http.readyState == 4)
      {
         if (http.status == 200)
         {
           if(mostraPoema)
           {
             hideBotaoLoading();
           }

           else
           {
             hideLoading();
             mostraSite();
           }
           floreia();
         }
      }
    }

// When the page loads:
    window.onload = function()
    {
       if (document.getElementsByTagName) {
          // Get all the tags of type object in the page.
          var objs = document.getElementsByTagName('object');
          for (i=0; i<objs.length; i++) {
             // Get the HTML content of each object tag
             // and replace it with itself.
             objs[i].outerHTML = objs[i].outerHTML;
          }
       }

       http.open("GET",document.URL,true);
       http.send(null);
    }

// When the page unloads:
    window.onunload = function()
    {
       if (document.getElementsByTagName) {
          //Get all the tags of type object in the page.
          var objs = document.getElementsByTagName('object');
          for (i=0; i<objs.length; i++) {
             // Clear out the HTML content of each object tag
             // to prevent an IE memory leak issue.
             objs[i].outerHTML = '';
          }
       }
    }

    window.onresize = function()
    {
    }
    
    window.onscroll = function()
    {
    }

    function mostraSite()
    {
      var site = document.getElementById('divExterna');
      if (site)
      {
        site.style.display = '';
      }
    }

    function CarregaImagem(img)
    {
      if(img)
      {
        var strAux = img.src.split('/');
        strAux = strAux[strAux.length-1];
        strAux = strAux.split('.');
        strAux = strAux[0];
      
        img.style.display = '';
      }
      
      hideLoadingImage();
      showDivContentImage();

      if(strAux != 'blank')
      {
        window.refToModMessage.__resizeDivs();
        window.refToModMessage.__repositionTransparentDiv();
      }
      
      //divContentImage.style.display = '';
      if(!isIE)
      {
        var content1 = document.getElementById('divContentImage');
        window.refToModMessage.setSize(img.scrollWidth+20,content1.scrollHeight + img.scrollHeight/5);
      }
    }
    
    function hideLoadingImage()
    {
      var aux = document.getElementById('divLoadingImagem');
      if(aux)
      {
        aux.style.display = 'none';
      }
    }

    function showLoadingImage()
    {
      var aux = document.getElementById('divLoadingImagem');
      if(aux)
      {
        aux.style.display = '';
      }
    }
    
    function showPoema()
    {
      var aux = document.getElementById('divPoema');
      if(aux)
      {
        aux.style.display = '';
      }
    }
    
    function hidePoema()
    {
      var aux = document.getElementById('divPoema');
      if(aux)
      {
        aux.style.display = 'none';
      }
    }
    
    function hideBotaoLoading()
    {
      var aux = document.getElementById('botaoEntrar');
      if(aux)
      {
        aux.innerHTML = "<span class='carregando' onclick='hidePoema();mostraSite();' style='cursor:pointer;cursor:hand;'>Entrar</span>";
      }
    }
    
    function showDivContentImage()
    {
      var aux = document.getElementById('divContentImage');
      if(aux)
      {
        aux.style.display = '';
      }
    }
    
    function hideDivContentImage()
    {
      var aux = document.getElementById('divContentImage');
      if(aux)
      {
        aux.style.display = 'none';
      }
    }
    
    function hideRodape()
    {
      var aux = document.getElementById('tabelaRodape');
      alert(aux);
      if(aux)
      {
        aux.style.display = '';
      }
    }
    
    function floreia()
    {
      var divMenu = document.getElementById('divMenu');
      
      if(divMenu)
      {
        divMenu.style.display = '';
      }
    }
    
    function MenuImageOver(name)
    {
      var img = document.getElementById('menu-' + name);
      var imgOver = document.getElementById('menu-' + name + '-over');

      if(name != module)
      {
        if(img)
        {
          if(img.style.display == '')
          {
            img.style.display = 'none';
            imgOver.style.display = '';
          }
          else
          {
            img.style.display = '';
            imgOver.style.display = 'none';
          }
        }
      }
    }

    function TrocaImagemMenu(name)
    {
      var img = document.getElementById('menu-' + name);
      var varAux;

      if(name != module)
      {
        if(img)
        {
          var vetorAux = img.src.split('/');
          varAux = vetorAux[vetorAux.length-1];
          if (varAux == name + '.png')
          {
            img.src = 'theme/' + theme + '/images/' + name + '-over.png';
          }
          else
          {
     		img.src = 'theme/' + theme + '/images/' + name + '.png';
          }
        }
      }
    }
    
    function TrocaImagemSubMenu(id,cod,imagem,imagemOver)
    {
      var img = document.getElementById(id);
      var varAux;

      if(img)
      {
        var vetorAux = img.src.split('/');
        varAux = vetorAux[vetorAux.length-1];
        if (varAux == imagem)
        {
          img.src = 'square/modules/modulos_apresentacao/images/' + cod + '/' + imagemOver;
        }
        else
        {
         img.src = 'square/modules/modulos_apresentacao/images/' + cod + '/' + imagem;
        }
      }
    }

    var indiceRolagem=50;

    var scrollAnterior=0;
    function MoveDown(divID){
    		var elemento = document.getElementById(divID);

            //if(mouseClicked)
            {
              scrollAnterior = elemento.scrollTop;
              elemento.scrollTop = elemento.scrollTop + indiceRolagem;
              //setTimeout("MoveDown('" + divID + "')",0);
            }
    }

    var scrollAnterior=0;

    function MoveUp(divID){
            var elemento = document.getElementById(divID);

            //if(mouseClicked)
            {
              scrollAnterior = elemento.scrollTop;
              elemento.scrollTop = elemento.scrollTop - indiceRolagem;
              //setTimeout("MoveUp('" + divID + "')",0);
            }
    }

    function MostraAno(ano){
            var elemento = document.getElementById('news' + ano);

            if(elemento.style.display == 'none'){
              elemento.style.display = '';}
            else{
		      elemento.style.display = 'none';}
    }
