var value = +frm.mini.value; frm.timer.min = 20 - 15 * value; frm.timer.max = 120 - 105 * value; frm.timer.value = frm.timer.min;