Código HTML:
<input type='checkbox' name='check<%=cont2%>' value='<%=ClaveFolders[cont2]%>' onclick="ins_del_lista('<%=ClaveFolders[cont2]%>',this);">
function ins_del_lista(qvalor,qitem){
t = document.all.seldel.length;
//alert('t ' + t);
if (qitem.checked == true){
document.all.seldel[t]= new Option(qvalor,qvalor);
document.all.seldel.options[t].selected = true;
}else{
for(i=0;i<t;i++){
if (document.all.seldel[i].value == qvalor){
document.all.seldel.remove(i);
return;
}
}
}
}