var currentType;
function show(id) {
	if(id == "casestudies") {
		showCS("all");
		document.getElementById("industrySelector").selectedIndex = 0;
	} else document.getElementById("cs" + activeCS).style.display = "none";
	if(currentType)
		currentType.style.display = "none";
	currentType = document.getElementById(id);
	currentType.style.display = "inline"; 
}
var activeCS = "all";
function showCS(val) {
	document.getElementById("cs" + activeCS).style.display = "none";
	document.getElementById("cs" + val).style.display = "";
	activeCS = val;
}
function libInit() {
	var tmpHTML = new Array(500);
	for(var i=0, k=0; i < industries.length; i++) {
		tmpHTML[k++] = '<table border="0" cellpadding="0" cellspacing="0" style="display:none" class="library" id="cs' + industries[i] + '">' +
											'<tr><td align="center" style="padding-right:10px"><strong>Download</strong></td><td align="center"><strong>Title</strong></td></tr>';
		var tmp = assoc["ind" + industries[i]];
		for(var j=0; j < tmp.length; j++) {
			tmpHTML[k++] = '<tr>' + document.getElementById("a" + tmp[j]).innerHTML + '</tr>';
		}
		tmpHTML[k] = '</table>';
	}
	document.getElementById("csSections").innerHTML = tmpHTML.join("");
}
