function fun(ob,o,name)
{
    tab = document.getElementsByName(name);
    tab[o].src='gfx/arrow_right_gray.png';
    //ob.style.color='#808080';
}

function ufun(ob,o,name)
{
    tab = document.getElementsByName(name);
    tab[o].src='gfx/arrow_right_light_gray.png';
    //ob.style.color='#6d6e71';
}

function backfun(o,name,name2)
{
    tab = document.getElementsByName(name);
    tab[o].src='gfx/arrow_left_blue.png';
    tab = document.getElementsByName(name2);
    //tab[o].style.color='#6d6e71';
}

function ubackfun(o,name,name2)
{
    tab = document.getElementsByName(name);
    tab[o].src='gfx/arrow_left_gray.png';
    tab = document.getElementsByName(name2);
    //tab[o].style.color='#808080';
}

function arrow(i)
{
    tab = i.getElementsByTagName("td");
    img = document.createElement("img");
    img.src='gfx/arrow_right_light_gray.png';
    img.alt='strzalka';
    tab[0].innerHTML='';
    tab[0].appendChild(img);
}

function remarrow(i)
{
    tab = i.getElementsByTagName("td");
    tab[0].innerHTML='';
}

function _help(i)
{
    var txt='';
    if(i==0)
        txt='Proszę podać miejscowość gdzie znajduje się azbest lub wyroby azbestowe.';
    else if(i==1)
        txt='Proszę określić rodzaj wyrobu azbestowego np. faliste płyty dachowe, płyty KARO, elewacja budynku, materiał izolacyjny, inne.';
    else if(i==2)
        txt='Proszę podać ogólną ilość wyrobów azbestowych w m2. W przypadku materiałów innych niż pokrycia dachowe i elewacje, proszę określić ilość wyrobów w innych jednostkach.';
    else
        txt='B\u0142ąd';
    div = document.getElementById("d"+i);
    div.style.display='block';
    div.innerHTML=txt;
}

function _uhelp(o)
{
    document.getElementById("d"+o).style.display='none';
}

function dodaj()
{
    ile = document.getElementById("pliki").getElementsByTagName("input").length;
    if (ile<5)
        {
        if ((navigator.userAgent.indexOf("MSIE"))!=-1)
            {
            var inputie = document.createElement("input");
            inputie.type="file";
            inputie.size='45';
            inputie.name="pliki[]";
            document.getElementById("pliki").appendChild(inputie);
            }
        else
            {
            var td = document.createElement("td");
            var tr = document.createElement("tr");
            var input = document.createElement("input");
            input.type="file";
            input.size='45';
            input.name="pliki[]";
            td.appendChild(input);
            tr.appendChild(td);
            document.getElementById("tabela_pliki").appendChild(tr);
            }
        }
    else
        alert('Dodano już 5 plików');
}

