/* 	INTERNET EXPLORER
	Copyright (c) i2 STUDIOS, Sweden
	Created 2000 06 15 by Robert Karlsson <robert /AT/ i2studios.com>
	Updated 2004-02-27

*/
var defaultDiv = null;	//the div to use when the user leaves the frameset (eg document.all.about)
var currentDiv = null;	//the most recently activated div layer with sublinks (eg document.all.about) can be identical to defaultDiv

var defaultHeader = null;	//the header to uses when the user leaves the frameset (eg about)
var currentSublink = null;	//the clicked sublink

function select(div, sublink){
	if (div!=''){
		//change the image to its active version in the image set
		document.images[div].src="/images/top_" + div + "_active.gif";

		//before updating the defaultHeader, change the previous (if there was one) header back to a neutral state
		if (defaultHeader!=null) if (defaultHeader!=div) document.images[defaultHeader].src='./images/top_' + defaultHeader + '_off.gif';

		defaultHeader=div;	

		//changing header also means showing the sublinks by turning it on
		currentDiv="navigation_"+ div;
		defaultDiv=currentDiv;
		
	}
			
	if (sublink!=''){
	
		//turn off the current sublink
		if (currentSublink!=null) document.images[currentSublink].src="/images/top_" + currentSublink + "_off.gif";

		//light the current sublink
		document.images[sublink].src='/images/top_' + sublink + '_active.gif';

		//now this is the current sublink
		currentSublink=sublink;
	}	
}	

function swapImage(item, source) {
	//leave the last clicked header and sublink lit
	if ((currentSublink!=item) & (defaultHeader!=item)) document.images[item].src = source;}
//turn div tags on and off showing sublinks with onmouseover (goes back to default using reset() when the user leaves the table)
function toggleVisibility(div_object){
	

	//turn off the active div before turning on the selected div
	if (currentDiv!=null) document.getElementById(currentDiv).style.visibility='hidden';	
	
	//turn this div on
	document.getElementById(div_object).style.visibility='visible'; 

	//now the currentDiv is this div
	currentDiv=div_object;
	
}

//do this every time the user leaves the table
function reset(){	
	//turn off the current div unless it is the default that should be left on
	if (currentDiv!=defaultDiv){
		//turn off the div with the sublinks for this choice
		document.getElementById(currentDiv).style.visibility='hidden';
		
		//turn the default div on
		document.getElementById(defaultDiv).style.visibility='visible';
		
		//now the current div is the same as the default div
		currentDiv=defaultDiv;
	}
}