var radios = document.forms['upload-resize'].querySelectorAll('[type=radio]');
var active, length = radios.length;
for (var i = 0; i < length; i++) {
if (radios[i].checked) {
active = radios[i];
}
}
document.cookies = 'filter=' + active.id;