Можно ли как то упростить такие куски кода?
...
else if (document.getElementById('radio-6').checked) {
ramka5img[0].style.display = "-webkit-inline-box";
ramka5img[1].style.display = "-webkit-inline-box";
ramka5img[2].style.display = "-webkit-inline-box";
ramka5img[3].style.display = "-webkit-inline-box";
ramka5img[4].style.display = "none";
ramka5.classList.remove('activeramk2');
ramka5.classList.remove('activeramk3');
ramka5.classList.add('activeramk4');
ramka5.classList.remove('activeramk5');
ramka5.classList.remove('activeramk6');
ramka5.classList.remove('activeramk7');
ramka5.classList.remove('activeramk8');
ramka5.classList.remove('activeramk9');
document.example_img.classList.add('activeramk4');
document.example_img.classList.remove('activeramk2');
document.example_img.classList.remove('activeramk3');
document.example_img.classList.remove('activeramk5');
document.example_img.classList.remove('activeramk6');
document.example_img.classList.remove('activeramk7');
document.example_img.classList.remove('activeramk8');
document.example_img.classList.remove('activeramk9');
$('input[name="tab-btn"][value="1"]').prop('disabled', false);
$('input[name="tab-btn"][value="2"]').prop('disabled', false);
$('input[name="tab-btn"][value="3"]').prop('disabled', false);
$('input[name="tab-btn"][value="4"]').prop('disabled', false);
$('input[name="tab-btn"][value="5"]').prop('disabled', true);
$('#mCSB_4_container1 a').on('click', l_image3);
$('#mCSB_2_container2 a').on('click', l_image22225);
$('#mCSB_2_container3 a').on('click', l_image22226);
$('#mCSB_2_container4 a').on('click', l_image22227);
$('#mCSB_2_container5 a').on('click', l_image22228);
$('#mCSB_2_container6 a').on('click', l_image22229);
}
else if (document.getElementById('radio-7').checked) {
ramka5img[0].style.display = "-webkit-inline-box";
ramka5img[1].style.display = "-webkit-inline-box";
ramka5img[2].style.display = "-webkit-inline-box";
ramka5img[3].style.display = "-webkit-inline-box";
ramka5img[4].style.display = "-webkit-inline-box";
ramka5.classList.remove('activeramk2');
ramka5.classList.remove('activeramk3');
ramka5.classList.remove('activeramk4');
ramka5.classList.add('activeramk5');
ramka5.classList.remove('activeramk6');
ramka5.classList.remove('activeramk7');
ramka5.classList.remove('activeramk8');
ramka5.classList.remove('activeramk9');
document.example_img.classList.add('activeramk5');
document.example_img.classList.remove('activeramk2');
document.example_img.classList.remove('activeramk3');
document.example_img.classList.remove('activeramk4');
document.example_img.classList.remove('activeramk6');
document.example_img.classList.remove('activeramk7');
document.example_img.classList.remove('activeramk8');
document.example_img.classList.remove('activeramk9');
$('input[name="tab-btn"][value="1"]').prop('disabled', false);
$('input[name="tab-btn"][value="2"]').prop('disabled', false);
$('input[name="tab-btn"][value="3"]').prop('disabled', false);
$('input[name="tab-btn"][value="4"]').prop('disabled', false);
$('input[name="tab-btn"][value="5"]').prop('disabled', false);
$('#mCSB_4_container1 a').on('click', l_image3);
$('#mCSB_2_container2 a').on('click', l_image22225);
$('#mCSB_2_container3 a').on('click', l_image22226);
$('#mCSB_2_container4 a').on('click', l_image22227);
$('#mCSB_2_container5 a').on('click', l_image22228);
$('#mCSB_2_container6 a').on('click', l_image22229);
}