//----------------------------------------------------------------------------//
function copyToList(from,to)
{
        fromList = document.getElementById(from);
        toList = document.getElementById(to);
        if (toList.options.length > 0 && toList.options[0].value == 'temp') {
                toList.options.length = 0;
        }
        var sel = false;
        for (i=0;i<fromList.options.length;i++) {
                var current = fromList.options[i];
                if (current.selected) {
                        sel = true;
                        txt = current.text;
                        val = current.value;
                        if (val != "") {
                                 toList.options[toList.length] = new Option(txt,val);
                                fromList.options[i] = null;
                                i--;
                        }
                }
        }
        if (!sel) alert ('You haven\'t selected any options!');
}
//----------------------------------------------------------------------------//
function allSelect(listname) {
        List = document.getElementById(listname);
        for (i=0;i<List.length;i++) {
                var current = List.options[i];
                txt = current.text;
                if (((List.length > 1) && (txt.substring(0,4) == "zzz_")) || (txt == "")) {
                        List.options[i].selected = false;
                } else {
                        List.options[i].selected = true;
                }
        }
}
//----------------------------------------------------------------------------//
