
		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()) {
				
				//alert(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("nav_programs", "nav_programs", "_over") };
			    menu1.ondeactivate = function() { swapImage("nav_programs", "nav_programs", "") };				
		
			    //menu15.onactivate = function() { swapImage("nav_areasofstudy", "nav_areasofstudy", "_over") };
			    //menu15.ondeactivate = function() { swapImage("nav_areasofstudy", "nav_areasofstudy", "") };				
			
			    menu23.onactivate = function() { swapImage("nav_nuonlinelearning", "nav_nuonlinelearning", "_over") };
			    menu23.ondeactivate = function() { swapImage("nav_nuonlinelearning", "nav_nuonlinelearning", "") };				
		
			    menu22.onactivate = function() { swapImage("nav_international", "nav_international", "_over") };
			    menu22.ondeactivate = function() { swapImage("nav_international", "nav_international", "") };						
			
			    menu27.onactivate = function() { swapImage("nav_registration", "nav_registration", "_over") };
			    menu27.ondeactivate = function() { swapImage("nav_registration", "nav_registration", "") };						
			
			    menu30.onactivate = function() { swapImage("nav_admissions", "nav_admissions", "_over") };
			    menu30.ondeactivate = function() { swapImage("nav_admissions", "nav_admissions", "") };
					
				menu18.onactivate = function() { swapImage("nav_alumni", "nav_alumni", "_over") };
			    menu18.ondeactivate = function() { swapImage("nav_alumni", "nav_alumni", "") };
			    
			    menu13.onactivate = function() { swapImage("nav_student-services", "nav_student-services", "_over") };
			    menu13.ondeactivate = function() { swapImage("nav_student-services", "nav_student-services", "") };
			   
			    menu14.onactivate = function() { swapImage("nav_spcs", "nav_spcs", "_over") };
			    menu14.ondeactivate = function() { swapImage("nav_spcs", "nav_spcs", "") };
				
			}
		}


		function loadImage(sFilename) {
			var img = new Image();
			img.src ="/cps/images/" + sFilename;
			
			return img;
		}

		function swapImage(imgName, sFilename, mouseEvent) {
			thisImgSrc = document.images[imgName].src
			
			if (thisImgSrc.indexOf("_on") != -1){
                document.images[imgName].src = "/cps/images/" + sFilename + "_on" + mouseEvent + ".gif"
            }else {
                document.images[imgName].src = "/cps/images/" + sFilename + mouseEvent + ".gif"
            }
			 
			
		}
		