function pokazModele(m, marka, nowy)
{
    // usuwa modele
    for (i = m.length - 1; i > 0; i--) {
        m.options[i] = null;
    }

    // Ustawia modele
    var modele = nowy ? modeleNowe : modeleUzywane;

    // dodaje modele
    if (modele[marka]) {
        for (i = 0; i < modele[marka].length; i++) {
            m.options[i + 1] = new Option(modele[marka][i]["nazwa"], modele[marka][i]["id"]);
        }
    }
}

function menu(element)
{
    // odznacza aktywne pozycje menu
    var lis = dojo.byId("index-menu").getElementsByTagName("li");
    for (i = 0; i < lis.length; i++) {
        // nie dla podwójnych
        if (lis[i].className != "lines") {
            lis[i].className = "";
        }
    }
    dojo.byId("index-wybrane").style.display = "none";
    dojo.byId("index-marka").style.display = "none";
    dojo.byId("index-typ").style.display = "none";
    dojo.byId("index-cena").style.display = "none";
    dojo.byId("index-kalkulator").style.display = "none";

    // aktywuje element
    element.className = "aktywna";
    var e = dojo.byId(element.id.replace("-menu", ""));
    if (e) e.style.display = "block";
}
