<script type="text/javascript">
        function validate_choice(){ldelim}
                var inpNodes = document.getElementsByTagName('input');
		var montext ="";
                for(var i in inpNodes){ldelim}
                        var inp = inpNodes[i];
                        if ( inp.type == 'checkbox'){ldelim}
                                if(inp.checked == true){ldelim}
                                        if(inp.id != "allcheck"){ldelim}
                                                var cellname = ""+inp.name;
                                                cellname = cellname.replace(/CK/,"");
						montext += cellname+";";
                                        {rdelim}
                                {rdelim}
                        {rdelim}
                {rdelim}
		var object = window.opener.document.getElementById("{$name}");
		object.removeChild(object.childNodes[0]);
		var t = document.createTextNode(montext);
		object.appendChild(t);
		var table = window.opener.document.getElementById('table').value;
		var id = ""+object.parentNode.id;
		var colonne = (""+object.id).replace(id,"");;
		var val = montext;
		update_database(table,id,colonne,val);



                window.close();
        {rdelim}

        function check_selected(){ldelim}
                var chaine = window.opener.document.getElementByName("{$name}").value;
                var inpNodes = chaine.split(";");
                var part_num=0;
                while (part_num < inpNodes.length-1){ldelim}
                        var cellid = "CK"+inpNodes[part_num];
                        document.getElementById(""+cellid).checked = true;
                        part_num+=1;
                        display_checkbox_picture(""+cellid);
                {rdelim}
        {rdelim}
</script>
<div id="recherche" onload="javascript:check_selected();">
<input type="button" name="bout" value="Selectionner" onclick="javascript:validate_choice();" />
</div>