//*****************************************************************************
// Do not remove this notice.
//
// Copyright 2002 by Mike Hall.
// See http://www.brainjar.com for terms of use.
//
// Modified 2005 by Scott Davenport
//****************************************************************************

// Update the active tab on the page
function updateTabs(frameID) {
	var elementList;
	var index;
                                                                                
	if (frameID == null) {
		return;
	}
                                                                                
	elementList = document.getElementsByTagName("A");
	for (index = 0; index < elementList.length; index++) {
		if (elementList[index].target == frameID) {
			// If the link's URL matches the page being 
			// loaded, activate it. Otherwise, make sure the 
			// tab is deactivated.
			if (elementList[index].href == 
					window.frames[frameID].location.href) {
				elementList[index].className += " activeTab";
				elementList[index].blur();
			} else {
				removeClass(elementList[index], "activeTab");
			}
		}
	}
}

// Remove the given class name from element
function removeClass(element, classID) {
	var index;
	var currentList;
	var newList;
                                                                                
	newList = new Array();
	currentList = element.className.split(" ");
	for (index = 0; index < currentList.length; index++) {
		if (currentList[index] != classID) {
			newList.push(currentList[index]);
		}
	}
	element.className = newList.join(" ");
}

