function isChecked(inputName){
    var me = document.cadastro_usuario_form;
    var isChecked = false;
    for (j=0; j < me[inputName].length; j++){
       if (me[inputName][j].checked){
           isChecked = true;
       }
    }
    return isChecked;
}

function valida_form() {
    var me = document.cadastro_usuario_form;
    var arr = monta_array_perguntas();
    var alen = arr.length;

    checkSIM = 0;
    for (i=0; i < alen; i++) {
        inputObj = me[arr[i]['nome']];
        inputName = arr[i]['nome'];

        if (inputName=='pergunta_949:list'){
            if (inputObj[0].checked){
                checkSIM = 1;
            }
            checked = 0;
            for ( j=0; j < inputObj.length; j++ ) {
                if ( inputObj[j].checked ) {
                    checked = 1;
                }
            }
            if ( checked==0 ) {
                alert('Você precisa responder todas perguntas obrigatórias');
                return false;
            }
        }
        if ( inputName=='pergunta_950:list'){
            if (checkSIM){
                checked = 0;
                for ( j=0; j < inputObj.length; j++ ) {
                    if ( inputObj[j].checked ) {
                        checked = 1;
                    }
                }
                if ( checked==0 ) {
                    alert('Você precisa responder todas perguntas obrigatórias');
                    return false;
                }
            }
        }
        if ( inputName=='pergunta_951:list'){
            checked = 0;
            for ( j=0; j < inputObj.length; j++ ) {
                if ( inputObj[j].checked ) {
                    checked = 1;
                }
            }
            if ( checked==0 ) {
                alert('Você precisa responder todas perguntas obrigatórias');
                return false;
            }
        }

    }
    return true;
}