function processTab( link ) {
	// keep only the part after the #
	var target = link.href.gsub('.*#', '');
	// add showAndSelect onclick
	link.observe('click', function(){
		showAndSelect(target);
		// then don't follow the link's href
		return false;
	});
}

function showAndSelect( mod ) {
	// show the given box
	showTabBox(mod);
	// make the given tab selected
	selectTab(mod);
}
function showTabBox( mod ) {
	// hide each tab box
	$$('.tab-box').invoke('hide');
	// show the given box
	$$('.tab-box#' + mod).first().show();
	if( mod == 'map' ){
		getMapLoadVariables( 'myMoreInfoMap' );
		track();
	}
}
function selectTab( mod ) {
	// unselect all tabs
	$$('.tab-controller a').invoke('removeClassName', 'selected');
	// select the given tab
	$$('.tab-controller a.' + mod).first().addClassName('selected');
}