var profNavCurrent = "doctors";
function profNavSwap(profNavNew, profQs) {
	profNavNewStore = profNavNew;
	profNavArray = profNavNew.split("-");
	profNavNew = profNavArray[0];
	if (profNavCurrent != "") {
		if ($("wProfNav" + profNavCurrent.charAt(0).toUpperCase() + profNavCurrent.substr(1).toLowerCase())) {
			$("wProfNav" + profNavCurrent.charAt(0).toUpperCase() + profNavCurrent.substr(1).toLowerCase()).className = "off";
		}
	}
	if ($("wProfNav" + profNavNew.charAt(0).toUpperCase() + profNavNew.substr(1).toLowerCase())) {
		$("wProfNav" + profNavNew.charAt(0).toUpperCase() + profNavNew.substr(1).toLowerCase()).className = "on";
	}
	$("wProfBody").innerHTML = "<div class=\"wait\"><img src=\"/images/wait_general.gif\" /></div>";
	new Ajax.Updater("wProfBody", "/data/about_content.php?pp=" + profNavNewStore + "&" + profQs, {evalScripts: true});
	profNavCurrent = profNavNew;
}

function profNavDraw(t) {
	$("wProfBody").innerHTML = t.responseText;
}

function profNavAutoload() {
	var tempLocation = location.hash;
	tempLocation = tempLocation.replace("?","");
	if (tempLocation != "" && tempLocation != "#") {
		tempLocation = tempLocation.replace("#","");
		profNavSwap(tempLocation, "");
	} else {
		profNavSwap("doctors", "");
	}
}
