// This script currently doesn't degrade gracefully, so users without js enabled
// will only see the first tab, "Research Areas".

function orgmap(entry_id, thistab) {
  // Remove active_tab class from any of the anchors
  $$('#orgmap_tabs li a').each(function(tab) {
     tab.removeClassName('active_tab');
  });
  // Add the active_tab class to the selected one
  $(thistab).addClassName('active_tab');
  // Update the orgmap_content div with an AJAX request
  new Ajax.Updater('orgmap_content', '/orgmap/'+entry_id, { method: 'get' });
}