a=document.getElementById("a");
b=document.getElementById("b");
c=document.getElementById("c");
d=document.getElementById("d");
b.onclick=function(){
a.appendChild(d.selectedOptions[0])
d.removeChild(d.selectedOptions[0])
}
c.onclick=function(){
d.appendChild(a.selectedOptions[0])
a.removeChild(d.selectedOptions[0])
}
a=document.getElementById("a");
b=document.getElementById("b");
c=document.getElementById("c");
a.onclick=function(){
if(a.checked){
c.removeAttribute("disabled");
}else{
c.setAttribute("disabled","disabled");
}
}