  /* (c) 2006 by Michal GiM Spoadlinski
   * http://gim.org.pl/
   */
  var x,acc,wanted;
  var gdst,gsrc;
  x=acc=wanted=0;
  function spoiler(i)
  {
    if (x<wanted) return; /* firefox work-around if there are more 'spoilers'*/
    gdst = i.parentNode;
    gsrc = document.getElementById(gdst.id+'2');
    gdst.style.visibility="hidden";
    gdst.innerHTML=gsrc.innerHTML;
    wanted = gdst.clientHeight;
    x=acc=1;
    gdst.style.height='1px';
    gdst.style.visibility="visible";
    gdst.style.overflow='hidden';
    setTimeout("niceshow()",0);
  }
  function niceshow()
  {
    if (x>wanted)
      return;
    gdst.style.height=x + 'px';
    setTimeout("niceshow()",0);
    x+=acc;
    if (x>wanted/2) acc=Math.log(wanted+acc-x);
    else acc=Math.log(x);
    acc=Math.floor(2*acc);
    if (acc<1) acc=1;
  }

