Judging by the jQuery version, you'll need to use .prop('checked') instead of .attr('checked'). And using Expression Manager and question codes is simpler than using INSERTANS.
So, for example if the array has a question code of "q1" and the sub-question codes (y-axis) are 1, 2, 3 and 4, adding something like this to the source of the multiple-choice question should do the trick:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Get the Q1 answers
var q1Row1 = '{q1_1.NAOK}';
var q1Row2 = '{q1_2.NAOK}';
var q1Row3 = '{q1_3.NAOK}';
var q1Row4 = '{q1_4.NAOK}';
// Check the appropriate boxes
if(q1Row1 == 1 || q1Row1 == 2) {
$('input.checkbox:eq(0)', thisQuestion).prop('checked', true);
$('input.checkbox:eq(0)', thisQuestion).parent().find('input[type="hidden"]').val('Y');
}
if(q1Row2 == 1 || q1Row2 == 2) {
$('input.checkbox:eq(1)', thisQuestion).prop('checked', true);
$('input.checkbox:eq(1)', thisQuestion).parent().find('input[type="hidden"]').val('Y');
}
if(q1Row3 == 1 || q1Row3 == 2) {
$('input.checkbox:eq(2)', thisQuestion).prop('checked', true);
$('input.checkbox:eq(2)', thisQuestion).parent().find('input[type="hidden"]').val('Y');
}
if(q1Row4 == 1 || q1Row4 == 2) {
$('input.checkbox:eq(3)', thisQuestion).prop('checked', true);
$('input.checkbox:eq(3)', thisQuestion).parent().find('input[type="hidden"]').val('Y');
}
});
</script>