var maxTabs=3; //most tabs used on all page sections
/********************* Preload *******************/
var distributions_tab_1 = new Image(); distributions_tab_1.src = "/pics/shared/distributions_tab_1.gif";
var distributions_tab_2 = new Image(); distributions_tab_2.src = "/pics/shared/distributions_tab_2.gif";
var distributions_tab_3 = new Image(); distributions_tab_3.src = "/pics/shared/distributions_tab_3.gif";

/********************* switchContent *******************/
function disttab(num){
	var imageObj = getEl("disttab");
	var secObj;
	
	imageObj.src = eval("distributions_tab_" + num + ".src");
	for(i=1;i<4;i++){ //loop through tabs
		secObj = getEl("container_"+(i-1)); //get div by id
		if(i==num&&secObj){ //if active tab and object exists
			secObj.style.display = "inline"; //show block for tab
		} else if (secObj) {//if inactive tab and it exists
			secObj.style.display = "none";	//hide content for inactive tabs			  	
		}	
	}	
}

function histdist(num){
	var secObj;
	
	for(i=1995;i<2011;i++){ //loop through divs
		secObj = getEl("dist_"+ i); //get div by id
		//linkObj = getEl("link_"+ i); //get div by id
		if(i==num&&secObj){ //if active tab and object exists
			secObj.style.display = "inline"; //show block for tab
			//linkObj.style.color = "black"; 
		} else if (secObj) {//if inactive tab and it exists
			secObj.style.display = "none";	//hide content for inactive tabs	
			//linkObj.style.color = ""; 		  	
		}	
	}	
}

function switchContent(s){ //section
	var secObj;
	var tabImg;
	secObj = getEl("container_"+s); //get div by id
	testObj = getEl("switch_"+s); //get div by id
	if (secObj&&testObj&&testObj.checked==true) //if checkbox checked for section
		secObj.style.display = "block";	//hide content 
	else if (secObj&&testObj)
		secObj.style.display = "none";	//show
}

