function abre_banner(largura, altura, segundos, imagem) {
  var objeto = document.getElementById('banner');

  objeto.style.position = 'absolute';
  objeto.style.width = largura+"px";
  objeto.style.height = altura+"px";
  //objeto.style.left = '50%';
  //objeto.style.top = '50%';
  //objeto.style.marginLeft = -(largura/2)+"px";
  //objeto.style.marginTop = -(altura/2)+"px";
  objeto.style.display = '';
  tagimagem = "<a href='http://www.plennaengenharia.com.br/news' target='_blank'><img src='"+imagem+"' width='"+largura+"' height='"+altura+"' alt='Clique Para Fechar' onclick=\"this.style.visibility='hidden';\" /></a>";
  objeto.innerHTML = tagimagem;
  if(segundos != 0) { fecha_banner_timeout(segundos); }
}

function fecha_banner() {
  var objeto = document.getElementById('banner');
  objeto.style.display = 'none';
}

function fecha_banner_timeout(segundos) {
  var tempo = segundos * 1000;
  setTimeout('fecha_banner()', tempo);
}
