function toggle_tab(tab, task, focus_tab, hide_errors)
	{
	if (tab==focus_tab)
		{
		return window.location='index.php?task='+task+'&tab='+focus_tab;
		}

	// clear all errors
	if (hide_errors)
		{
		changed=false;
		$$("#spbas .success, #spbas .error").each(function(element)
			{
			element.remove();
			changed=true;
			});

		if (changed)
			{
			$$("#spbas div.inner_tab_content").each(function(element)
				{
				element.setStyle({'marginTop': '-12px'});
				});
			}
		}

	// set all to off
	$$("#inner_tab_container a.on").each(function(element)
		{
		element.toggleClassName('on');
		});

	// set all to off
	$$("#spbas div.inner_tab_content").each(function(element)
		{
		element.hide();
		});

	// set the target tab to focus
	tab_focus='tab_'+tab;
	$(tab_focus).toggleClassName('on');
	$(tab).show();
	}

function ignore() {}

/**
* A generic wrapper to prompting for a decision. 
* Loads the page if the user clicks the OK button.
*
* @param string page The page requested.
* @param string confirm_message The message to display to the end user.
*/
function prompt_decision(task, params, confirm_message)
	{
	if (confirm(confirm_message))
		{
		// lpp(module, page, params)
		window.location='index.php?task='+task+params;
		}

	return false;
	}

function print_page(url) { window.open(url, "Print Article", "toolbar=1, scrollbars=1"); }
