
function toggle_display(el){
    if (el.style.display == 'none'){
        el.style.display='block';
    }else{
        el.style.display='none';
    }
}
function toggle_electricity(){
    var headers = document.getElementsByTagName('h2')
    for (i=0;i<headers.length;i++){
        if (headers[i].childNodes[0].nodeValue == 'ELEKTRICITEITSVERBRUIK'){
            next = headers[i];
            while (next){
                if (next.tagName){
                    last = next;
                    toggle_display(next);
                }
                next = next.nextSibling;
                if (next.tagName == 'H2'){
                    toggle_display(last);
                    return
                }
            }
        }
    }
}

function toggle_heating(){
    var headers = document.getElementsByTagName('h2')
    for (i=0;i<headers.length;i++){
        if (headers[i].childNodes[0].nodeValue == 'LOKALEN'){
            next = headers[i];
            while (next){
                if (next.tagName){
                    toggle_display(next);
                }
                next = next.nextSibling;
            }
        }
    }
}

