var preloaded = [];

		// here is a lame preloading script i am putting in just for demonstration
		for (var i = 1; i <= 6; i++) {
			preloaded[i] = [loadImage(i + "-0.gif"), loadImage(i + "-1.gif")];
		}
		
		function init() {
			//==========================================================================================
			// if supported, initialize TransMenus
			//==========================================================================================
			// 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 (TransMenu.isSupported()) {
				TransMenu.initialize();

				// hook all the highlight 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.


				//  * * *  Begin Additions and Modifications by Brian Sexton at WebEnertia


				var request = new String(document.location).replace(/^http:\/\/[^\/]*/gi, '');


				if (request == '/' || request == '/index.html')
				{

					document.getElementById('button1').src = preloaded[1][1].src;


					//  * * *  The following lines prevent empty menus from
					//  * * *  reverting their event handlers.

					//  * * *  Note that nullifying the handlers does not always
					//  * * *  work (they may be nullified then reset).

					document.getElementById('menu1').onmouseover = function() {};
					document.getElementById('menu1').onmouseout = function() {};

				}


				if (request.match(/^\/about_us/)) 
				{ 

				    document.getElementById('button2').src = preloaded[2][1].src;


					

					document.getElementById('menu2').onmouseover = function() {};
					document.getElementById('menu2').onmouseout = function() {};

                }
				
				if (request.match(/^\/corporate_events/)) 
				{ document.getElementById('button3').src = preloaded[3][1].src; 
				
				  document.getElementById('menu3').onmouseover = function() {};
				  document.getElementById('menu3').onmouseout = function() {};
				
				
				}

				


				if (request.match(/^\/social_events/)) 
				{ document.getElementById('button4').src = preloaded[4][1].src;
				  
				  document.getElementById('menu4').onmouseover = function() {};
				  document.getElementById('menu4').onmouseout = function() {};
				
				
				 }

				


				if (request.match(/^\/style_consultation/)) 
				{ document.getElementById('button5').src = preloaded[5][1].src; 
				
				  document.getElementById('menu5').onmouseover = function() {};
				  document.getElementById('menu5').onmouseout = function() {};
				
				}

				


				if (request.match(/^\/contact_us/)) 
				{ document.getElementById('button6').src = preloaded[6][1].src; 
				  
				  document.getElementById('menu6').onmouseover = function() {};
				  document.getElementById('menu6').onmouseout = function() {};
				
				}

				


				




				//  * * *  End Additions and Modifications by Brian Sexton at WebEnertia


				}
		}

		
		function loadImage(sFilename) {
			var img = new Image();
			img.src ="/_media/images/nav/" + sFilename;
			return img;
		}

		
		function swapImage(imgName, sFilename) {
			document.images[imgName].src = sFilename;
		}