function DodajKategorie()
{
    var list1 = document.getElementById("Kategorie");
    var list2 = document.getElementById("AktKategorie");
    var addValue = list1.options[list1.selectedIndex].value;
    var addValueTxt = list1.options[list1.selectedIndex].text;
	
    if(addValue == 0)
	return;        

        for(i=0;i<list2.options.length;++i)
        {
                if(list2.options[i].value == addValue)
                    return;
        }
        
    var option = document.createElement("option");
    option.setAttribute("value",addValue);
    option.appendChild(document.createTextNode(addValueTxt));
    list2.appendChild(option);
}
function UsunKategorie()
{
    var list1 = document.getElementById("AktKategorie");
    list1.remove(list1.selectedIndex);
}

function SubmitForm()
{
    var list1 = document.getElementById("AktKategorie");
    var out = document.getElementById("kat");
    out.value="";
    for(i=0;i<list1.options.length;++i)
    {
        out.value += list1.options[i].value+";"; 
    }
}

