

function CFC_switchTab(tabLabel)
	{
	
	if(!window.CFC_Tab) return;
	
	var tabObject=CFC_Tab;
	if (!tabObject.Sub[tabLabel].src)
		{
		if (!parent.frames.CFC_middle)
			{	
			for (elem in tabObject.Sub)
				{				
				var iFrameObj = (document.all) ? document[tabObject.name] : document.getElementsByName(tabObject.name).item(0).contentDocument;
				var subObj = (document.all) ? iFrameObj[tabObject.Sub[elem].name] : iFrameObj.getElementById(tabObject.Sub[elem].name);
				
				if (elem==tabLabel)
					{	
					subObj.style.visibility="visible";
					if(document.all)
						{
						iFrameObj.scrollTo(0,0);
						}
					else
						{
						iFrameObj.defaultView.scrollTo(0,0);
						}
						
					var theObj = (document.all) ? iFrameObj.document : iFrameObj;
					if (theObj.CFCForm && theObj.CFCForm.CFC_JumpToTabPage) theObj.CFCForm.CFC_JumpToTabPage.value=tabLabel;
					}
				else
					{
					subObj.style.visibility="hidden";
					}
				}
			}
		else
			{
			// ns6 does a full reload, when assigning the hash
			var agt = navigator.userAgent.toLowerCase(); 
			if (document.all || !document.getElementById || document.getElementById && agt.indexOf('netscape6' )>0)
				{
				parent.frames.CFC_middle.location.hash=tabObject.Sub[tabLabel].name;
				}
			if (parent.frames.CFC_middle.document.CFCForm && parent.frames.CFC_middle.document.CFCForm) parent.frames.CFC_middle.document.CFCForm.CFC_JumpToTabPage.value=tabLabel;
			}	
		}
	else
		{
		var cK=CFC_cacheKiller();
		var src=tabObject.Sub[tabLabel].src;
		if (src.indexOf("?")==-1) { src+="?"; }
		else { src+="&" }
		src+=cK;	
		if (!parent.frames.CFC_middle)
			{
			document[tabObject.name].document.location.href=src;
			}
		else
			{
			parent.frames.CFC_middle.location.href=src;
			}
		}
	}

function CFC_restoreTab(img,tabLabel)
	{
	alert(img);
	var tabObject=CFC_Tab;
	if (tabLabel==tabObject.current)
		{
		
		}
	}
