function imgOn(imgName)
{
	if(document.images)
	{
		document[imgName].src = eval(imgName + "On.src");
	}
}

function imgOff(imgName)
{
	if(document.images)
	{
		document[imgName].src = eval(imgName + "Off.src");
	}
}


function showLayer(layerName)
{
	if(document.all) // IE
	{
		document.all[layerName].style.visibility = 'visible';
	}
	else if(document.layers) // NS
	{
 		document.layers[layerName].visibility = 'visible';
	}
	else // DOM
	{
		document.getElementById(layerName).style.visibility = 'visible';
	}
}

function hideLayer(layerName)
{
	if (document.getElementById(layerName)) {
		document.getElementById(layerName).style.visibility = 'hidden';
	}
	
}


patient_informationOn = new Image(); patient_informationOn.src = "images/nav/index_patient_information_on.gif";
patient_informationOff = new Image(); patient_informationOff.src = "images/nav/index_patient_information_off.gif";
residencyfellowsOn = new Image(); residencyfellowsOn.src = "images/nav/index_residencyfellows_on.gif";
residencyfellowsOff = new Image(); residencyfellowsOff.src = "images/nav/index_residencyfellows_off.gif";
department_facultyOn = new Image(); department_facultyOn.src = "images/nav/index_department_faculty_on.gif";
department_facultyOff = new Image(); department_facultyOff.src = "images/nav/index_department_faculty_off.gif";
department_researchOn = new Image(); department_researchOn.src = "images/nav/index_department_research_on.gif";
department_researchOff = new Image(); department_researchOff.src = "images/nav/index_department_research_off.gif";
late_breaking_newsOn = new Image(); late_breaking_newsOn.src = "images/nav/index_late_breaking_news_on.gif";
late_breaking_newsOff = new Image(); late_breaking_newsOff.src = "images/nav/index_late_breaking_news_off.gif";
wisconsin_alumniOn = new Image(); wisconsin_alumniOn.src = "images/nav/index_wisconsin_alumni_on.gif";
wisconsin_alumniOff = new Image(); wisconsin_alumniOff.src = "images/nav/index_wisconsin_alumni_off.gif";
giving_opportunitiesOn = new Image(); giving_opportunitiesOn.src = "images/nav/index_giving_opportunities_on.gif";
giving_opportunitiesOff = new Image(); giving_opportunitiesOff.src = "images/nav/index_giving_opportunities_off.gif";

var blnReset = false;

function showtopnav(menuname)
{
	resettopnav();
	showLayer(menuname+'Menu');
	showLayer('topNavReset');
	blnReset = false;
}
function resettopnav()
{
	hideLayer('patient_informationMenu');
	hideLayer('residencyfellowsMenu');
	hideLayer('department_facultyMenu');
	hideLayer('department_researchMenu');
	hideLayer('late_breaking_newsMenu');
	hideLayer('wisconsin_alumniMenu');
	hideLayer('topNavReset');
	blnReset = false;
}
/*

//Drop each of the subnavs down 2px if N6:
if(navigator.appName == "Netscape" && !document.layers)
{
        n6subnavDrop('patientsMenu');
        n6subnavDrop('residentsMenu');
        n6subnavDrop('facultyMenu');
        n6subnavDrop('researchMenu');
        n6subnavDrop('newsMenu');
        n6subnavDrop('alumniMenu');
}
function n6subnavDrop(layername)
{
        document.getElementById(layername).style.top = "35px";
}
*/