		var preloaded = [];

		// image preload script
		for (var i = 1; i <= 7; i++) {
			preloaded[i] = [loadImage(i + "-0.gif"), loadImage(i + "-1.gif")];
		}

		function init() {
			// whatever stuff you need to do onload goes here.

			//==========================================================================================
			// if supported, initialize ncqdropdowns
			//==========================================================================================
			// 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 (ncqDropDown.isSupported()) {
				ncqDropDown.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 hightlighted until
				// the menu is closed.
				
				//menu1.onactivate = function() { alert("here") };
				//menu1.ondeactivate = function() { alert("here") };

				//Old way
				//menu1.onactivate = function() { swapImage("button1", preloaded[1][1].src) };
				//menu1.ondeactivate = function() { swapImage("button1", preloaded[1][0].src) };




				/*
				menu2.onactivate = function() { MM_swapImage('cariris','','images/cariris2.gif',1) };
				menu2.ondeactivate = function() { MM_swapImgRestore() };

				menu3.onactivate = function() { MM_swapImage('havainas','','images/havainas2.gif',1) };
				menu3.ondeactivate = function() { MM_swapImgRestore() };

				menu4.onactivate = function() { MM_swapImage('gurkees','','images/gurkees2.gif',1) };
				menu4.ondeactivate = function() { MM_swapImgRestore() };

				menu447.onactivate = function() { MM_swapImage('reef','','images/reef2.gif',1) };
				menu447.ondeactivate = function() { MM_swapImgRestore() };

				menu449.onactivate = function() { MM_swapImage('sanja','','images/sanja2.gif',1) };
				menu449.ondeactivate = function() { MM_swapImgRestore() };
				
				menu452.onactivate = function() { MM_swapImage('croc','','images/croc2.gif',1) };
				menu452.ondeactivate = function() { MM_swapImgRestore() };
				*/
			}
		}

		// preload script
		function loadImage(sFilename) {
			var img = new Image();
			img.src = contextPath + "images/nav_bar/" + sFilename;
			return img;
		}

		// image swapper script
		function swapImage(imgName, sFilename) {
			// If you click on a menu button, a page opens for the applicable section.
			// The default image for the menu button is highlighted, and should not change/swop
			// (make sure the image name ends with a '-on.', i.e. 'menu1-on.gif'
			if (document.images[imgName].src.indexOf("-on.") == -1) {
				document.images[imgName].src = sFilename;
			};
		}