// JavaScript Document
function ZmienObrazek(id,plik,typ)
{
if(typ=='on')
{
var dot=plik.indexOf('_');
document.getElementById(id).src=plik.substring(0,dot)+'.jpg';
document.getElementById(id+'h').className='lewe_menu';
}
else
{
document.getElementById(id).src=plik;
document.getElementById(id+'h').className='lewe_menu1';
}
}

function wysz(prefix) {
    var rodz = document.getElementById("ctl00_lstRodzaje");

    rodz.onclick = function() {
       var pok = document.getElementById("ctl00_trpokoje");
            
       if (this.value == "2") {
           pok.style.visibility = "hidden";
           pok.style.display = "none";
       } else {
           pok.style.visibility = "visible";
           pok.style.display = "table-row";
       }
    };
}

function kalk() {
        if (document.getElementById("c_n")) {
            kalkinit();
        } else {
            if (document.getElementById("kwota")) {
                kalkinit2();
            }
        }
}

function pokaz(blok,td) {
       document.getElementById(blok).style.visibility="visible";
       document.getElementById(td).style.cursor="pointer";
//       odslon(blok,0);
}
function odslon(blok,bottom) {
       var max=200;

       if (bottom<max) {
           document.getElementById(blok).style.clip="rect(auto,500,"+bottom+",auto)";
           bottom++;
           setTimeout("odslon('"+blok+"',"+bottom+")",1);
       }
}
function ukryj(blok,td) {
       document.getElementById(blok).style.visibility="hidden";
}
function podmenu_over(id) {
       document.getElementById(id).style.color="#ffff00";
}
function podmenu_out(id) {
       document.getElementById(id).style.color="#ffffff";
}