
var alturaMenu = 0;

function calcularAlturaSite()
{
   if (gebi('conteudo') != null)
   {
      try
      {
         altura = gebi('conteudo').clientHeight;
         if (alturaMenu > altura)  altura = alturaMenu+32;
         try {
            if (gebi('destaques').clientHeight - 150 > altura) altura = gebi('destaques').clientHeight - 150;
         } catch (e) {}

         try {
            gebi('conteudo').style.height = altura+"px";
         } catch(e){}
         try
         {
            gebi("wrapper").style.overflow = 'hidden';
            gebi('wrapper').style.height = (altura+620)+"px";
         } catch(e){}
      } catch(e){}
   }
}

function trocarDescritores(a,b)
{
   aux = document.getElementById('listaDescritores_verNoResumo_id'+vc[a]).checked;
   document.getElementById('listaDescritores_verNoResumo_id'+vc[a]).checked = document.getElementById('listaDescritores_verNoResumo_id'+vc[b]).checked;
   document.getElementById('listaDescritores_verNoResumo_id'+vc[b]).checked = aux;

   aux = document.getElementById('listaDescritores_nomeDescritor_id'+vc[a]).value;
   document.getElementById('listaDescritores_nomeDescritor_id'+vc[a]).value = document.getElementById('listaDescritores_nomeDescritor_id'+vc[b]).value;
   document.getElementById('listaDescritores_nomeDescritor_id'+vc[b]).value = aux;

   aux = document.getElementById('listaDescritores_valorDescritor_id'+vc[a]).value;
   document.getElementById('listaDescritores_valorDescritor_id'+vc[a]).value = document.getElementById('listaDescritores_valorDescritor_id'+vc[b]).value;
   document.getElementById('listaDescritores_valorDescritor_id'+vc[b]).value = aux;

   aux = document.getElementById('listaDescritores_tag_id'+vc[a]).checked;
   document.getElementById('listaDescritores_tag_id'+vc[a]).checked = document.getElementById('listaDescritores_tag_id'+vc[b]).checked;
   document.getElementById('listaDescritores_tag_id'+vc[b]).checked = aux;

   document.getElementById('listaDescritores_modifLinhaId'+vc[a]).value = '1';
   document.getElementById('listaDescritores_modifLinhaId'+vc[b]).value = '1';
}

function redesenharElementos()
{
   for (i=0; i<ell_redraw.length; ++i)
   {
      if (navigator.appName != "Microsoft Internet Explorer")
         ell_redraw[i].innerHTML = ell_redraw[i].innerHTML;
   }
}
