ILCTabs = function() {
	// sets the left and right border images for a tab depending
	// on whether it is active or not. tab_id is the id of the tab element
	// active is a boolean
	function set_tab_images(tab, active) {				
		if (active) {
			left_src = '/images/tabs/active-left.png';
			right_src = '/images/tabs/active-right.png';
		} else {
			left_src = '/images/tabs/inactive-left.png';
			right_src = '/images/tabs/inactive-right.png';
		}
	
		tab.down(".left_image").src = left_src;
		tab.down(".right_image").src = right_src;
	};

	return {				
		// activates a tab with the specified dom ID
		// deactivates all other tabs in the same group
		activateTab: function(tab) {				
			// deactivate other tabs
			tab.siblings().each(function(sibling_tab) { 
				sibling_tab.removeClassName('active'); 
				sibling_tab.addClassName('inactive'); 
				set_tab_images(sibling_tab, false);
			});
	
			// activate actual tab
			tab.removeClassName('inactive');
			tab.addClassName('active');
	
			set_tab_images(tab, true);		
		}
	};
}();