// UM Physicians - Our Leadership page
var x;

//adds CSS stylesheet that hides the elements. Gets rid of flicker before page loads!
(function () {
	var head = document.getElementsByTagName("head")[0];
	if (head) {
		var scriptStyles = document.createElement("link");
		scriptStyles.rel = "stylesheet";
		scriptStyles.type = "text/css";
		scriptStyles.href = "../styles/flicker.css";
		head.appendChild(scriptStyles);
	}
}());


//pull name out of URL string
var searchString = document.location.search;
// strip off the leading '?'
// add code to set if value not 0&#150;16, set to 0
searchString = searchString.substring(1);
var nvPairs = searchString.split("&");
for (i = 0; i < nvPairs.length; i++){
	var nvPair = nvPairs[i].split("=");
	var name = nvPair[0];
	var value = nvPair[1];
};

if(!value){
	var value = 0;
};

var myVar1 = (value);

var profile = new Array();
profile[0] = 'Default';
profile[1] = 'Robbins';
profile[2] = 'Linder';
profile[3] = 'Tooke';
profile[4] = 'Kelemen';
profile[5] = 'Smoot';
profile[6] = 'Egerton';
profile[7] = 'Minken';
profile[8] = 'Vaughan';
profile[9] = 'Hall';
profile[10] = 'Gottlieb';
profile[11] = 'Dumais';

//runs on page load, function at bottom of html
function changeLayer(ID){
	for(x in profile){
		document.getElementById(profile[x]).style.display = 'none';
	}
		
	if(ID==0){
		document.getElementById('Default').style.display = 'block';
	}
	else{
		document.getElementById(ID).style.display = 'block';
	}
}


function openProfile(p){
	for(x in profile){
		document.getElementById(profile[x]).style.display = 'none';
	}
	document.getElementById(p).style.display = 'block';
}



//('Default','','hide','DefaultGreenLine','','hide','Linder','','show','Tooke','','hide','Kelemen','','hide','Smoot','','hide','Babineau','','hide','Jablonover1','','hide','Jablonover2','','hide');