function getSection(level){
	var currentPath = location.href.toString().toLowerCase();
	var pathSplit= currentPath.split("/");
	var filePath = pathSplit[pathSplit.length-2]+"/"+pathSplit[pathSplit.length-1]
	filePath = filePath.replace(location.hash, "");
	var inSection = new Array();
	for(var i=0;i<MainSection[1].length;i++){
		inSection[0] = i;
		if(MainSection[1][i].toLowerCase().match(filePath) != null){
			return inSection[level];
		}
		for(var j=1;j<SubSection[1][i].length;j++){
			inSection[1] = j;
			if(SubSection[1][i][j].toLowerCase().match(filePath) != null){
				return inSection[level];
			}
		}
	}
	
}

function getLevel(){
	var currentPath = location.href.toString().toLowerCase();
	var pathSplit= currentPath.split("/");
	var filePath = pathSplit[pathSplit.length-2]+"/"+pathSplit[pathSplit.length-1]
	filePath = filePath.replace(location.hash, "");
	var inSection = new Array();
	for(var i=0;i<MainSection[1].length;i++){
		inSection[0] = i;
		if(MainSection[1][i].toLowerCase().match(filePath) != null){
			return 0;
		}
		for(var j=1;j<SubSection[1][i].length;j++){
			inSection[1] = j;
			if(SubSection[1][i][j].toLowerCase().match(filePath) != null){
				return 1;
			}
		}
	}
	return -1;
}
