		var preloaded = [];

		// here is a lame preloading script i am putting in just for demonstration
		/*
		for (var i = 1; i <= 9; i++) {
			preloaded[i] = [loadImage("bt"+ i + "_f.gif"), loadImage("bt" + i + "_o.gif")];
		}
		*/

		function init() {
			// whatever stuff you need to do onload goes here.

			//==========================================================================================
			// if supported, initialize mtdropdowns
			//==========================================================================================
			// 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 (mtDropDown.isSupported()) {
				mtDropDown.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("button1", preloaded[1][1].src) };
				menu1.ondeactivate = function() { swapImage("button1", preloaded[1][0].src) };

				menu2.onactivate = function() { swapImage("button2", preloaded[2][1].src) };
				menu2.ondeactivate = function() { swapImage("button2", preloaded[2][0].src) };
				*/
/*
				menu3.onactivate = function() { swapImage("button3", preloaded[3][1].src) };
				menu3.ondeactivate = function() { swapImage("button3", preloaded[3][0].src) };

				menu4.onactivate = function() { swapImage("button4", preloaded[4][1].src) };
				menu4.ondeactivate = function() { swapImage("button4", preloaded[4][0].src) };

				menu5.onactivate = function() { swapImage("button5", preloaded[5][1].src) };
				menu5.ondeactivate = function() { swapImage("button5", preloaded[5][0].src) };
				
				menu7.onactivate = function() { swapImage("button7", preloaded[7][1].src) };
				menu7.ondeactivate = function() { swapImage("button7", preloaded[7][0].src) };
								
				menu9.onactivate = function() { swapImage("button9", preloaded[9][1].src) };
				menu9.ondeactivate = function() { swapImage("button9", preloaded[9][0].src) };
				*/
			}
		}

		// this is a crappy example preloader. Use whichever one you want.
		function loadImage(sFilename) {
			var img = new Image();
			img.src ="img/" + sFilename;
			return img;
		}

		// this is a crappy example image swapper. Use whichever you want.
		function swapImage(imgName, sFilename) {
			document.images[imgName].src = sFilename;
		}
		
//-----------------------------------------------------------------
if (navigator.userAgent.indexOf("Mozilla/4.0") != -1) {
	version = 4;
} else if (navigator.userAgent.indexOf("Mozilla/3.0") != -1) {
	version = 3;
} else if (navigator.userAgent.indexOf("Mozilla/2.0") != -1) {
	version = 2;
} else if (navigator.userAgent.indexOf("MSIE") != -1) {
	version = 1;
} else {
	version = 0;
}

var zoomwindow;

function popup (url,width,height) {

	scr_x = screen.width;
	scr_y = screen.height;
	
	if(screen.width > 800){
		newx = (scr_x-600)/2;
		newy = (scr_y-400)/2;
	}
	else {
		newx = (scr_x/2)-200;
		newy = (scr_y/2)-150;
	}
	
	
	var features;
	features = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,fullscreen=0,width=" + width + ",height=" + height + ",top="+newy+",left="+newx+"'";
	if (zoomwindow != null) {
		if (!zoomwindow.closed)
			zoomwindow.close();
	}
	zoomwindow = window.open(url,"ZOOMWINDOW",features);
	if (version == 3 || version == 4) {
		zoomwindow.focus();
	}
}

function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
