<!-- Copyright (c) 2003 PHD Computer Consulants Ltd -->
function toid(newid)
{
	if( !document.getElementById) return true;

	for (var id=0; id<numids; id++)
	{
		panename = paneid[id];
		e = document.getElementById(panename);
		if( !e) continue;
		tab = document.getElementById("tab"+id);
		if( !tab) continue;
		if( id==newid)
		{
			e.style.display = "block";
			newtabback = clr_sel;
		}
		else
		{
			e.style.display = "none";
			newtabback = clr_nrm;
		}
		tabback[id] = newtabback;
		tab.style.background = newtabback;
	}
	shownid = newid;
	switchid = -1;
	cleartid();
	return false;
}

function switchtab(id)
{
	if( !document.getElementById) return;
	if( shownid==id)
		return;
	if( id==-1)
	{
		switchid = -1;
		cleartid();
		return;
	}
	if( switchid!=id)
	{
		cleartid();
		switchtid = setTimeout('toid('+id+')',500);
		switchid = id;
		return;
	}
}

function cleartid()
{
	if( switchtid!=-1)
	{
		clearTimeout(switchtid);
		switchtid = -1;
	}
}

function showall()
{
	if( !document.getElementById) return true;

	for (var id=0; id<numids; id++)
	{
		panename = paneid[id];
		e = document.getElementById(panename);
		if( !e) continue;
		e.style.display = "block";
		tab = document.getElementById("tab"+id);
		if( !tab) continue;
		tabback[id] = clr_sel;
		tab.style.background = clr_sel;
	}
	shownid = 0;
	switchid = -1;
	cleartid();
	return false;
}

