/**
 * @author LEC
 */

function setTab(tabID, callerID){
	
	var contentList = document.getElementById('tabbedContentWrapper').childNodes;
	var tabList = document.getElementById('tabBar').childNodes;
	var i = 0;
	for(i =0; i < contentList.length; i++){
		if(contentList[i].nodeType != 3){
			contentList[i].className = 'blurred';
		}
	}
	for(i =0; i < tabList.length; i++){
		tabList[i].className = '';
	}
	callerID.className = 'selected';
	document.getElementById(tabID).className = 'focused';
	window.location.hash = tabID + "_" + callerID.id;
	
}
function loadDirect(){
	if(window.location.hash != ""){
		var paramArr = window.location.hash.split("_");
		var tabID = paramArr[0].split('#')[1];
		var callerID = document.getElementById(paramArr[1]);
		setTab(tabID, callerID);
	}
}