function exibir_loteamento()
{
  document.mostrar.action = "mostra_favorito_loteamento.php";
  document.mostrar.submit();
}

function exibir_lancaverti()
{
  document.mostrar.action = "mostra_favorito_lancaverti.php";
  document.mostrar.submit();
}

function exibir_lancahori()
{
  document.mostrar.action = "mostra_favorito_lancahori.php";
  document.mostrar.submit();
}

function exibir_favorito_venda()
{
  document.mostrar.action = "mostra_favorito_venda.php";
  document.mostrar.submit();
}

function exibir_favorito_locacao()
{
  document.mostrar.action = "mostra_favorito_locacao.php";
  document.mostrar.submit();
}

function exibir_favorito_rurais()
{
  document.mostrar.action = "mostra_favorito_rurais.php";
  document.mostrar.submit();
}

function seleciona_imovel(obj, cod)
{
  var Selecao = document.mostrar.selecionados.value;
  var Base = "##" + Selecao + "##";
  var iPos;
  var s;
  if (obj.checked)
  {
  	if (Selecao != "")	
	{ 
	  Selecao = Selecao + "##"; 
	}
   	iPos = Base.indexOf("##" + cod + "##");	
   	document.mostrar.selecionados.value = Selecao + cod;  
  }
  else
  {
    iPos = Base.indexOf("##" + cod + "##");
    if (iPos >= 0)
    {
      s = Base.substr(0, iPos) + Base.substr(iPos + cod.length + 2);
      document.mostrar.selecionados.value = s.substr(2, s.length - 4);
    }
  }
}

function trocacor(obj,hover)
{
  var color1 = '#A6DBFF';
  var color2 = '#E9E8E8';
  var el = document.getElementById(obj);
  if(document.getElementById)
  {
    if (hover == true)
      el.style.backgroundColor = color1;
    else
      el.style.backgroundColor = color2;
  }
}

function abrirp()
{
  window.open("sistemagestor/gac/index.php","_blank","Gestor Geral","location=no,status=no,toolbar=no,menubar=no,fullscreen=yes,resizable=yes")
}
function abriraj()
{
  alert('Sistema não disponivel!');
  return;
   
//  window.open("gac.php","_blank","Gestor Geral","location=no,status=no,toolbar=no,menubar=no,fullscreen=yes,resizable=yes")
}