imag = new Array()
imag[0] = "/graphics/navigation/about_tarc.gif"
imag[1] = "/graphics/navigation/about_tarc2.gif"
imag[2] = "/graphics/navigation/regional_councils.gif"
imag[3] = "/graphics/navigation/regional_councils2.gif"
imag[4] = "/graphics/navigation/citizen_corps.gif"
imag[5] = "/graphics/navigation/citizen_corps2.gif"
imag[6] = "/graphics/navigation/comm_econ.gif";
imag[7] = "/graphics/navigation/comm_econ2.gif";
imag[8] = "/graphics/navigation/ep.gif"
imag[9] = "/graphics/navigation/ep2.gif"
imag[10] = "/graphics/navigation/assoc_memb.gif"
imag[11] = "/graphics/navigation/assoc_memb2.gif"
imag[12] = "/graphics/navigation/calendar.gif"
imag[13] = "/graphics/navigation/calendar2.gif"
imag[14] = "/graphics/navigation/news.gif"
imag[15] = "/graphics/navigation/news2.gif"
imag[16] = "/graphics/navigation/references.gif"
imag[17] = "/graphics/navigation/references2.gif"
imag[18] = "/graphics/navigation/jobs.gif"
imag[19] = "/graphics/navigation/jobs2.gif"
imag[20] = "/graphics/navigation/links.gif"
imag[21] = "/graphics/navigation/links2.gif"
imag[22] = "/graphics/navigation/bulletin_board.gif"
imag[23] = "/graphics/navigation/bulletin_board2.gif"
imag[24] = "/graphics/navigation/home.gif"
imag[25] = "/graphics/navigation/home2.gif"
imag[26] = "/graphics/navigation/cc_home.gif";
imag[27] = "/graphics/navigation/cc_home2.gif";
imag[28] = "/graphics/navigation/cc_programs.gif";
imag[29] = "/graphics/navigation/cc_programs2.gif";
imag[30] = "/graphics/navigation/cc_conference.gif";
imag[31] = "/graphics/navigation/cc_conference2.gif";
imag[32] = "/graphics/navigation/cert_training.gif";
imag[33] = "/graphics/navigation/cert_training2.gif";
imag[34] = "/graphics/navigation/cc_grant.gif";
imag[35] = "/graphics/navigation/cc_grant2.gif";
imag[36] = "/graphics/navigation/cc_highlights.gif";
imag[37] = "/graphics/navigation/cc_highlights2.gif";
imag[38] = "/graphics/navigation/contact.gif";
imag[39] = "/graphics/navigation/contact2.gif";




/*
Author:
  Dana A. Fillhart  (aka Galaphine Harrow)
  Copyright (c) 1996, All rights reserved.
  THIS JAVASCRIPT IS COPYRIGHT Dana A. Fillhart (c) 1996.
  PERMISSION IS GRANTED TO FREELY USE AND DISTRIBUTE THIS, SO LONG AS IT
  REMAINS UNCHANGED
  (EXCEPT WHERE FILENAMES, URLS, and VARIABLE INPUTS NEED MODIFYING).
  If you DO feel like modifying it, feel free; just be kind enough to mention
  this original SCRIPT as a reference point...and also be kind enough to pass along the
  results to me--I'm _always_ looking for better ways to do the things I do :)
ImageSwitch Script 1.4 Created 8-23-96, Last Modified from 1.3 9-5-96 (c)
Dana A. Fillhart
Changes since 1.3:
  -- The SCRIPT now allows you to switch ANY image by passing it the NAME
     defined in
     its IMG tag.  No need for the IF-THENs in Multi-ImageSwitch; this
     SCRIPT does it all :)
  -- Revamped it; now you don't have to mess with anything here.
     You still have to change on the calling page the MAP AREA tag's COORDS,
     and (of course) give the imag[] array all the images you wish to
     switch, and now you just pass, in the AREA tag, the name of the image in the
     IMG tag you wish to switch...on the calling page
*/


function swtch(num,imgname)
	{
    imgname.src = im[num].src
	}
//
//Images can be of differing sizes, but the defined MAP AREA of the new
//image does not currently change to reflect the new image's size.
//(Planned for future revision :)
//
//In your MAP AREA definition, be SURE to change the COORDS to match the size
//of the images.  Also, since this uses the USEMAP, if you click on the image,
//it will take you to the URL given in the HREF in the <MAP> tag, so leave it
//as it is if you don't want it to take you anywhere.
//


im = new Array()
for (var i = 0; i < imag.length; i++)
	{
    im[i] = new Image()
    im[i].src = imag[i]
	}

function MM_displayStatusMsg(msgStr)  
	{ //v3.0
    status=msgStr; document.MM_returnValue = true;
	}

function MM_findObj(n, d) 
	{ //v3.0
	var p,i,x;  
	if (!d) 
		d=document; 

	if ((p=n.indexOf("?")) > 0 && parent.frames.length) 
		{
    	d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
		}

	if (!(x=d[n]) && d.all) 
		x=d.all[n]; 

	for (i = 0; !x && i < d.forms.length; i++) 
		x=d.forms[i][n];

	for (i = 0; !x && d.layers && i < d.layers.length; i++) 
		{		
		x=MM_findObj(n,d.layers[i].document); 
		}

	return x;
	}

function MM_swapImage() 
	{ //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; 
	document.MM_sr=new Array; 
	
	for (i = 0; i < (a.length-2); i+=3)
		{
		if ((x=MM_findObj(a[i])) != null)
			{
			document.MM_sr[j++] = x; 

			if(!x.oSrc) 
				x.oSrc=x.src; 
				x.src=a[i+2];
			}
		}
	}

function MM_swapImgRestore() 
	{ //v3.0
	var i,x,a=document.MM_sr; 
	for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) 
		{		
		x.src=x.oSrc;
		}
	}
	
function fwLoadMenus() 
	{
	if (window.fw_menu_0) 
		return;
window.fw_menu_0 = new Menu("root",150,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_0.addMenuItem("About the Association","location='/display.php?page=about_tarc.php'");
  fw_menu_0.addMenuItem("TARC Officers","location='/display.php?page=officers.php'");
  fw_menu_0.addMenuItem("TARC Staff","location='/display.php?page=staff.php'");
  fw_menu_0.addMenuItem("Map and Directions","location='/display.php?page=directions.php'");
   fw_menu_0.hideOnMouseOut=true;
window.fw_menu_1 = new Menu("root",150,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_1.addMenuItem("Map of Regions","location='/display.php?page=regions_map.php'"); 
  fw_menu_1.addMenuItem("Alphabetical List of Regions","location='/display.php?page=regions_map.php'"); 
   fw_menu_1.hideOnMouseOut=true;
window.fw_menu_2 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_2.addMenuItem("Citizen Corps","location='/display.php?page=cc\/citizen_corps.php&sub=cc'");
  fw_menu_2.addMenuItem("Citizen Corps Programs","location='/display.php?page=cc\/cc_programs.php&sub=cc'");
  fw_menu_2.addMenuItem("Conference","location='/display.php?page=cc\/conf\/index.php&sub=cc'");
  fw_menu_2.addMenuItem("CERT Training","location='/display.php?page=cc\/cert_training.php&sub=cc'");
  fw_menu_2.addMenuItem("Grant Information","location='/display.php?page=cc\/cc_grant.php&sub=cc'");
  fw_menu_2.addMenuItem("Calendar","location='/display.php?page=cc\/calendar.php&sub=cc'");
  fw_menu_2.addMenuItem("Highlights","location='/display.php?page=cc\/highlights.php&sub=cc'");
  fw_menu_2.addMenuItem("Bulletin Board","location='/cgi/discus/discus.cgi'");
  fw_menu_2.addMenuItem("Contact Information","location='/display.php?page=cc\/contact.php&sub=cc'");
  fw_menu_2.addMenuItem("Links","location='/display.php?page=cc\/links.php&sub=cc'");
   fw_menu_2.hideOnMouseOut=true;
//window.fw_menu_3 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  // fw_menu_3.hideOnMouseOut=true;
window.fw_menu_4 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_4.addMenuItem("COG Staff Directory","location='/display.php?page=ep/directory.php'");
	fw_menu_4.addMenuItem("Emergency Preparedness Forum","location='http://tarchsat.ning.com/main/authorization/signIn?target=http%3A%2F%2Ftarchsat.ning.com%2F'");
	fw_menu_4.addMenuItem("Resource Guide","location='/display.php?page=ep/resources.php'");
	fw_menu_4.addMenuItem("News and Information","location='/display.php?page=ep/news.php'");
  fw_menu_4.addMenuItem("References and Links","location='/display.php?page=ep/links.php'");	
  fw_menu_4.addMenuItem("NIMS","location='/display.php?page=ep/nims.php'"); 
  fw_menu_4.addMenuItem("PreparingTexas.org","location='https://www.preparingtexas.org/index.aspx'");
   fw_menu_4.hideOnMouseOut=true;
window.fw_menu_5 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_5.addMenuItem("Associate Member Listing","location='/display.php?page=assoc_memb.php'");
  fw_menu_5.addMenuItem("Becoming an Associate Member","location='/display.php?page=assoc_memb_info.php'");
   fw_menu_5.hideOnMouseOut=true;
  window.fw_menu_6 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_6.addMenuItem("Meetings and Conference News","location='/display.php?page=meetings_conferences.php'");
  fw_menu_6.addMenuItem("Texas Conference on Regionalism","location='/display.php?page=conf/index.php'");
  fw_menu_6.addMenuItem("Quarterly Meetings","location='/display.php?page=quarterly.php'");
  fw_menu_6.addMenuItem("Texas Citizen Corps Conference","location='/display.php?page=cc/conf/index.php&sub=cc'");
   fw_menu_6.hideOnMouseOut=true;
  window.fw_menu_7 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_7.addMenuItem("Local Councils","location='/display.php?page=cc/local_councils.php&sub=cc'");
  fw_menu_7.addMenuItem("State Council","location='/display.php?page=cc/state_council.php&sub=cc'");
   fw_menu_7.hideOnMouseOut=true;
  window.fw_menu_8 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_8.addMenuItem("CERT","location='/display.php?page=cc/cert.php&sub=cc'");
  fw_menu_8.addMenuItem("Volunteers in Police Service","location='/display.php?page=cc/vip.php&sub=cc'");
  fw_menu_8.addMenuItem("Medical Reserve Corps","location='/display.php?page=cc/mrc.php&sub=cc'");
  fw_menu_8.addMenuItem("Neighborhood Watch","location='/display.php?page=cc/nw.php&sub=cc'");
  fw_menu_8.addMenuItem("Fire Corps","location='/display.php?page=cc/fire_corps.php&sub=cc'");
   fw_menu_8.hideOnMouseOut=true;
  window.fw_menu_9 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_9.addMenuItem("Main Conference Page","location='/display.php?page=cc/conf/index.php&sub=cc'");
  //fw_menu_9.addMenuItem("Delegate Registration","location='/display.php?page=cc/conf/delegate_regis.php&sub=cc'");
  //fw_menu_9.addMenuItem("Exhibitor Registration","location='/display.php?page=cc/conf/vendor_regis.php&sub=cc'");
  //fw_menu_9.addMenuItem("Conference Hotel Information","location='/display.php?page=cc/conf/hotel.php&sub=cc'");
  //fw_menu_9.addMenuItem("2007 Conference Presentations","location='/display.php?page=cc/conf/presentations.php&sub=cc'");
   fw_menu_9.hideOnMouseOut=true;
  window.fw_menu_10 = new Menu("root",200,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_10.addMenuItem("Training Schedule","location='/display.php?page=cc/cert_training.php&sub=cc'");
  fw_menu_10.addMenuItem("Basic G317 Course Description","location='/display.php?page=cc/basic_g317.php&sub=cc'");
  fw_menu_10.addMenuItem("Train-the-Trainer Course Description","location='/display.php?page=cc/ttt_course.php&sub=cc'");
  fw_menu_10.addMenuItem("Train-the-Trainer Course Regis Info","location='/display.php?page=cc/ttt_regis.php&sub=cc'");
   fw_menu_10.hideOnMouseOut=true;
  window.fw_menu_11 = new Menu("root",175,15,"Arial, Helvetica, sans-serif",10,"#ffffff","4E5AAB","4E5AAB","#CCD9E0");
  fw_menu_11.addMenuItem("About TARC","location='/display.php?page=about_tarc.php'");
  fw_menu_11.addMenuItem("Regional Councils","location='/display.php?page=regions_map.php'");
  fw_menu_11.addMenuItem("Citizen Corps","location='/display.php?page=cc/index.php&sub=cc'");
  fw_menu_11.addMenuItem("Community & Economic Development","location='/display.php?page=comm_econ.php'");
  fw_menu_11.addMenuItem("Emergency Preparedness","location='/display.php?page=ep/index.php'");
  fw_menu_11.addMenuItem("Associate Members","location='/display.php?page=assoc_memb.php'");
  fw_menu_11.addMenuItem("Calendar","location='/display.php?page=calendar.php'");
  fw_menu_11.addMenuItem("News","location='/display.php?page=news.php'");
  fw_menu_11.addMenuItem("References","location='/display.php?page=references.php'");
  fw_menu_11.addMenuItem("Jobs","location='/display.php?page=jobs.php'");
  fw_menu_11.addMenuItem("Links","location='/display.php?page=links.php'");
  fw_menu_11.addMenuItem("Bulletin Board","location='/cgi-bin/discus/discus.cgi'");
   fw_menu_11.hideOnMouseOut=true;
fw_menu_11.writeMenus();
	} // fwLoadMenus()


/**
 * fw_menu 24OCT2000 Version 4.0
 * John Ahlquist, October 2000
 * Copyright (c) 2000 Macromedia, Inc.
 *
 * based on menu.js
 * by gary smith, July 1997
 * Copyright (c) 1997-1999 Netscape Communications Corp.
 *
 * Netscape grants you a royalty free license to use or modify this
 * software provided that this copyright notice appears on all copies.
 * This software is provided "AS IS," without a warranty of any kind.
 */
function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh) {
	this.version = "990702 [Menu; menu.js]";
	this.type = "Menu";
	this.menuWidth = mw;
	this.menuItemHeight = mh;
	this.fontSize = fs||10;
	this.fontWeight = "plain";
	this.fontFamily = fnt||"arial,helvetica,verdana,sans-serif";
	this.fontColor = fclr||"#ffffff";
	this.fontColorHilite = fhclr||"#ffffff";
	this.bgColor = "#4E5AAB";
	this.menuBorder = 1;
	this.menuItemBorder = 1;
	this.menuItemBgColor = bg||"#4E5AAB";
	this.menuLiteBgColor = "#4E5AAB";
	this.menuBorderBgColor = "#4E5AAB";
	this.menuHiliteBgColor = bgh||"#CCD9E0";
	this.menuContainerBgColor = "#4E5AAB";
	this.childMenuIcon = "/graphics/navigation/arrow.gif";
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();

	this.hideOnMouseOut = true;

	this.addMenuItem = addMenuItem;
	this.addMenuSeparator = addMenuSeparator;
	this.writeMenus = writeMenus;
	this.FW_showMenu = FW_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;

	if (!window.menus) window.menus = new Array();
	this.label = label || "menuLabel" + window.menus.length;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();
}

function addMenuItem(label, action) {
	this.items[this.items.length] = label;
	this.actions[this.actions.length] = action;
}

function addMenuSeparator() {
	this.items[this.items.length] = "separator";
	this.actions[this.actions.length] = "";
	this.menuItemBorder = 0;
}

// For NS6. 
function FIND(item) {
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}

function writeMenus(container) {
	if (window.triedToWriteMenus) 
		return;

	if (!container && document.layers) 
		{
		window.delayWriteMenus = this.writeMenus;
		var timer = setTimeout('delayWriteMenus()', 3000);
		container = new Layer(100);
		clearTimeout(timer);
		} 
	else if (document.all || document.hasChildNodes) 
		{
		document.writeln('<SPAN ID="menuContainer"></SPAN>');
		container = FIND("menuContainer");
		}

	window.fwHideMenuTimer = null;
	if (!container) return;	
	window.triedToWriteMenus = true; 
	container.isContainer = true;
	container.menus = new Array();
	for (var i=0; i<window.menus.length; i++) 
		container.menus[i] = window.menus[i];
	window.menus.length = 0;
	var countMenus = 0;
	var countItems = 0;
	var top = 0;
	var content = '';
	var lrs = false;
	var theStat = "";
	var tsc = 0;
	if (document.layers) lrs = true;
	for (var i=0; i<container.menus.length; i++, countMenus++) {
		var menu = container.menus[i];
		if (menu.bgImageUp) {
			menu.menuBorder = 0;
			menu.menuItemBorder = 0;
		}
		if (lrs) {
			var menuLayer = new Layer(100, container);
			var lite = new Layer(100, menuLayer);
			lite.top = menu.menuBorder;
			lite.left = menu.menuBorder;
			var body = new Layer(100, lite);
			body.top = menu.menuBorder;
			body.left = menu.menuBorder;
		} else {
			content += ''+
			'<DIV ID="menuLayer'+ countMenus +'" STYLE="position:absolute;z-index:1;left:10;top:'+ (i * 100) +';visibility:hidden;">\n'+
			'  <DIV ID="menuLite'+ countMenus +'" STYLE="position:absolute;z-index:1;left:'+ menu.menuBorder +';top:'+ menu.menuBorder +';visibility:hide;" onMouseOut="mouseoutMenu();">\n'+
			'	 <DIV ID="menuFg'+ countMenus +'" STYLE="position:absolute;left:'+ menu.menuBorder +';top:'+ menu.menuBorder +';visibility:hide;">\n'+
			'';
		}
		var x=i;
		for (var i=0; i<menu.items.length; i++) {
			var item = menu.items[i];
			var childMenu = false;
			var defaultHeight = menu.fontSize+6;
			var defaultIndent = menu.fontSize;
			if (item.label) {
				item = item.label;
				childMenu = true;
			}
			menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
			menu.menuItemIndent = menu.menuItemIndent || defaultIndent;
			var itemProps = 'font-family:' + menu.fontFamily +';font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + ';';
			if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';
			if (document.all) 
				itemProps += 'font-size:' + menu.fontSize + ';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);';
			else if (!document.layers) {
				itemProps += 'font-size:' + menu.fontSize + 'px;'; // zilla wants 12px.
			}
			var l;
			if (lrs) {
				l = new Layer(800,body);
			}
			var dTag	= '<DIV ID="menuItem'+ countItems +'" STYLE="position:absolute;left:0;top:'+ (i * menu.menuItemHeight) +';'+ itemProps +'">';
			var dClose = '</DIV>'
			if (menu.bgImageUp) {
				menu.menuBorder = 0;
				menu.menuItemBorder = 0;
				dTag	= '<DIV ID="menuItem'+ countItems +'" STYLE="background:url('+menu.bgImageUp+');position:absolute;left:0;top:'+ (i * menu.menuItemHeight) +';'+ itemProps +'">';
				if (document.layers) {
					dTag = '<LAYER BACKGROUND="'+menu.bgImageUp+'" ID="menuItem'+ countItems +'" TOP="'+ (i * menu.menuItemHeight) +'" style="' + itemProps +'">';
					dClose = '</LAYER>';
				}
			}
			var textProps = 'position:absolute;left:' + menu.menuItemIndent + ';top:1;';
			if (lrs) {
				textProps +=itemProps;
				dTag = "";
				dClose = "";
			}

			var dText	= '<DIV ID="menuItemText'+ countItems +'" STYLE="' + textProps + 'color:'+ menu.fontColor +';">'+ item +'&nbsp</DIV>\n<DIV ID="menuItemHilite'+ countItems +'" STYLE="' + textProps + 'top:1;color:'+ menu.fontColorHilite +';visibility:hidden;">'+ item +'&nbsp</DIV>';
			if (item == "separator") {
				content += ( dTag + '<DIV ID="menuSeparator'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n<DIV ID="menuSeparatorLite'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n' + dClose);
			} else if (childMenu) {
				content += ( dTag + dText + '<DIV ID="childMenu'+ countItems +'" STYLE="position:absolute;left:0;top:3;"><IMG SRC="'+ menu.childMenuIcon +'"></DIV>\n' + dClose);
			} else {
				content += ( dTag + dText + dClose);
			}
			if (lrs) {
				l.document.open("text/html");
				l.document.writeln(content);
				l.document.close();	
				content = '';
				theStat += "-";
				tsc++;
				if (tsc > 50) {
					tsc = 0;
					theStat = "";
				}
				status = theStat;
			}
			countItems++;  
		}
		if (lrs) {
			// focus layer
			var focusItem = new Layer(100, body);
			focusItem.visiblity="hidden";
			focusItem.document.open("text/html");
			focusItem.document.writeln("&nbsp;");
			focusItem.document.close();	
		} else {
		  content += '	  <DIV ID="focusItem'+ countMenus +'" STYLE="position:absolute;left:0;top:0;visibility:hide;" onClick="onMenuItemAction(null,this);">&nbsp;</DIV>\n';
		  content += '   </DIV>\n  </DIV>\n</DIV>\n';
		}
		i=x;
	}
	if (document.layers) {		
		container.clip.width = window.innerWidth;
		container.clip.height = window.innerHeight;
		container.onmouseout = mouseoutMenu;
		container.menuContainerBgColor = this.menuContainerBgColor;
		for (var i=0; i<container.document.layers.length; i++) {
			proto = container.menus[i];
			var menu = container.document.layers[i];
			container.menus[i].menuLayer = menu;
			container.menus[i].menuLayer.Menu = container.menus[i];
			container.menus[i].menuLayer.Menu.container = container;
			var body = menu.document.layers[0].document.layers[0];
			body.clip.width = proto.menuWidth || body.clip.width;
			body.clip.height = proto.menuHeight || body.clip.height;
			for (var n=0; n<body.document.layers.length-1; n++) {
				var l = body.document.layers[n];
				l.Menu = container.menus[i];
				l.menuHiliteBgColor = proto.menuHiliteBgColor;
				l.document.bgColor = proto.menuItemBgColor;
				l.saveColor = proto.menuItemBgColor;
				l.onmouseover = proto.onMenuItemOver;
				l.onclick = proto.onMenuItemAction;
				l.action = container.menus[i].actions[n];
				l.focusItem = body.document.layers[body.document.layers.length-1];
				l.clip.width = proto.menuWidth || body.clip.width + proto.menuItemIndent;
				l.clip.height = proto.menuItemHeight || l.clip.height;
				if (n>0) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder;
				l.hilite = l.document.layers[1];
				if (proto.bgImageUp) l.background.src = proto.bgImageUp;
				l.document.layers[1].isHilite = true;
				if (l.document.layers[0].id.indexOf("menuSeparator") != -1) {
					l.hilite = null;
					l.clip.height -= l.clip.height / 2;
					l.document.layers[0].document.bgColor = proto.bgColor;
					l.document.layers[0].clip.width = l.clip.width -2;
					l.document.layers[0].clip.height = 1;
					l.document.layers[1].document.bgColor = proto.menuLiteBgColor;
					l.document.layers[1].clip.width = l.clip.width -2;
					l.document.layers[1].clip.height = 1;
					l.document.layers[1].top = l.document.layers[0].top + 1;
				} else if (l.document.layers.length > 2) {
					l.childMenu = container.menus[i].items[n].menuLayer;
					l.document.layers[2].left = l.clip.width -13;
					l.document.layers[2].top = (l.clip.height / 2) -4;
					l.document.layers[2].clip.left += 3;
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
			}
			body.document.bgColor = proto.bgColor;
			body.clip.width  = l.clip.width +proto.menuBorder;
			body.clip.height = l.top + l.clip.height +proto.menuBorder;
			var focusItem = body.document.layers[n];
			focusItem.clip.width = body.clip.width;
			focusItem.Menu = l.Menu;
			focusItem.top = -30;
            focusItem.captureEvents(Event.MOUSEDOWN);
            focusItem.onmousedown = onMenuItemDown;
			menu.document.bgColor = proto.menuBorderBgColor;
			var lite = menu.document.layers[0];
			lite.document.bgColor = proto.menuLiteBgColor;
			lite.clip.width = body.clip.width +1;
			lite.clip.height = body.clip.height +1;
			menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
			menu.clip.height = body.clip.height + (proto.menuBorder * 3);
		}
	} else {
		if ((!document.all) && (container.hasChildNodes)) {
			container.innerHTML=content;
		} else {
			container.document.open("text/html");
			container.document.writeln(content);
			container.document.close();	
		}
		if (!FIND("menuLayer0")) return;
		var menuCount = 0;
		for (var x=0; x<container.menus.length; x++) {
			var menuLayer = FIND("menuLayer" + x);
			container.menus[x].menuLayer = "menuLayer" + x;
			menuLayer.Menu = container.menus[x];
			menuLayer.Menu.container = "menuLayer" + x;
			menuLayer.style.zIndex = 1;
		    var s = menuLayer.style;
			s.top = s.pixelTop = -300;
			s.left = s.pixelLeft = -300;

			var menu = container.menus[x];
			menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
			menuLayer.style.backgroundColor = menu.menuBorderBgColor;
			var top = 0;
			for (var i=0; i<container.menus[x].items.length; i++) {
				var l = FIND("menuItem" + menuCount);
				l.Menu = container.menus[x];
				if (l.addEventListener) { // ns6
					l.style.width = menu.menuItemWidth;	
					l.style.height = menu.menuItemHeight;
					l.style.top = top;
					l.addEventListener("mouseover", onMenuItemOver, false);
					l.addEventListener("click", onMenuItemAction, false);
					l.addEventListener("mouseout", mouseoutMenu, false);
				} else { //ie
					l.style.pixelWidth = menu.menuItemWidth;	
					l.style.pixelHeight = menu.menuItemHeight;
					l.style.pixelTop = top;
				}
				top = top + menu.menuItemHeight+menu.menuItemBorder;
				l.style.fontSize = menu.fontSize;
				l.style.backgroundColor = menu.menuItemBgColor;
				l.style.visibility = "inherit";
				l.saveColor = menu.menuItemBgColor;
				l.menuHiliteBgColor = menu.menuHiliteBgColor;
				l.action = container.menus[x].actions[i];
				l.hilite = FIND("menuItemHilite" + menuCount);
				l.focusItem = FIND("focusItem" + x);
				l.focusItem.style.pixelTop = l.focusItem.style.top = -30;
				var childItem = FIND("childMenu" + menuCount);
				if (childItem) {
					l.childMenu = container.menus[x].items[i].menuLayer;
					childItem.style.pixelLeft = childItem.style.left = menu.menuItemWidth -11;
					childItem.style.pixelTop = childItem.style.top =(menu.menuItemHeight /2) -4;
					//childItem.style.pixelWidth = 30 || 7;
					//childItem.style.clip = "rect(0 7 7 3)";
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
				var sep = FIND("menuSeparator" + menuCount);
				if (sep) {
					sep.style.clip = "rect(0 " + (menu.menuItemWidth - 3) + " 1 0)";
					sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;	
					sep.style.backgroundColor = menu.bgColor;
					sep = FIND("menuSeparatorLite" + menuCount);
					sep.style.clip = "rect(1 " + (menu.menuItemWidth - 3) + " 2 0)";
					sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;	
					sep.style.backgroundColor = menu.menuLiteBgColor;
					l.style.height = l.style.pixelHeight = menu.menuItemHeight/2;
					l.isSeparator = true
					top -= (menu.menuItemHeight - l.style.pixelHeight)
				} else {
					l.style.cursor = "hand"
				}
				menuCount++;
			}
			menu.menuHeight = top-1;
			var lite = FIND("menuLite" + x);
			var s = lite.style;
			s.height = s.pixelHeight = menu.menuHeight +(menu.menuBorder * 2);
			s.width = s.pixelWidth = menu.menuItemWidth + (menu.menuBorder * 2);
			s.backgroundColor = menu.menuLiteBgColor;

			var body = FIND("menuFg" + x);
			s = body.style;
			s.height = s.pixelHeight = menu.menuHeight + menu.menuBorder;
			s.width = s.pixelWidth = menu.menuItemWidth + menu.menuBorder;
			s.backgroundColor = menu.bgColor;

			s = menuLayer.style;
			s.width = s.pixelWidth  = menu.menuItemWidth + (menu.menuBorder * 4);
			s.height = s.pixelHeight  = menu.menuHeight+(menu.menuBorder*4);
		}
	}
	if (document.captureEvents) {	
		document.captureEvents(Event.MOUSEUP);
	}
	if (document.addEventListener) {	
		document.addEventListener("mouseup", onMenuItemOver, false);
	}
	if (document.layers && window.innerWidth) {
		window.onresize = NS4resize;
		window.NS4sIW = window.innerWidth;
		window.NS4sIH = window.innerHeight;
	}
	document.onmouseup = mouseupMenu;
	window.fwWroteMenu = true;
	status = "";
}

function NS4resize() {
	if (NS4sIW < window.innerWidth || 
		NS4sIW > window.innerWidth || 
		NS4sIH > window.innerHeight || 
		NS4sIH < window.innerHeight ) 
	{
		window.location.reload();
	}
}

function onMenuItemOver(e, l) {
	FW_clearTimeout();
	l = l || this;
	a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.document.bgColor = a.saveColor;
			if (a.hilite) a.hilite.visibility = "hidden";
			if (a.Menu.bgImageOver) {
				a.background.src = a.Menu.bgImageUp;
			}
			a.focusItem.top = -100;
			a.clicked = false;
		}
		if (l.hilite) {
			l.document.bgColor = l.menuHiliteBgColor;
			l.zIndex = 1;
			l.hilite.visibility = "inherit";
			l.hilite.zIndex = 2;
			l.document.layers[1].zIndex = 1;
			l.focusItem.zIndex = this.zIndex +2;
		}
		if (l.Menu.bgImageOver) {
			l.background.src = l.Menu.bgImageOver;
		}
		l.focusItem.top = this.top;
		l.Menu.hideChildMenu(l);
	} else if (l.style && l.Menu) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.Menu.bgImageUp) {
				a.style.background = "url(" + a.Menu.bgImageUp +")";;
			}
		} 
		if (l.isSeparator) return;
		l.style.backgroundColor = l.menuHiliteBgColor;
		l.zIndex = 1;  // magic IE 4.5 mac happy doohicky.	jba
		if (l.Menu.bgImageOver) {
			l.style.background = "url(" + l.Menu.bgImageOver +")";
		}
		if (l.hilite) {
			l.style.backgroundColor = l.menuHiliteBgColor;
			l.hilite.style.visibility = "inherit";
		}
		l.focusItem.style.top = l.focusItem.style.pixelTop = l.style.pixelTop;
		l.focusItem.style.zIndex = l.zIndex +1;
		l.Menu.hideChildMenu(l);
	} else {
		return; // not a menu - magic IE 4.5 mac happy doohicky.  jba
	}
	window.ActiveMenuItem = l;
}

function onMenuItemAction(e, l) {
	l = window.ActiveMenuItem;
	if (!l) return;
	hideActiveMenus();
	if (l.action) {
		eval("" + l.action);
	}
	window.ActiveMenuItem = 0;
}

function FW_clearTimeout()
{
	if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
	fwHideMenuTimer = null;
	fwDHFlag = false;
}
function FW_startTimeout()
{
	fwStart = new Date();
	fwDHFlag = true;
	fwHideMenuTimer = setTimeout("fwDoHide()", 500);
}

function fwDoHide()
{
	if (!fwDHFlag) return;
	var elapsed = new Date() - fwStart;
	if (elapsed < 500) {
		fwHideMenuTimer = setTimeout("fwDoHide()", 550-elapsed);
		return;
	}
	fwDHFlag = false;
	hideActiveMenus();
	window.ActiveMenuItem = 0;
}

function FW_showMenu(menu, x, y, child) {
	if (!window.fwWroteMenu) return;
	FW_clearTimeout();
	if (document.layers) {
		if (menu) {
			var l = menu.menuLayer || menu;
			l.left = 1;
			l.top = 1;
			hideActiveMenus();
			if (this.visibility) l = this;
			window.ActiveMenu = l;
		} else {
			var l = child;
		}
		if (!l) return;
		for (var i=0; i<l.layers.length; i++) { 			   
			if (!l.layers[i].isHilite) 
				l.layers[i].visibility = "inherit";
			if (l.layers[i].document.layers.length > 0) 
				FW_showMenu(null, "relative", "relative", l.layers[i]);
		}
		if (l.parentLayer) {
			if (x != "relative") 
				l.parentLayer.left = x || window.pageX || 0;
			if (l.parentLayer.left + l.clip.width > window.innerWidth) 
				l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
			if (y != "relative") 
				l.parentLayer.top = y || window.pageY || 0;
			if (l.parentLayer.isContainer) {
				l.Menu.xOffset = window.pageXOffset;
				l.Menu.yOffset = window.pageYOffset;
				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
				if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
			}
		}
		l.visibility = "inherit";
		if (l.Menu) l.Menu.container.visibility = "inherit";
	} else if (FIND("menuItem0")) {
		var l = menu.menuLayer || menu;	
		hideActiveMenus();
		if (typeof(l) == "string") {
			l = FIND(l);
		}
		window.ActiveMenu = l;
		var s = l.style;
		s.visibility = "inherit";
		if (x != "relative") 
			s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
		if (y != "relative") 
			s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
		l.Menu.xOffset = document.body.scrollLeft;
		l.Menu.yOffset = document.body.scrollTop;
	}
	if (menu) {
		window.activeMenus[window.activeMenus.length] = l;
	}
}

function onMenuItemDown(e, l) {
	var a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.eX = e.pageX;
			a.eY = e.pageY;
			a.clicked = true;
		}
    }
}

function mouseupMenu(e)
{
	hideMenu(true, e);
	hideActiveMenus();
	return true;
}

function mouseoutMenu()
{
	hideMenu(false, false);
	return true;
}


function hideMenu(mouseup, e) {
	var a = window.ActiveMenuItem;
	if (a && document.layers) {
		a.document.bgColor = a.saveColor;
		a.focusItem.top = -30;
		if (a.hilite) a.hilite.visibility = "hidden";
		if (mouseup && a.action && a.clicked && window.ActiveMenu) {
 			if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
				setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
			}
		}
		a.clicked = false;
		if (a.Menu.bgImageOver) {
			a.background.src = a.Menu.bgImageUp;
		}
	} else if (window.ActiveMenu && FIND("menuItem0")) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.Menu.bgImageUp) {
				a.style.background = "url(" + a.Menu.bgImageUp +")";;
			}
		}
	}
	if (!mouseup && window.ActiveMenu) {
		if (window.ActiveMenu.Menu) {
			if (window.ActiveMenu.Menu.hideOnMouseOut) {
				FW_startTimeout();
			}
			return(true);
		}
	}
	return(true);
}

function PxToNum(pxStr)
{ // pxStr == 27px, we want 27.
	if (pxStr.length > 2) {
		n = Number(pxStr.substr(0, pxStr.length-2));
		return(n);
	}
	return(0);
}

function hideChildMenu(hcmLayer) {
	FW_clearTimeout();
	var l = hcmLayer;
	for (var i=0; i < l.Menu.childMenus.length; i++) {
		var theLayer = l.Menu.childMenus[i];
		if (document.layers) {
			theLayer.visibility = "hidden";
		} else {
			theLayer = FIND(theLayer);
			theLayer.style.visibility = "hidden";
		}
		theLayer.Menu.hideChildMenu(theLayer);
	}

	if (l.childMenu) {
		var childMenu = l.childMenu;
		if (document.layers) {
			l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
			childMenu.zIndex = l.parentLayer.zIndex +1;
			childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top + l.Menu.menuItemHeight/3;
			if (childMenu.left + childMenu.clip.width > window.innerWidth) {
				childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.menuLayer.left + 15;
				l.Menu.container.clip.left -= childMenu.clip.width;
			} else {
				childMenu.left = l.parentLayer.left + l.parentLayer.clip.width  + l.Menu.menuLayer.left -5;
			}
			var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
			if (w > l.Menu.container.clip.width)  
				l.Menu.container.clip.width = w;
			var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
			if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
			l.document.layers[1].zIndex = 0;
			childMenu.visibility = "inherit";
		} else if (FIND("menuItem0")) {
			childMenu = FIND(l.childMenu);
			var menuLayer = FIND(l.Menu.menuLayer);
			var s = childMenu.style;
			s.zIndex = menuLayer.style.zIndex+1;
			if (document.all) { // ie case.
				s.pixelTop = l.style.pixelTop + menuLayer.style.pixelTop + l.Menu.menuItemHeight/3;
				s.left = s.pixelLeft = (menuLayer.style.pixelWidth) + menuLayer.style.pixelLeft -5;
			} else { // zilla case
				var top = PxToNum(l.style.top) + PxToNum(menuLayer.style.top) + l.Menu.menuItemHeight/3;
				var left = (PxToNum(menuLayer.style.width)) + PxToNum(menuLayer.style.left) -5;
				s.top = top;
				s.left = left;
			}
			childMenu.style.visibility = "inherit";
		} else {
			return;
		}
		window.activeMenus[window.activeMenus.length] = childMenu;
	}
}

function hideActiveMenus() {
	if (!window.activeMenus) return;
	for (var i=0; i < window.activeMenus.length; i++) {
		if (!activeMenus[i]) continue;
		if (activeMenus[i].visibility && activeMenus[i].Menu) {
			activeMenus[i].visibility = "hidden";
			activeMenus[i].Menu.container.visibility = "hidden";
			activeMenus[i].Menu.container.clip.left = 0;
		} else if (activeMenus[i].style) {
			var s = activeMenus[i].style;
			s.visibility = "hidden";
			s.left = -200;
			s.top = -200;
		}
	}
	if (window.ActiveMenuItem) {
		hideMenu(false, false);
	}
	window.activeMenus.length = 0;
}


