java/HrisniciSpameri/web/funkce.js
changeset 43 22cc28d200f3
parent 20 90dc76051e56
     1.1 --- a/java/HrisniciSpameri/web/funkce.js	Sun Mar 01 17:45:45 2009 +0100
     1.2 +++ b/java/HrisniciSpameri/web/funkce.js	Sun Mar 01 18:29:44 2009 +0100
     1.3 @@ -11,3 +11,20 @@
     1.4          prvek.style.display = "none";
     1.5      }
     1.6  }
     1.7 +
     1.8 +function rozbalNeboZabal(idElementu, vyska, idTlacitka, textZabalit, textRozbalit)
     1.9 +{
    1.10 +    prvek = document.getElementById(idElementu);
    1.11 +    tlacitko = document.getElementById(idTlacitka);
    1.12 +
    1.13 +    if (prvek.style.maxHeight == "" || prvek.style.maxHeight == vyska)
    1.14 +    {
    1.15 +        prvek.style.maxHeight = "1000000px";
    1.16 +        tlacitko.innerHTML = textZabalit;
    1.17 +    }
    1.18 +    else
    1.19 +    {
    1.20 +        prvek.style.maxHeight = vyska;
    1.21 +        tlacitko.innerHTML = textRozbalit;
    1.22 +    }
    1.23 +}