
		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.
				if (thePage == "/index.php" || thePage == "/indexnew.php"){
					menu1.onactivate = function() { swapImage("navTechTrends", "navTechTrends", "Over") };
				    menu1.ondeactivate = function() { swapImage("navTechTrends", "navTechTrends", "") };				
			
				    menu2.onactivate = function() { swapImage("navNewsEvents", "navNewsEvents", "Over") };
				    menu2.ondeactivate = function() { swapImage("navNewsEvents", "navNewsEvents", "") };				
				
				    menu3.onactivate = function() { swapImage("navClients", "navClients", "Over") };
				    menu3.ondeactivate = function() { swapImage("navClients", "navClients", "") };				
			
				    menu4.onactivate = function() { swapImage("navCandidates", "navCandidates", "Over") };
				    menu4.ondeactivate = function() { swapImage("navCandidates", "navCandidates", "") };						
				
				    menu5.onactivate = function() { swapImage("navAboutFoothills", "navAboutFoothills", "Over") };
				    menu5.ondeactivate = function() { swapImage("navAboutFoothills", "navAboutFoothills", "") };						
				
				    menu6.onactivate = function() { swapImage("navOurProcess", "navOurProcess", "Over") };
				    menu6.ondeactivate = function() { swapImage("navOurProcess", "navOurProcess", "") };
					
				} else {
				    menu1.onactivate = function() { swapImage("innerNavTechTrends", "innerNavTechTrends", "Over") };
				    menu1.ondeactivate = function() { swapImage("innerNavTechTrends", "innerNavTechTrends", "") };				
			
				    menu2.onactivate = function() { swapImage("innerNavNewsEvents", "innerNavNewsEvents", "Over") };
				    menu2.ondeactivate = function() { swapImage("innerNavNewsEvents", "innerNavNewsEvents", "") };				
				
				    menu3.onactivate = function() { swapImage("innerNavClients", "innerNavClients", "Over") };
				    menu3.ondeactivate = function() { swapImage("innerNavClients", "innerNavClients", "") };				
			
				    menu4.onactivate = function() { swapImage("innerNavCandidates", "innerNavCandidates", "Over") };
				    menu4.ondeactivate = function() { swapImage("innerNavCandidates", "innerNavCandidates", "") };					
				
				    menu5.onactivate = function() { swapImage("innerNavAboutFoothills", "innerNavAboutFoothills", "Over") };
				    menu5.ondeactivate = function() { swapImage("innerNavAboutFoothills", "innerNavAboutFoothills", "") };					
				
				    menu6.onactivate = function() { swapImage("innerNavOurProcess", "innerNavOurProcess", "Over") };
				    menu6.ondeactivate = function() { swapImage("innerNavOurProcess", "innerNavOurProcess", "") };	
				}
				
			}
		}


		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"
            }
			 
			
		}
		