//TWG, june 2006
//Code to hide/show tables in the full method list at www.mednytt.no. It also changes the sign in front of the year
//that has been clicked, as well as switch css class on the div to get the correct spacing when collapsed

$(document).ready(function(){

$('a.yearSwitch').click(function(event) {
    event.preventDefault();
    var id = this.id.replace('toggletest', "");
    id = id.replace('plusminus', "");
    var currentImgSrc = $("img#img"+id).attr("src");
    if (currentImgSrc == "images/minus.gif" || currentImgSrc == "http://192.168.2.66/images/minus.gif"){
        $("img#img"+id).attr("src","images/plus.gif");
        $("div#listyear"+id).attr("class","listyearCollapsed");
    }
    else {
        $("img#img"+id).attr("src","images/minus.gif");
        $("div#listyear"+id).attr("class","listyear");
    }
    $("table#table"+id).toggle();
 return false;
 });

});

