 (i=1; layer_exists('fold'+folder+'_'+i); ++i) {
       show_layer('show'+folder+'_'+i); }
}
function show_folder_completely(folder) {
    // Precondition: all subfolders are folded

    show_layer('hide'+folder);
    hide_layer('show'+folder);
    show_layer('fold'+folder);

    scrollBy(0,0); // This is a work around to make it work in Browsers (Explorer, Mozilla)

    var i;
    for (i=1; layer_exists('fold'+folder+'_'+i); ++i) {
       show_folder_completely(folder+'_'+i); }
}



func