function init(topClass,top2,bottomClass,bottom) {
    $("."+topClass+" > ."+top2).click(function(){
                                                            showtab(topClass,this,top2,bottomClass,bottom,'b'+this.id);
                                                            });
};

function showtab(topClass,item,top2,bottomClass,bottom,itemBottomId)
{
    $("."+topClass+" > .active").attr("class",top2);
    $("."+bottomClass+" > .active").attr("class",bottom);
    item.className = top2 + " active";
    $("#"+itemBottomId).attr("class",bottom+" active");
}

