
function replace_anchor_by_text_node(node) {
    var links = document.getElementsByName('subscription_group');

    for ( i = 0; i < links.length; i++ ) {
        links[i].removeAttribute('href');
        links[i].firstChild.replaceData( 0, 255, '' );
    }

    var divs = document.getElementsByTagName('div');
    for ( i = 0; i < divs.length; i++ ) {
        if ( divs[i].className == 'buchung_aktiv' ) {
            divs[i].style.display = "inline";
        }
    }

    // node.removeChild( node.firstChild );
}

// toggled die Antworten (Ets::Widget::QTI::Questionnaire)
function toggle_all( max_id, state ) {
    for ( i = 1; i < max_id; i++ ) {
        var count = '' + i;
        while ( count.length < 3 ) {
            count = '0' + count; 
        }
        if ( state == 1 ) {
            if ( $('answers_' + count).h.now == 0 ) {
                $('answers_' + count ).h.toggle();    
            }
        }
        else {
            if ( $('answers_' + count).h.now > 0 ) {
                $('answers_' + count ).h.toggle();    
            }
        }
    }           
}
