var x;

var folder = new Array();
folder[0] = 'build202/index.html';
folder[1] = 'about-us';
folder[2] = 'mission-core-values';
folder[3] = 'rewards-benefits';
folder[4] = 'people';
folder[5] = 'career-areas';
folder[6] = 'locations';
folder[7] = 'search';

var btn = new Array();
btn[0] = 'btn0';
btn[1] = 'btn1';
btn[2] = 'btn2';
btn[3] = 'btn3';
btn[4] = 'btn4';
btn[5] = 'btn5';
btn[6] = 'btn6';
btn[7] = 'btn7';


function checkPage(){
	//folderPath is the URL string of the page
	var folderPath = document.location.href;
	
	for(x in folder){
		//checks to see if a string (in folder Array) is in the URL
		//if the string (folder name) matches up with the button, it will display the selected state of the button
		if (folderPath.indexOf(folder[x])!=-1){
			document.getElementById(btn[x]).className = 'tabMenuSelected';
		}
		
		//since the career areas are in their own folders, but still in the Career Areas section, we need to check for these and display btn5
		if (folderPath.indexOf('nursing')!=-1 || folderPath.indexOf('therapy')!=-1 || folderPath.indexOf('pharmacy')!=-1 || folderPath.indexOf('more-careers')!=-1){
			document.getElementById(btn[5]).className = 'tabMenuSelected';
		}
	}
	
}