//<!--Dynamic options switches
function Elements () {
    this.opts = new Array("p", "preformatted", "heading", "list", "dlist");
	this.p = new Array(
        new Option("normal", "normal"),
        new Option("lead", "lead"), 
        null,
        null,
        null,
        null,
        null,
        null,
        null);
    this.preformatted = new Array(
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null);
    this.heading = new Array(
        new Option("Normal heading", "normal"),
        new Option("Sub heading", "sub"),
        new Option("Sub sub heading", "subsub"),
        new Option("Paragraph heading", "paragraph"),
        new Option("Sub paragraph heading", "subparagraph"),
        null,
        null,
        null,
        null,
        null,
        null);
    this.dlist = new Array(
        new Option("normal", "normal"),
        new Option("compact", "compact"),
        null,
        null,
        null,
        null,
        null,
        null,
        null);
    this.list = new Array(
        new Option("disc bullets", "disc"),
        new Option("square bullets", "square"),
        new Option("circle bullets", "circle"),
        new Option("1, 2, 3,..", "1"),
        new Option("I, II, III,..", "I"),
        new Option("i, ii, iii,..", "i"),
        new Option("A, B, C,..", "A"),
        new Option("a, b, c,..", "a"),
        new Option("no bullets", "none"));
    this.nlist = this.list;
}

e = new Elements();
function updateSelectionOptions () {
    sel_whatform = document.forms.focusbox.what;
    sel_listtypeform = document.forms.focusbox.element_type;
    sel_item = sel_whatform.options[sel_whatform.selectedIndex].value;

    /*clear current list..*/    
    l = sel_listtypeform.options.length;
    for (i=0; i<l; i++) {
        sel_listtypeform.options[0] = null;
        sel_listtypeform.remove(0);
    }
    /*write new list*/
    l = e[sel_item].length
    for (i=0; i<l; i++) {
        sel_listtypeform.options[i] = e[sel_item][i];
    }

    sel_listtypeform.options[0].selected = true;
}
//-->
