<!--
var topPath = "/includes/index/navigators/top/images/";
var rightPath = "/includes/index/navigators/right/images/";
var rightPathuh = "/includes/usershub/navigators/right/images/";
var rightPathihr = "/includes/inhouseresearch/navigators/right/images/";
var rightPathsd = "/includes/scientificdivisions/navigators/right/images/";
var rightPathmt = "/includes/magnettechnology/navigators/right/images/";
var rightPathedu = "/includes/education/navigators/right/images/";
var rightPathmc = "/includes/mediacenter/navigators/right/images/";
var rightPathabout = "/includes/about/navigators/right/images/";
var leftPath = "/includes/index/navigators/left/images/";
var menutimeout = 5000;
var lasttopmenu = -1;

var topnavtext = new Array();
topnavtext[0] = ['users', 'Users.'];
topnavtext[1] = ['inhouseresearch', 'In-House Research.'];
topnavtext[2] = ['magnetsmaterials', 'Magnets &amp; Materials.'];
topnavtext[3] = ['education', 'Education.'];
topnavtext[4] = ['media', 'Media.'];
topnavtext[5] = ['publicationsreports', 'Publications &amp; Reports.'];
topnavtext[6] = ['about', 'About.'];
topnavtext[7] = ['home', 'Home.'];
//DO NOT remove the home array topnavtext7

var subMenu = new Array();

for (var i = 0; i < topnavtext.length; i++)
{
	subMenu[i] = new Array();
}

// The largest array in the following subMenu section needs to match the number of
// elements in the "mainnavbottom" div of includes/index/navigators/top/index.html to properly work.

subMenu[0][0] = new Array("AMRIS", "/usershub/scientificdivisions/amris/overview.html");
subMenu[0][1] = new Array("DC Field", "/usershub/scientificdivisions/dcfield/index.html");
subMenu[0][2] = new Array("EMR", "/usershub/scientificdivisions/emr/overview.html");
subMenu[0][3] = new Array("High B/T", "/usershub/scientificdivisions/highbt/overview.html");
subMenu[0][4] = new Array("ICR", "/usershub/scientificdivisions/icr/overview.html");
subMenu[0][5] = new Array("NMR", "/usershub/scientificdivisions/nmr/overview.html");
subMenu[0][6] = new Array("Pulsed Field", "/usershub/scientificdivisions/pulsedfield/overview.html");
subMenu[0][7] = new Array("Magnet Time", "/usershub/proposals/index.html");
subMenu[0][8] = new Array("Publications", "/usershub/publications/index.html");
subMenu[0][9] = new Array("User Services", "/usershub/index.html#services");

subMenu[1][0] = new Array("Overview", "/inhouseresearch/");
subMenu[1][1] = new Array("Condensed Matter", "/inhouseresearch/condensedmatter/overview.html");
subMenu[1][2] = new Array("Applied Superconductivity", "/magnettechnology/research/asc/overview.html");
subMenu[1][3] = new Array("Other Research", "/inhouseresearch/other.html");
subMenu[1][4] = new Array("Research Funding", "https://ucgp.magnet.fsu.edu/");

subMenu[2][0] = new Array("Overview", "/magnettechnology/");
subMenu[2][1] = new Array("Group Members", "/magnettechnology/members.aspx");
subMenu[2][2] = new Array("Magnet Projects", "/magnettechnology/research/magnetprojects/index.html");
subMenu[2][3] = new Array("Publications", "/magnettechnology/publications.aspx");
subMenu[2][4] = new Array("Research and Development", "/magnettechnology/research/");
subMenu[2][5] = new Array("Applied Superconductivity", "/magnettechnology/research/asc/overview.html");

subMenu[3][0] = new Array("Teachers", "/education/teachers/");
subMenu[3][1] = new Array("Students", "/education/students/");
subMenu[3][2] = new Array("Community", "/education/community/");
subMenu[3][3] = new Array("Calendar", "/education/calendar/calendar.aspx");
subMenu[3][4] = new Array("Contact", "/education/contact.html");
subMenu[3][5] = new Array("Mag Lab U", "/education/tutorials/electricitymagnetism.html");
subMenu[3][6] = new Array("Graduate Students", "/education/gradstudents/");
subMenu[3][7] = new Array("RET", "/education/ret/");
subMenu[3][8] = new Array("REU", "/education/reu/");
subMenu[3][9] = new Array("Home", "/education/");

subMenu[4][0] = new Array("News", "/mediacenter/news/");
subMenu[4][1] = new Array("Multimedia Library", "/mediacenter/factsheets/imagelibrary/");
subMenu[4][2] = new Array("Contacts", "/mediacenter/mediacontacts.html");
subMenu[4][3] = new Array("Fact &amp; Features", "/mediacenter/factsheets/index.html");
subMenu[4][4] = new Array("Publications", "/mediacenter/publications/");

subMenu[5][0] = new Array("Scientific Journals", "/usershub/publications/scientificjournals.aspx");
subMenu[5][1] = new Array("Research Reports", "/usershub/publications/researchreportsonline.aspx");
subMenu[5][2] = new Array("Mag Lab Publications", "/mediacenter/publications/");
subMenu[5][3] = new Array("Science Highlights", "/usershub/publications/sciencehighlights/index.html/");
subMenu[5][4] = new Array("User Reporting", "https://reporting.magnet.fsu.edu/");
subMenu[5][5] = new Array("Big Light", "/usershub/publications/biglight.html");
 
subMenu[6][0] = new Array("Welcome", "/about/");
subMenu[6][1] = new Array("Overview", "/about/overview.html");
subMenu[6][2] = new Array("Mission", "/about/mission.html");
subMenu[6][3] = new Array("Organization", "/about/howwework/organization/");
subMenu[6][4] = new Array("History", "/about/history.html");
subMenu[6][5] = new Array("Visit", "/about/visit.html");
subMenu[6][6] = new Array("Careers &amp; Diversity", "/about/howwework/careers.html"); 
subMenu[6][7] = new Array("Contact Us", "/about/contact.html");
subMenu[6][8] = new Array("Facts &amp; Features", "/mediacenter/factsheets/");


// Spotlight Rotator - Random Image Array

var randomSpotlightRotators = new Array();

randomSpotlightRotators[0] = "/frontpage/spotlight/spotlightrotator1.html";
randomSpotlightRotators[1] = "/galleries/featuredimage/featuredimage2.html";
randomSpotlightRotators[2] = "/galleries/featuredimage/featuredimage3.html";
randomSpotlightRotators[3] = "/galleries/featuredimage/featuredimage4.html";


// Top Rotator - Random Image Array

var randomTopImages = new Array();

randomTopImages[0] = "/includes/education/titleimages/alessandrovolta.jpg";
randomTopImages[1] = "/includes/education/titleimages/andremarieampere.jpg";
randomTopImages[2] = "/includes/education/titleimages/charlesaugustindecoulomb.jpg";
randomTopImages[3] = "/includes/education/titleimages/claudeshannon.jpg";
randomTopImages[4] = "/includes/education/titleimages/georgohm.jpg";
randomTopImages[5] = "/includes/education/titleimages/gerdbinnig.jpg";
randomTopImages[6] = "/includes/education/titleimages/hanschristianoersted.jpg";
randomTopImages[7] = "/includes/education/titleimages/heinrichhertz.jpg";
randomTopImages[8] = "/includes/education/titleimages/humphrydavy.jpg";
randomTopImages[9] = "/includes/education/titleimages/jamesclerkmaxwell.jpg";
randomTopImages[10] = "/includes/education/titleimages/jamesjohnthomson.jpg";
randomTopImages[11] = "/includes/education/titleimages/jamesjoule.jpg";
randomTopImages[12] = "/includes/education/titleimages/jameswatt.jpg";
randomTopImages[13] = "/includes/education/titleimages/johnbardeen.jpg";
randomTopImages[14] = "/includes/education/titleimages/josephhenry.jpg";
randomTopImages[15] = "/includes/education/titleimages/karljansky.jpg";
randomTopImages[16] = "/includes/education/titleimages/leedeforest.jpg";
randomTopImages[17] = "/includes/education/titleimages/luigigalvani.jpg";
randomTopImages[18] = "/includes/education/titleimages/nikolatesla.jpg";
randomTopImages[19] = "/includes/education/titleimages/theodoremaiman.jpg";
randomTopImages[20] = "/includes/education/titleimages/walterbrattain.jpg";
randomTopImages[21] = "/includes/education/titleimages/wernervonsiemens.jpg";
randomTopImages[22] = "/includes/education/titleimages/willemeinthoven.jpg";
randomTopImages[23] = "/includes/education/titleimages/williamcrookes.jpg";
randomTopImages[24] = "/includes/education/titleimages/williamshockley.jpg";

function pickTopImage()
{
	document.getElementById("randomTopImage").src = randomTopImages[Math.min(randomTopImages.length - 1, Math.floor(Math.random() * randomTopImages.length))];

}


// Education Gallery Rotator - Random Image Array

var randomLeftImages = new Array();

randomLeftImages[0] = "/includes/education/navigators/left/images/randomgallery/figure1-thinfilm.jpg";
randomLeftImages[1] = "/includes/education/navigators/left/images/randomgallery/figure2-thinfilm.jpg";
randomLeftImages[2] = "/includes/education/navigators/left/images/randomgallery/figure3-superlattice.jpg";
randomLeftImages[3] = "/includes/education/navigators/left/images/randomgallery/figure4-superlattice.jpg";
randomLeftImages[4] = "/includes/education/navigators/left/images/randomgallery/figure5-scwire.jpg";
randomLeftImages[5] = "/includes/education/navigators/left/images/randomgallery/figure6-scorganic.jpg";
randomLeftImages[6] = "/includes/education/navigators/left/images/randomgallery/figure7-superconductors.jpg";
randomLeftImages[7] = "/includes/education/navigators/left/images/randomgallery/figure8-lao.jpg";
randomLeftImages[8] = "/includes/education/navigators/left/images/randomgallery/figure9-lao.jpg";

function pickLeftImage()
{
	if (document.getElementById("randomLeftImage") != null)
		document.getElementById("randomLeftImage").src = randomLeftImages[Math.min(randomLeftImages.length - 1, Math.floor(Math.random() * randomLeftImages.length))];
}


var maxelements = 0;
for (var i = 0; i < subMenu.length - 1; i++)
{
	if (subMenu[i].length > maxelements)
	{
		maxelements = subMenu[i].length;
	}
}
for (var i = 0; i < maxelements; i++)
{
	subMenu[7][i] = new Array("", "");
}

function isNull(a)
{
	return typeof a == 'object' && !a;
}

function turnOn(imgName, statText, path, fileExtension)
{
	if(fileExtension == undefined)
	{
		fileExtension = 'gif'
	}
	document[imgName].src = path + imgName + 'on.' + fileExtension;
	window.status = statText;
	return true;
}

function turnOff(imgName, path, fileExtension)
{
	if(fileExtension == undefined)
	{
		fileExtension = 'gif'
	}
	document[imgName].src = path + imgName + 'off.' + fileExtension;
	window.status = "";
	return true;
}

var intopmenu = false, inbotmenu = false;

function turnOffMainNavTop(imgName, path)
{
	if (!(intopmenu || inbotmenu))
	{
		turnOff(imgName, path);
		subMenuSwap(7);
		lasttopmenu = -1;
	}
}

function checkTurnOffMainNavTop()
{
	if (lasttopmenu != -1 && !(intopmenu || inbotmenu))
	{
		turnOffMainNavTop(topnavtext[lasttopmenu][0], topPath);
	}
}

setInterval(checkTurnOffMainNavTop, menutimeout);

function turnOnMainNavTop(index)
{
	if (index != -1)
	{
		for (var i = 0; i < index; i++)
		{
			turnOff(topnavtext[i][0], topPath);
		}
		turnOn(topnavtext[index][0], topnavtext[index][1], topPath);
		for (var i = index + 1; i < topnavtext.length; i++)
		{
			turnOff(topnavtext[i][0], topPath);
		}
	}
}

function subMenuSwap(index)
{
	var objects = document.getElementsByTagName("a");
	for (var i = 0; i < objects.length; i++)
	{
		if (objects[i].name.indexOf("mainnavbottomtext") != -1)
		{
			var name = objects[i].name;
			var subindex = name.charAt(name.length - 1);
			if (subindex >= subMenu[index].length)
			{
				objects[i].innerHTML = "";
				objects[i].href = "";
				objects[i].id = "mainnavbottomlinkempty";	//This keeps the subMenu options centered in the subMenu area.
			}
			else
			{
				objects[i].innerHTML = subMenu[index][subindex][0];
				objects[i].href = subMenu[index][subindex][1];
				objects[i].id = "mainnavbottomlink" + (index == subMenu.length - 1 ? "empty" : "");	//index has to be that of home, which has no subelements.
			}
		}
	}
}

function land(selection, target)
{
	lowtarget = target.toLowerCase();
	if (lowtarget == "_self")
	{
		window.location = loc;
	}
	else
	{
		if (lowtarget == "_top")
		{
			top.location = loc;
		}
		else
		{
			if (lowtarget == "_blank")
			{
				window.open(loc);
			}
			else
			{
				if (lowtarget == "_parent")
				{
					parent.location = loc;
				}
				else
				{
					parent.frames[target].location = loc;
				}
			}
		}
	}
}

function jump(menu)
{
	selection = menu.dropdown.options[menu.dropdown.selectedIndex].value;
	splitc = selection.lastIndexOf("*");
	target = "";
	if (splitc != -1)
	{
		loc = selection.substring(0, splitc);
		target = selection.substring(splitc + 1, 1000);
	}
	else
	{
		loc = selection;
		target = "_self";
	}
	if (selection != "")
	{
		land(loc, target);
	}
}

function openwindowchromeless(url, w, h)
{
	var top = (screen.availHeight - h) / 2;
	var left = (screen.availWidth - w) / 2;
	window.open(url, '', 'dependent = 0, toolbar = 0, location = 0, status = 0, menubar = 0, scrollbars = 0, directories = 0, top = ' + top + ', left = ' + left + ', resizable = 0, width = ' + w + ', height = ' + h + '');
}

function emailArticle()
{
	day = new Date();
	id = day.getTime();
	URL = '/includes/scripts/EmailArticle.aspx';
	var page = location.href;
	var title = document.title;
	eval("page" + id + " = window.open(URL + '?url=' + page + '&title=' + title, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,margins=0, resizable=0,maximize=0,fullscreen=0,width=420,height=400,');");
}

function openAudioPlayer(url)
{
	var audioPlayer = window.open(url, 'audioPlayer' + Math.random().toString().substring(2, 5), 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,margins=0,resizable=0,maximize=0,fullscreen=0,width=500,height=650');
}

//-->