<input type="button" value="Расчитать" onclick="calculate()">
<script>
function calculate() {
var a = ['st11','st12','com11','com12','ob11','ob12'];
var b = ['st21','st22','com21','com22','ob21','ob22'];
var c = ['st31','st32','com31','com32','ob31','ob32'];
var d;
var n = parseInt(nedel.value);
switch (n) {
case 1: {d = a; break}
case 2: {d = b; break}
case 3: {d = c}
}
n = parseInt(pojyvanie.value);
switch (n) {
case 2: {d = d.slice(2); break}
case 3: {d = d.slice(4)}
}
n = parseInt(razmeschenie.value);
switch (n) {
case 1: {d = d[0]; break}
case 2: {d = d[1]}
}
alert(document.getElementById(d).value)
}
</script>
Возможно есть более простые решения.