/**
  * Inserts multiple fields.
  *
  */
function insertValueQuery() {
  /* nom de l'input field dans partform ou y'a le textbox */
    var myQuery = document.partform.chansons;
  /* nom de la listbox (select) qu'on a choisi */
    var myListBox = document.partform.list;

    if(myListBox.options.length > 0) {
        var chaineAj = "";
        var NbSelect = 0;
        for(var i=0; i<myListBox.options.length; i++) {
            if (myListBox.options[i].selected){
                NbSelect++;
                if (NbSelect > 1)
                    chaineAj += "\n";
                chaineAj += myListBox.options[i].value;
            }
        }
	chaineAj += "\n";

        //IE support
        if (document.selection) {
            myQuery.focus();
            sel = document.selection.createRange();
            sel.text = chaineAj;
            document.partform.insert.focus();
        }
        //MOZILLA/NETSCAPE support
        else if (document.partform.chansons.selectionStart ||
        document.partform.chansons.selectionStart == "0") {
            var startPos = document.partform.chansons.selectionStart;
            var endPos = document.partform.chansons.selectionEnd;
            var chaineSql = document.partform.chansons.value;

            myQuery.value = chaineSql.substring(0, startPos) +
            chaineAj + chaineSql.substring(endPos, chaineSql.length);
        } else {
            myQuery.value += chaineAj;
        }
    }
}



function checkBox() {
    if (document.getElementById("traductions").checked == true) {
        document.getElementById("langs").style.display = "";
    } else {
        document.getElementById("langs").style.display = "none";
    }
}

