<?
function tabbar($Node){
	global $inTabBar;
	$inTabBar = false;
	if ($Node->Tabbar != 'Y') return false;
	if (!$Node->Tab_Captions || !$Node->Tab_URLs) return false;

	$Node->Tab_Captions = explode(',', $Node->Tab_Captions);
	$Node->Tab_URLs = explode(',', $Node->Tab_URLs);

	echo '<ul id="TabBar">';
	foreach ($Node->Tab_Captions as $key=>$Caption){
		echo '<li><a href="' . $Node->Tab_URLs[$key] . '" title="' . $Caption . '"';
		if ($key + 1 == $Node->Current_Tab) echo ' class="current"';
		echo '><span>' . $Caption . '</span></a></li>';
	}
	echo '</ul><p class="TabBar">&nbsp;</p>';
	$inTabBar = true;
}
?>
