// select Tab
var setActiveTab = function(target_id) {
  target = $(target_id);
  tab = $('tab_' + target_id);

  // hide all tabs
  $$('.tab_content').each(function(el){
    el.hide();
  });
  // set active label(s) inactive
  $$('.tab.active').each(function(el){
    el.removeClassName('active');
  });

  // show selected
  if (target) target.show();

  // set selected label active
  tab.addClassName('active');
}

