			// -------------------------------------------------------------------
			// BROWSER DETECTION
			// -------------------------------------------------------------------
	    // convert all characters to lowercase to simplify testing
	    var agt=navigator.userAgent.toLowerCase();

	    // *** BROWSER VERSION ***
	    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
	    var is_major = parseInt(navigator.appVersion);
	    var is_minor = parseFloat(navigator.appVersion);

	    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
	    // If you want to allow spoofing, take out the tests for opera and webtv.
	    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
	    //var is_nav2 = (is_nav && (is_major == 2));
	    //var is_nav3 = (is_nav && (is_major == 3));
	    var is_nav4 = (is_nav && (is_major == 4));
	    //var is_nav4up = (is_nav && (is_major >= 4));
	    //var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
	    //var is_nav6 = (is_nav && (is_major == 5));
	    var is_nav6up = (is_nav && (is_major >= 5));
	    //var is_gecko = (agt.indexOf('gecko') != -1);

	    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	    //var is_ie3    = (is_ie && (is_major < 4));
	    //var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
	    var is_ie4up  = (is_ie && (is_major >= 4));
	    //var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
	    //var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
	    //svar is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
	    //var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
			// -------------------------------------------------------------------

			// -------------------------------------------------------------------
			// DHTML MENU: GLOBALS
			// -------------------------------------------------------------------
			window.onerror = null;			// turn off error handling.
			var menu_item_active = 0;		// flag when a menu item is active.
			var my_timer = null;				// has a timer been set? i.e. is it during a set timeout?
			var l_ref;									// layer reference, IE/NS.
			var l_style;								// layer style property, IE/NS.
			var l_show;									// layer show property, IE/NS. 
			var l_hide;									// layer hide property, IE/NS. 
			var layer_is_on;						// name of the layer which is currently on.
			var time_delay = 600;				// delay of menu hiding.
			// how to reference the layer.
			if (is_nav6up) {
				l_ref = "document.getElementById";
				l_style = ".style";
				l_show = "visible";
				l_hide = "hidden";
			}
			else if (is_nav4) {
				l_ref = "document.layers";
				l_style = "";
				l_show = "show";
				l_hide = "hide";
			}
			else if (is_ie4up) {
			 	l_ref = "document.all";
			 	l_style = ".style";
				l_show = "visible";
				l_hide = "hidden";
			}
			// set timer to default.
			var hidetimer = 0;
			// -------------------------------------------------------------------


			// -------------------------------------------------------------------
			// DHTML MENU: SHOW/HIDE LAYERS
			// -------------------------------------------------------------------

			// show/hide menus.
			function toggle_visibility(to_show, name) {
				// decide if calling event is showing or hiding the menu.
				var s;
				if (to_show)
					s = l_show;			// show the menu.
				else
					s = l_hide;			// hide the menu.

				if (my_timer != null) {
					clearTimeout(my_timer);
					if (is_nav6up) 
						eval(l_ref + '("' + layer_is_on + '")' + l_style + '.visibility="' + l_hide + '"');
					else
						eval(l_ref + '["' + layer_is_on + '"]' + l_style + '.visibility="' + l_hide + '"');
				}
					
				if (name != "") {
					if (is_nav6up){
						eval(l_ref + '("' + name + '")' + l_style + '.visibility="' + s + '"');
						layer_is_on = name;	
					}	
					else {
						eval(l_ref + '["' + name + '"]' + l_style + '.visibility="' + s + '"');
						layer_is_on = name;		
					}	
				}
			}

			// hide all the menus.
	    function hide_other_menu() {
				toggle_visibility(false, "");
	    }

			// -------------------------------------------------------------------


			// -------------------------------------------------------------------
			// DHTML MENU ITEM: MOUSE OVER
			// -------------------------------------------------------------------
			
			// mouse over  - reset timeout, show that a menu is active.
			function menu_item_over() {
				clearTimeout(my_timer)
				menu_item_active = 1;
			}
			//------------------------------------------------------


			// -------------------------------------------------------------------
			// DHTML MENU ITEM: MOUSE OUT
			// -------------------------------------------------------------------

			// menu mouse out, menu is no longer active, 
			function menu_item_out() {
				menu_item_active = 0 
				my_timer = setTimeout('toggle_visibility(false, "' + layer_is_on + '")', time_delay);

			}
			// -------------------------------------------------------------------


			// -------------------------------------------------------------------
			// DHTML MENU HEADER: MOUSE OUT
			// -------------------------------------------------------------------
			
			// timer for button mouse out
			function header_out_timer() {	
			 	my_timer = setTimeout("header_out()", time_delay);
			}

			// BUTTON MOUSE OUT
			function header_out() {
				if (menu_item_active == 0)
					hide_other_menu();

			}
			// -----------------------------------------------------------------
			// rollover function
			// ------------------
      function swapImage(img_name,img_src) {
        document[img_name].src=img_src;
      }



