function showAll() {
    $(".textBlock").show("fast");
}

function collapseAll(){
    $(".textBlock").hide("fast");
}

function show(elem){
    var div_id = elem.attr("href");
    $(div_id).show("fast");
}

function hide(elem){
    elem.parent().hide("fast");
}

$(document).ready(function(){
        $(".textBlock").prepend("<a class='hideControl' href='#'>hide</a><br/><br/>");
        $(".hideControl").bind("click", function(){
            hide($(this));
            return false;
        });

        $("#toc > ol > li > a").bind("click", function(){
            show($(this));
            return false;
        });
        $(".asterix").bind("click", function(){
            name = "#" + $(this).attr("name");
            $(name).show("fast");
            return false;
        });
});
