		var preloaded = [];

	
		for (var i = 1; i <= 6; i++) {
		    
			preloaded[i] = [loadImage(i + ".gif"), loadImage(i + "_over.gif")];
			//alert(preloaded[i][i]);
		}

		function init() {
			// whatever stuff you need to do onload goes here.

			//==========================================================================================
			// if supported, initialize dropdowns
			//==========================================================================================
			// Check isSupported() so that menus aren't accidentally sent to non-supporting browsers.
			// This is better than server-side checking because it will also catch browsers which would
			// normally support the menus but have javascript disabled.
			//
			// If supported, call initialize() and then hook whatever image rollover code you need to do
			// to the .onactivate and .ondeactivate events for each menu.
			//==========================================================================================
			if (DropDown.isSupported()) {
				DropDown.initialize();

				// hook all the image swapping of the main toolbar to menu activation/deactivation
				// instead of simple rollover to get the effect where the button stays hightlit until
				// the menu is closed.
				menu1.onactivate = function() { swapImage("AboutThomas", 1, "_over") };
				menu1.ondeactivate = function() { swapImage("AboutThomas", 1, "") };
				
				menu2.onactivate = function() { swapImage("Admissions", 2, "_over")};
				menu2.ondeactivate = function() { swapImage("Admissions", 2, "")};
				
				menu3.onactivate = function() { swapImage("Academics", 3, "_over") };
				menu3.ondeactivate = function() { swapImage("Academics", 3, "") };
				
				menu4.onactivate = function() { swapImage("StudentLife", 4, "_over") };
				menu4.ondeactivate = function() { swapImage("StudentLife", 4, "") };		
				
				menu5.onactivate = function() { swapImage("Athletics", 5, "_over") };
				menu5.ondeactivate = function() { swapImage("Athletics", 5, "") };		
				
				menu6.onactivate = function() { swapImage("SupportThomas", 6, "_over") };
				menu6.ondeactivate = function() { swapImage("SupportThomas", 6, "") };								
				

			}
		}


		function loadImage(sFilename) {
			var img = new Image();
			img.src ="/images/" + sFilename;
			
			return img;
		}


		function swapImage(imgName, sFilename, mouseEvent) {
			
			thisImgSrc = document.images[imgName].src
			
			if (thisImgSrc.indexOf("_on") != -1){
			    document.images[imgName].src = "/images/" + sFilename + "_on" + mouseEvent + ".gif"
			 }else {
			    document.images[imgName].src = "/images/" + sFilename + mouseEvent + ".gif"
			 }
			 
			
		}
		