function create_tabs() {
	/*
		Implements a tabbed interface when called on a page with:
		
			1) a "div.panes", with
			2) one or more child divs
		
		Arguments passed to this function will be the text displayed on each tab. HTML is allowed, but for <br>s only please! Sample usage:
		
			<div class="panes">
				<div>
					...
				</div>
				<div>
					...
				</div>
			</div>
			
			<script type="text/javascript">
				create_tabs("Tab One Title", "Tab Two Title");
			</script>
	*/
	
	// build tab block
	needs_two_lines = false;
	tab_html_builder = "";
	for (var i = 0; i < arguments.length; i++) {
		if (arguments[i].search("<br") >= 0) {
			needs_two_lines = true;
		}
		tab_html_builder += "<li><a href=''>" + arguments[i] + "</a></li>";
	}
	tab_html = "<h3 class='tabs" + (needs_two_lines ? "" : " oneline") + "'><ul>" + tab_html_builder + "</ul></h3>";

	// hide panes for initial state
	$pane_container = $("div.panes");	
	$panes = $pane_container.children("div");
	$panes.hide();

	// insert tab block above tabs and call the jQuery Tools tab routine
	$tabs = $pane_container.before(tab_html);		
	$("h3.tabs ul").tabs($panes, {tabs: 'li'}); 
}
