function getByIdParent(id)
{
  var par = window.parent.document;
  return par.getElementById(id);
}

function showPopup(titulo, mensaje)
{
  var popup       = $('popup');
  var pop_titulo  = $('pop_titulo');
  var pop_mensaje = $('pop_mensaje');
  
  if (popup == null)
  {
    pop_titulo  = getByIdParent('pop_titulo');
    pop_mensaje = getByIdParent('pop_mensaje');
    popup       = getByIdParent('popup');
  }

  pop_titulo.innerHTML = titulo;
  pop_mensaje.innerHTML = mensaje;
  popup.style.display = 'block';
}

function hideBA()
{
  $("post-imagen").hide();
  $("post-video").hide();
  $("post-enlace").hide();
}

function cleanCaja(idCaja)
{
  if (idCaja != "txt-youtube-link")
    $("txt-youtube-link").setValue("");

  if (idCaja != "txt-otros-html")
    $("txt-otros-html").setValue("");
}