// IDDAmenus copyright 2003 - Philip Tardif and IDDA - all rights reserved
// IDDAmenus default values

arrowrton = new Image(8,8);
arrowrton.src = dir + "images/global/menu-arrow-rt-over.gif";	
arrowrtoff = new Image(8,8);
arrowrtoff.src = dir + "images/global/menu-arrow-rt-static.gif";	

arrowlton = new Image(8,8);
arrowlton.src = dir + "images/global/menu-arrow-lt-over.gif";	
arrowltoff = new Image(8,8);
arrowltoff.src = dir + "images/global/menu-arrow-lt-static.gif";	

var right_arrow = dir + "images/global/menu-arrow-rt-static.gif";
var left_arrow = dir + "images/global/menu-arrow-lt-static.gif";
var arrow_width = 8;
var arrow_height = 10;
var arrow_margin = 10;
var arrow_align = "right";
var justification = "left";
var margin_padding = 6;
var exit_zone = 400;
var transparent_img = dir + "images/global/dot_clear.gif";
var top_pad = 4;
var bottom_pad = 10;

var visible_divs = new Array();
var arrows_on = new Array();
var IDDAmenus = new Array();
var indent_continue = "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
var indent_continue2 = "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
var indent_sub_item = "&nbsp;&nbsp;&nbsp;&nbsp;";

/* set menu values to the array as such:
IDDAmenus[n] = [id_name, left_pos, top_pos, width, height, justification, border, bgcolor, position, visibility,
txw, bxw, lxh, lxv, rxh, rxv, txh, bxh, lxw, rxw, css_class, bordercolor, bordercolorlight, bordercolordark,
[link_name, link_text, pad_margin, pad_fill, sub_menu, sub_name, arrow_align],
[...],
[...]];
*/

IDDAmenus[0] = ["p1", 142, 33, 194, , "left", 1, "#999999", "absolute", "hidden",
, 192, 55, "top", , , , , , , "menulink1", , "#000044", ,
["about/index.html", "About Luster National, Inc.", , 6, "no sub", , ],
["about/resumes.htm", "Senior Management", , 12, "level 2", "p1s2", ]
];

IDDAmenus[1] = ["p1s2", 330, 35, 280, , "left", 1, "#999999", "absolute", "hidden",
, 216, , , 240, "top", , , , , "menulink1", , "#000044", ,
["about/resume_rluster.htm", "Robert Luster, President", , , , , ],
["about/resume_hunkele.html", "Les Hunkele, Senior Vice President", , , , , ],
["about/resume_fstreb.htm", "Fred Streb, Director - Eastern Region", , , , , ],
["about/resume_wilkins.htm", "David Wilkins, Director - Western Region", , , , , ],
["about/resume_dkatz.htm", "David Katz, Defense, Security &amp; Intelligence - Nationwide", , , , , ],
["about/resume_harris.html", "Thomas Harris, Director - Gulf Coast Region", , , , , ]
];

IDDAmenus[2] = ["p2", 180, 33, 280, , "left", 1, "#999999", "absolute", "hidden",
, 290, 220, "top", , , , , , , "menulink1", , "#000044", ,
["services/index.html", "Overview", , 40, "no sub", , ],
["services/manage.htm", "Management Services", , 40, "level 2", "p2s1", ],
["services/plan.htm", "Planning Services", , 40, "level 2", "p2s2", ],
["services/busdev.htm", "Business Development Services", , 20, "no sub", , ],
["services/financial.htm", "Financial / Economic Service", , 20, "level 2", "p2s4", ],
["services/analyses.htm", "Studies & Analyses", , 30, "level 2", "p2s5", ],
["services/is.htm", "Information Services", , 26, "level 2", "p2s6", ],
["services/documentation.htm", "Documentation Services", , , "level 2", "p2s7", ],
["services/inspection.htm", "Construction Supervision & Inspection Services", , , "level 2", "p2s8", ],
["services/compliance.htm", "Compliance Services", , , "level 2", "p2s9", ],
["services/busoutreach.htm", "Business Outreach Services", , , "level 2", "p2s10", ],
["services/training.htm", "Training Services", , , "level 2", "p2s12", ]
];

IDDAmenus[3] = ["p2s1", 456, 35, 220, , "left", 1, "#999999", "absolute", "hidden",
, 216, , , 140, "top", , , , , "menulink1", , "#000044", ,
["services/manage.htm#pm", "Program Management", , , , , ],
["services/manage.htm#cm", "Construction Management", , , , , ],
["services/manage.htm#pp", "Project Planning", , , , , ],
["services/manage.htm#em", "Environmental Management", , , , , ],
["services/manage.htm#ccom", "Contract Close-Out Management", , , , , ]
];

IDDAmenus[4] = ["p2s2", 456, 48, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 116, "top", , , , , "menulink1", , "#000044", ,
["services/plan.htm#sp", "Strategic and Business Planning", ,,,,],
["services/plan.htm#psd", "Project Strategy Development",,,,,],
["services/plan.htm#fp", "Facilities Planning", ,,,,],
["services/plan.htm#mep", "MEP Installation Planning", ,,,,],
["services/plan.htm#ptfp", "Project Team Formation and Management", ,,,,],
["services/plan.htm#ap", "Activation Planning", ,,,,],
["services/plan.htm#sp", "FF&E Procurement Planning", ,,,,]
];

IDDAmenus[5] = ["p2s3", 456, 63, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 100, "top", , , , , "menulink1", , "#000044", ,
["services/busdev.htm#bpi", "Business Process Implementation", ,,,,],
["services/busdev.htm#psd", "Private Sector Development", ,,,,],
["services/busdev.htm#cda", "Cost Development and Analysis", ,,,,],
["services/busdev.htm#ppd", "Policy and Procedure Development", ,,,,],
["services/busdev.htm#psp", "Private Sector Participation", ,,,,]
];

IDDAmenus[6] = ["p2s4", 456, 78, 252, , "left", 1, "#999999", "absolute", "hidden",
248, 248, , , 116, "top", , , , , "menulink1", , "#000044", ,
["services/financial.htm#pfp", "Project Finance Planning",,,,,],
["services/financial.htm#wbsd", "Work Breakdown Structure Development",,,,,]
];

IDDAmenus[7] = ["p2s5", 456, 92, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 150, "top", , , , , "menulink1", , "#000044", ,
["services/analyses.htm#ca", "Cost Analysis",,,,,],
["services/analyses.htm#sa", "Schedule Analysis",,,,,],
["services/analyses.htm#ita", "Information Technology Analysis",,,,,],
["services/analyses.htm#oa", "Organizational Analysis",,,,,]
];

IDDAmenus[8] = ["p2s6", 456, 108, 240, , "left", 1, "#999999", "absolute", "hidden",
236, 236, , , 100, "top", , , , , "menulink1", , "#000044", ,
["services/is.htm#wdm", "Website Development and Maintenance",,,,,]
];

IDDAmenus[9] = ["p2s7", 456, 124, 220, , "left", 1, "#999999", "absolute", "hidden",
216, 216, , , 60, "top", , , , , "menulink1", , "#000044", ,
["services/documentation.htm#rdp", "Report Development and Production",,,,,],
["services/documentation.htm#dcdm", "Documentation Control Development" + indent_continue + "& Management&nbsp;&nbsp;&nbsp;&nbsp;",,,,,]
];

IDDAmenus[10] = ["p2s8", 456, 138, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 76, "top", , , , , "menulink1", , "#000044", ,
["services/inspection.htm#qa", "Quality Assurance",,,,,],
["services/inspection.htm#qc", "Quality Control",,,,,],
["services/inspection.htm#com", "Change Order Management",,,,,],
["services/inspection.htm#ca", "Contract Administration",,,,,]
];

IDDAmenus[11] = ["p2s9", 456, 153, 210, , "left", 1, "#999999", "absolute", "hidden",
216, 216, , , 92, "top", , , , , "menulink1", , "#000044", ,
["services/compliance.htm#ccr", "Constructibility and Code Reviews",,,,,],
["services/compliance.htm#pwm", "Prevailing Wage Monitoring",,,,,],
["services/compliance.htm#mmw", "Monitoring of M/W/DBE Participation," + indent_continue + "Affirmative Action & Local" + indent_continue + "Hiring Requirements",,,,,]
];

IDDAmenus[12] = ["p2s10", 456, 169, 200, , "left", 1, "#999999", "absolute", "hidden",
212, 212, , , 60, "top", , , , , "menulink1", , "#000044", ,
["services/busoutreach.htm#slmw", "S/L/E/M/W/DBE Inclusion",,,,,],
["services/busoutreach.htm#sbta", "Small Business Technical Assistance&nbsp;&nbsp;&nbsp;&nbsp;" + indent_continue + "& Capacity Building",,,,,]
];

IDDAmenus[13] = ["p2s11", 456, 193, 200, , "left", 1, "#999999", "absolute", "hidden",
208, 208, , , 48, "top", , , , , "menulink1", , "#000044", ,
["services/meeting.htm#pmf", "Project Meeting Facilitation with" + indent_continue + "Internal & External Stakeholders&nbsp;&nbsp;&nbsp;&nbsp;",,,,,]
];

IDDAmenus[14] = ["p2s12", 456, 199, 226, , "left", 1, "#999999", "absolute", "hidden",
222, 222, , , 60, "top", , , , , "menulink1", , "#000044", ,
["services/training.htm#pmf", "Public Meeting Facilitation Skills Training",,4,,,],
["services/training.htm#tpd", "Training Program Development",,,,,],
["services/training.htm#sip", "Student Internship Programs",,,,,]
];

IDDAmenus[15] = ["p2s13", 456, 221, 242, , "left", 1, "#999999", "absolute", "hidden",
238, 238, , , 48, "top", , , , , "menulink1", , "#000044", ,
["services/comoutreach.htm#ced", "Community Economic Development",,,,,],
["services/comoutreach.htm#eir", "EIR Public / Community Outreach & Noticing",,4,,,]
];

IDDAmenus[16] = ["p3", 230, 33, 382, , "left", 1, "#999999", "absolute", "hidden",
, 380, 120, "top", 120, "top", , , , , "menulink1", , "#000044", ,
["projects/index.html", "Featured Projects:", , 6, "no sub", , ],
["projects/hartsfield.htm", indent_sub_item + "Hartsfield-Jackson Atlanta Int'l Airport, Atlanta, GA ", , , "no sub", "", ],
["projects/cpmc.htm", indent_sub_item + "California Pacific Medical Center (CPMC)", , , "no sub", "", ],
["projects/fema.htm", indent_sub_item + "Federal Emergency Management Agency (FEMA)", , , "no sub", "", ],
["projects/acoe1.htm", indent_sub_item + "US Army Corps of Engineers, New Orleans District, New Orleans, LA", , , "no sub", "", ],
["projects/ins.htm", indent_sub_item + "INS In Processing Center Program, Nationwide", , , "no sub", "", ],
["projects/580680.htm", indent_sub_item + "Hwy. 580 / 680 Interchange, Alameda County, CA", , , "no sub", "", ],
["","", , , "no sub", "", ],
["sectors/index.html", "Additional Projects:", , , "no sub", "", ],
["projects/sfcourthouse.htm", indent_sub_item + "San Francisco Courthouse",,,,,],
["projects/ebmud.htm", indent_sub_item + "East Bay Municipal Water District - Seismic Improvement",,,,,],
["projects/tucson.htm", indent_sub_item + "FBOP Penitentiary and Camp - Tucson, AZ",,,,,],
["projects/mtvernon.htm", indent_sub_item + "Mount Vernon, NY Unified School District Modernization",,,,,],
["projects/pentagon.htm", indent_sub_item + "Pentagon Renovation",,,,,],
["projects/sfoairtrain.htm", indent_sub_item + "San Francisco Int'l Airport - Air Train",,,,,],
["projects/sfoacm.htm", indent_sub_item + "San Francisco Int'l Airport - Administrative Construction Manager",,,,,],
["projects/sfonfc.htm", indent_sub_item + "San Francisco Int'l Airport - North Field Cargo",,,,,],
["projects/acoe2.htm", indent_sub_item + "U.S. Army Corps of Engineers - SF, LA, Sacramento" + indent_continue2 + "& New Orleans Districts",,,,,]
];


IDDAmenus[17] = ["p4", 282, 33, 226, , "left", 1, "#999999", "absolute", "hidden",
, 222, 194, "top", , , , , , , "menulink1", , "#000044", ,
["sectors/index.html", "Overview", , 6, "no sub", , ],
["sectors/transport.htm", "Transportation", , 6, "level 2", "p4s1", ],
["sectors/federal1.htm", "Federal", , 6, "level 2", "p4s2", ],
["sectors/aviation.htm", "Aviation", , 6, "level 2", "p4s3", ],
["sectors/water.htm", "Environmental", , 6, "level 2", "p4s4", ],
["sectors/htrw.htm", "Hazardous & Toxic Radiological" + indent_continue + "Waste (HTRW)", , 6, "no sub", , ],
["sectors/buildings.htm", "Buildings", , 6, "level 2", "p4s5", ],
["sectors/tcd.htm", "Training & Community Development", , 6, "no sub", , ],
["sectors/it.htm", "Information Technology", , 6, "no sub", , ],
["sectors/busproc.htm", "Business Process", , 6, "no sub", , ]
];

IDDAmenus[18] = ["p4s1", 504, 35, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 82, "top", , , , , "menulink1", , "#000044", ,
["projects/sfoairtrain.htm", "Project: San Francisco Int'l " + indent_continue + "Airport - Air Train",,,,,],
["projects/580680.htm", "Project: Interstate 580 / 680" + indent_continue + "Interchange Construction",,,,,]
];

IDDAmenus[19] = ["p4s2", 504, 50, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 232, "top", , , , , "menulink1", , "#000044", ,
["projects/pentagon.htm", "Project: Pentagon Renovation",,,,,],
["projects/acoe2.htm", "Project: U.S. Army Corps of Engineers" + indent_continue + " - SF, LA, Sacramento" + indent_continue + "& New Orleans Districts",,,,,],
["projects/ins.htm", "Project: INS Application Support Centers",,,,,],
["projects/dla.htm", "Project: DLA Northeast Region",,,,,],
["projects/tucson.htm", "Project: FBOP Penitentiary and Camp" + indent_continue + " - Tucson, AZ",,,,,]
];

IDDAmenus[20] = ["p4s3", 504, 65, 200, , "left", 1, "#999999", "absolute", "hidden",
202, 202, , , 92, "top", , , , , "menulink1", , "#000044", ,
["projects/hartsfield.htm", "Project: Hartsfield-Jackson Atlanta Int'l Airport" + indent_continue + " - Parallel Runway Construction",,,,,],
["projects/sfoacm.htm", "Project: San Francisco Int'l Airport" + indent_continue + " - Administrative Construction" + indent_continue + "Manager",,,,,],
["projects/sfonfc.htm", "Project: San Francisco Int'l Airport" + indent_continue + " - North Field Cargo",,,,,]
];

IDDAmenus[21] = ["p4s4", 504, 95, 180, , "left", 1, "#999999", "absolute", "hidden",
178, 178, , , 142, "top", , , , , "menulink1", , "#000044", ,
["projects/ebmud.htm", "Project: East Bay Municipal" + indent_continue + "Water District" + indent_continue + "- Seismic Improvement",,,,,],
["projects/westbasin.htm", "Project: West Basin Municipal" + indent_continue + "Water District" + indent_continue + " - Pipeline Construction",,,,,],
["projects/acoe1.htm", "Project: U.S. Army Corps of Engineers" + indent_continue + " - Wetlands Restoration",,,,,]
];

IDDAmenus[22] = ["p4s5", 504, 140, 200, , "left", 1, "#999999", "absolute", "hidden",
198, 198, , , 92, "top", , , , , "menulink1", , "#000044", ,
["projects/mtvernon.htm", "Project: Mount Vernon, NY" + indent_continue + "Unified School District" + indent_continue + "Modernization",,,,,],
["projects/sfcourthouse.htm", "Project: San Francisco" + indent_continue + "County Courthouse Construction",,,,,]
];

IDDAmenus[23] = ["p4s6", 504, 153, 180, , "left", 1, "#999999", "absolute", "hidden",
178, 178, , , 62, "top", , , , , "menulink1", , "#000044", ,
["services/tcd.htm#train", "Training",,,,,],
["services/tcd.htm#comdev", "Community Development",,,,,],
["services/tcd.htm#pub", "Public Outreach",,,,,]
];

IDDAmenus[24] = ["p5", 330, 33, 180, , "left", 1, "#999999", "absolute", "hidden",
, 178, 75, "top", 48, "top", , , , , "menulink1", , "#000044", ,
["news/index.html", "Overview", , 6, "no sub", ,],
["news/press.htm", "Press Releases", , 6, "no sub", , ],
["news/logos.htm", "Luster Logos", , 6, "no sub", , ]
];

IDDAmenus[25] = ["p6", 404, 33, 180, , "left", 1, "#999999", "absolute", "hidden",
, 178, 65, "top", 65,  "top", , , , , "menulink1", , "#000044", ,
["employ/index.html", "Working for Luster, Inc.", , 6, "no sub", , ],
["employ/openings.htm", "Job Openings", , 6, "no sub", , ],
["employ/apply.htm", "Application Form", , 6, "no sub", , ]
];
/*
DISABLING CONTACT SUBMENUS
IDDAmenus[26] = ["p7", 442, 33, 180, , "left", 1, "#999999", "absolute", "hidden",
, 178, , , 50, "top", , , , , "menulink1", , "#000044", ,
["contact/index.html", "General Inquries", 1, 1, "no sub", , "left"],
["contact/index.html", "Offices & Points of Contact", 1, 1, "level 2", "p7s1", "left" ]
];

IDDAmenus[26] = ["p7s1", 234, 35, 212, , "right", 1, "#999999", "absolute", "hidden",
208, 208, 114, "top", , , , , , , "menulink1", , "#000044", ,
["contact/index.html", "All",,,,,],
["contact/west.htm", "Western Region",,,,,],
["contact/east.htm", "Eastern Region",,,,,],
["contact/federal.htm", "Federal Programs",,,,,]
];
*/


/*
IDDAmenus[n] = [id_name, left_pos, top_pos, width, height, justification, border, bgcolor, position, visibility,
txw, bxw, lxh, lxv, rxh, rxv, txh, bxh, lxw, rxw, css_class, bordercolor, bordercolorlight, bordercolordark,
[link_name, link_text, pad_margin, pad_fill, sub_menu, sub_name, arrow_align],
];

" + indent_continue + "
indent_sub_item + 

	IDDAmenus[n] = [id_name, left_pos, top_pos, width, height, justification, border, bgcolor, position, visibility,
	top_exit_width, bottom_exit_width, left_exit_height, left_exit_valign, right_exit_height, right_exit_valign, top_exit_height,
		bottom_exit_height, left_exit_width, right_exit_width, css_class, bordercolor, bordercolorlight, bordercolordark,
	[link_name, link_text, pad_margin, pad_fill, sub_menu, sub_name, arrow_align],
	];
*/

function loadMenus() {
	var id_name, left_pos, top_pos, width, height, justification, border, position, visibility, txw, bxw, lxh,
	lxv, rxh, rxv, txh, bxh, lxw,
	rxw, css_class, bgcolor, bordercolor, bordercolorlight, bordercolordark,
	link_name, link_text, pad_margin, pad_fill, sub_menu, sub_name, arrow_align;
	var layer_tag = isNav4 ? "layer" : "div";
	var close_layer = "";
	var empty_layer_tag = "";

	if(isNav4) {
		empty_layer_tag = "<layer id='empty_layer'>\n";
		close_layer = "</layer>\n";
	} else {
		empty_layer_tag = "<div id='empty_layer' style='position: absolute; left:0px; top:0px; width:1px; z-index:9; visibility: hidden'>\n";
		close_layer = "</div>\n";
	}

	document.write(empty_layer_tag);
	document.write("<img src='" + transparent_img + "' height=10 width=10 border='0'>\n");
	document.write(close_layer);

	if(isNav4) {
		document.empty_layer.position = 'absolute'; document.empty_layer.left = 0; document.empty_layer.top = 0;
		document.empty_layer.width = 1; document.empty_layer.visibility = 'hidden';
	}
	
	var next_menu, next_link, top_exit_bar, pad_right, pad_left;
	var left_exit_bar = ""; var right_exit_bar = "";
	var margin_string = ""; fill_string = "";
	var arrow_cell = ""; var right_arrow_cell = ""; left_arrow_cell = "";
	var over_action; var arrow_name = ""; var arrow_source = "";
	var this_menu = new Array(); var this_link = new Array();
	var has_subarrows = false; var this_nav4_menu; var this_layer_tag;
	var close_this_layer; var nav4_menus = new Array();

	for(next_menu = 0; next_menu < IDDAmenus.length; next_menu++) {
		this_menu = IDDAmenus[next_menu];
		if(isNav4 && this_menu[0].indexOf("s") > -1) continue; // #####################################################################3
		id_name = this_menu[0]; left_pos = this_menu[1]; top_pos = this_menu[2]; width = this_menu[3];
		height = this_menu[4]; border = this_menu[6]; bgcolor = this_menu[7];
		position = this_menu[8]; visibility = this_menu[9]; txw = this_menu[10]; bxw = this_menu[11];
		lxh = this_menu[12]; lxv = this_menu[13]; rxh = this_menu[14];
		rxv = this_menu[15]; txh = this_menu[16]; bxh = this_menu[17];
		lxw = this_menu[18]; rxw = this_menu[19]; css_class = this_menu[20];
		bordercolor = this_menu[21]; bordercolorlight = this_menu[22]; bordercolordark = this_menu[23];
		if (this_menu[5]) {justification = this_menu[5];}
		height = height ? " height: " + height + ";" : "";
		lxw = lxw ? lxw : exit_zone;
		rxw = rxw ? rxw : exit_zone;
		txh = txh ? txh : exit_zone;
		bxh = bxh ? bxh : exit_zone;
		rxv = rxv ? " valign='" + rxv + "'" : "";
		lxv = lxv ? " valign='" + lxv + "'" : "";
		bordercolorlight = bordercolorlight ? " bordercolorlight='" + bordercolorlight + "'" : "";
		bordercolordark = bordercolordark ? " bordercolordark='" + bordercolordark + "'" : "";
		bordercolor = bordercolor ? " bordercolor='" + bordercolor + "'" : "";
		left_exit_bar = ""; right_exit_bar = ""; top_exit_bar = "";
		if(lxh > 0) {
			left_pos -= lxw;
			left_exit_bar = "<a href='javascript:' onmouseover='hideMenus(\"empty_layer\");'><img src='" + transparent_img + "' height=" + lxh + " width=" + lxw + " border='0'></a>";
		}
		if(rxh > 0) {
			right_exit_bar = "<a href='javascript:' onmouseover='hideMenus(\"empty_layer\");'><img src='" + transparent_img + "' height=" + rxh + " width=" + rxw + " border='0'></a>";
		}
		if(txw > 0) {
			top_pos -= txh;
			top_exit_bar += "	<tr><td></td><td align='left' valign='top'>\n";
			top_exit_bar += "		<a href='javascript:' onmouseover='hideMenus(\"empty_layer\");'><img src='" + transparent_img + "' height=" + txh + " width=" + txw + " border='0'></a><br>\n";
			top_exit_bar += "	</td><td></td></tr>\n";
		}

		if(isNav4) {
			this_layer_tag = "<layer id='" + id_name + "' class='" + css_class + "' position='absolute' visibility='hidden' left=" + left_pos + " top=" + top_pos + " width=" + width + ">\n";
			close_this_layer = "</layer>\n";

		} else {
			this_layer_tag = "<div id='" + id_name + "' style='position:" + position + "; left:" + left_pos + "px; top:" + top_pos + "px; width:" + width + "px;" + height + " z-index:9; visibility:" + visibility + "' class='" + css_class + "'>\n";
			close_this_layer = "</div>\n";
		}

		document.write(this_layer_tag);
		// find out if any of the links here has a sub menu
		has_subarrows = false;
		this_link = new Array();

		this_link = this_menu[next_link];
		for(next_link = 24; next_link < this_menu.length; next_link++) {
			if(this_menu[next_link][4]) has_subarrows = true;
		}

		document.write("<table border=0 cellspacing='0' cellpadding='0'>\n");

		if(txw > 0) document.write(top_exit_bar);
		document.write("	<tr>\n");
		document.write("		<td align='left' " + lxv + ">" + left_exit_bar + "</td>\n");
		document.write("		<td align='left' valign='top'>\n");
		document.write("			<table border='" + border + "'" + bordercolor + bordercolorlight + bordercolordark + " cellspacing=0 cellpadding=0>\n");
		document.write("				<tr><td align='left' valign='top'>\n");
		document.write("					<table border=0 cellspacing='0' cellpadding='1' bgcolor='" + bgcolor + "' width=" + width + ">\n");
		document.write("						<tr><td align='left' valign='top' colspan=2>\n");
		document.write("							<img src='" + transparent_img + "' height=" + top_pad + " width=" + (width - 2) + " border='0'><br>\n");
		document.write("						</td></tr>\n");

		for(next_link = 24; next_link < this_menu.length; next_link++) {
			this_link = this_menu[next_link]; pad_margin = 0;
			// 	link_name, link_text, pad_margin, pad_fill, sub_menu, sub_name, arrow_align;
			link_name = dir +  this_link[0]; link_text = this_link[1];
			pad_fill = this_link[3] ? this_link[3] : 0; sub_menu = this_link[4]; sub_name = this_link[5];
			if(this_link[6]) arrow_align = this_link[6];
			pad_margin = this_link[2] ? this_link[2] : margin_padding;
			arrow_cell = ""; right_arrow_cell = ""; left_arrow_cell = "";
			arrow_name = "";
			over_action = "";
			if(!isNav4) {
						if(sub_menu) {
							if(sub_menu == "level 2") {
								arrow_name = (arrow_align == "left") ? "arwlt" : "arwrt";
								arrow_name += sub_name;
								over_action = " onmouseOver='secondaryMenu(\"" + sub_name + "\", \"" + arrow_name + "\");'";
							} else if(sub_menu == "no sub") {
								over_action = " onmouseOver='hideSecondary();'";
							}
						}
			}
			margin_string = ""; fill_string = "";
			for(mgnstg = 1; mgnstg <= pad_margin; mgnstg++) {
				margin_string += "&nbsp;";
			}
			for(flstg = 1; flstg <= pad_fill; flstg++) {
				fill_string += "&nbsp;";
			}
			if(justification == "right") {
				pad_left = fill_string;
				pad_right = margin_string;
			} else {
				pad_right = fill_string;
				pad_left = margin_string;
			}


			if(has_subarrows == true) {
				arrow_source = transparent_img;
				if(!isNav4 && sub_menu && sub_menu != "no sub") { // ###################################################
					arrow_cell += "<a href='" + link_name + "'" + over_action + ">";
					arrow_source = (arrow_align == "left") ? left_arrow : right_arrow;
					arrow_name = "name='" + arrow_name + "'";
				}
				if(arrow_align == "left") {
					arrow_cell += "<img src='" + transparent_img + "' width=" + arrow_margin + " height=6 border=0>";
					arrow_cell += "<img " + arrow_name + " src='" + arrow_source + "' width=" + arrow_width + " height=" + arrow_height + " border=0></a></nobr></td>\n";
					left_arrow_cell = "<td align='left' valign='top'><nobr>" + arrow_cell;
				} else {
					arrow_cell += "<img " + arrow_name + " src='" + arrow_source + "' width=" + arrow_width + " height=" + arrow_height + " border=0>";
					arrow_cell += "<img src='" + transparent_img + "' width=" + arrow_margin + " height=6 border=0></a></nobr></td>\n";
					right_arrow_cell = "<td align='right' valign='top'><nobr>" + arrow_cell;
				}
			} else {
				if(sub_menu) {
				} else {
					right_arrow_cell = "<td><img src='" + transparent_img + "' width=2 height=6 border=0></td>";
				}
			}

			document.write("						<tr>" + left_arrow_cell + "\n");
			document.write("							<td align='" + justification + "' valign='top'><span class='" + css_class + "'><nobr><a href='" + link_name + "'" + over_action + ">" + pad_left + link_text + pad_right + "</a></nobr></span><br></td>\n");
			document.write("						" + right_arrow_cell + "</tr>\n");
		}

		document.write("						<tr><td align='left' valign='top' colspan=2>\n");
		document.write("							<img src='" + transparent_img + "' height=" + bottom_pad + " width=" + (width - 2) + " border='0'><br>\n");
		document.write("						</td></tr>\n");
		document.write("					</table>\n");
		document.write("				</td></tr>\n");
		document.write("			</table>\n");
		document.write("		</td>\n");
		document.write("		<td align='left' " + rxv + ">" + right_exit_bar + "</td>\n");
		document.write("	</tr>\n");
		document.write("	<tr><td></td><td align='left' valign='top'>\n");
		document.write("		<a href='javascript:' onmouseover='hideMenus(\"empty_layer\");'><img src='" + transparent_img + "' height=" + bxh + " width=" + bxw + " border='0'></a><br>\n");
		document.write("	</td><td></td></tr>\n");
		document.write("</table>\n");
//		document.write("</div>\n");

		document.write(close_this_layer);
	}
}

var	current_left = 0;
var	current_top = 0;
var	current_primary = "";
var	current_secondary = "";

function primaryMenu(div_name) {
	var vis_length = visible_divs.length;
	var old_primary, new_primary, old_secondary, old_obj, new_obj;

	if(vis_length == 1) { // a primary menu is open
		if(visible_divs[0] != div_name) {
			// hide the previous primary menu
			if(old_obj=getObject(visible_divs[0])) {
				old_primary=(document.layers)?old_obj:old_obj.style;
				 old_primary.visibility="hidden";
			}
			visible_divs = popOff(visible_divs);
		} else {return;}
	} else if(vis_length == 2) { // both a primary and a secondary menu are open
		// hide the secondary menu
		if(old_obj=getObject(visible_divs[1])) {
			old_secondary=(document.layers)?old_obj:old_obj.style;
			 old_secondary.visibility="hidden";
		}
		visible_divs = popOff(visible_divs);
		if(visible_divs[0] != div_name) {
			// hide the previous primary menu
			if(old_obj=getObject(visible_divs[0])) {
				old_primary=(document.layers)?old_obj:old_obj.style;
				 old_primary.visibility="hidden";
				visible_divs = popOff(visible_divs);
			}
		}
	} else {} // either there are non or how did so many menus get opened?

	if(visible_divs[0] != div_name) {
		if(new_obj=getObject(div_name)) {
			new_primary=(document.layers)?new_obj:new_obj.style;
			 new_primary.visibility="visible";
			 visible_divs[visible_divs.length] = div_name;
		}
	}
	if(!isNav4) {
		var arrows_len = arrows_on.length;
		if(arrows_len > 0) {
			for(next_arrow = arrows_len - 1; next_arrow >= 0; next_arrow -= 1) {
				if(arrows_on[next_arrow]) arrow_dir = (arrows_on[next_arrow].indexOf("lt") != -1) ? "arrowlt" : "arrowrt";
				eval("document." + arrows_on[next_arrow] + ".src = " + arrow_dir + "off.src;");
				arrows_on = popOff(arrows_on);
			}
		}
	}
}

function secondaryMenu(div_name, arrow_name) {
	var debug = '';
	var vis_length = visible_divs.length;
	var old_secondary, new_secondary, old_obj, new_obj;
//	var arrow_name = "arw" + div_name;
	var arrows_len = arrows_on.length;

	if(vis_length == 1) { // the primary menu only is open
		// just open the secondary menu
	} else if(vis_length == 2) { // both the primary and a secondary menu are open
		// hide the previous secondary menu

		if(visible_divs[1] != div_name) {
			if(old_obj=getObject(visible_divs[1])) {
				old_secondary=(document.layers)?old_obj:old_obj.style;
				 old_secondary.visibility="hidden";
				 visible_divs = popOff(visible_divs);
			}
		} else {return true;}

		// open the new secondary
	} else {

		} // either there are none or how did so many menus get opened?

	if(!isNav4) {

		arrow_dir = (arrow_name.indexOf("lt") != -1) ? "arrowlt" : "arrowrt";
		if(arrows_len > 0) {
			for(next_arrow = arrows_len - 1; next_arrow >= 0; next_arrow -= 1) {
				if(arrows_on[next_arrow] != arrow_name) {
					eval("document." + arrows_on[next_arrow] + ".src = " + arrow_dir + "off.src;");
					arrows_on = popOff(arrows_on);
				}
			}
		}
		eval("document." + arrow_name + ".src = " + arrow_dir + "on.src;");
	//	eval("document.images['" + arrow_name + "'].src = " + arrow_dir + "on.src;");
		arrows_on[arrows_on.length] = arrow_name;
	}

	if(new_obj=getObject(div_name)) {
		if(document.layers) {
			new_secondary = new_obj;
		} else {
			new_secondary = new_obj.style;
		}
//		new_secondary=(document.layers)?new_obj:new_obj.c;
		if(isNav) {
			if(div_name != 'empty_layer') {
				current_left += new_secondary.left*1;
				current_top += new_secondary.top*1;
				current_secondary = div_name;
			}
		}
//debug = "seconary visibility: " + new_secondary.visibility; // ###########################
		 new_secondary.visibility="visible";
		 visible_divs[visible_divs.length] = div_name;
	}

//if(debug.length > 0) {alert("debug: " + debug );} // ##########################################
return true;
}

function hideMenus(div_name) {
	var vis_length = visible_divs.length;
	var old_menu, old_obj, next_div, next_arrow;
	var arrows_len = arrows_on.length;
	var this_div = "";

	if(div_name == 'empty_layer') {
		current_left = 0;
		current_top = 0;
	}
	for(next_div = vis_length - 1; next_div >= 0 ; next_div -= 1) {
		this_div = visible_divs[next_div];
		if(old_obj=getObject(this_div)) {
			if(document.layers) {
				old_menu=old_obj;
			} else {old_menu=old_obj.style;}
			 old_menu.visibility="hidden";
		}
		if(visible_divs.length > 0) {visible_divs = popOff(visible_divs);}
	}
	if(!isNav4) {
		if(arrows_len > 0) {
			for(next_arrow = arrows_len - 1; next_arrow >= 0; next_arrow -= 1) {
				if(arrows_on[next_arrow]) arrow_dir = (arrows_on[next_arrow].indexOf("lt") != -1) ? "arrowlt" : "arrowrt";
				eval("document." + arrows_on[next_arrow] + ".src = " + arrow_dir + "off.src;");
				arrows_on = popOff(arrows_on);
			}
		}
	}
}

function hideMenus2(div_name) {
	var vis_length = visible_divs.length;
	var old_menu, old_obj, next_div, next_arrow;
	var arrows_len = arrows_on.length;
	var this_div = "";
	if(div_name == 'empty_layer') {
		current_left = 0;
		current_top = 0;
	}
	for(next_div = vis_length - 1; next_div >= 0 ; next_div -= 1) {
		this_div = visible_divs[next_div];
		if(old_obj=getObject(this_div)) {
			if(document.layers) {
				old_menu=old_obj;
			} else {old_menu=old_obj.style;}
			 old_menu.visibility="hidden";
		}
		if(visible_divs.length > 0) {visible_divs = popOff(visible_divs);}
	}
	if(!isNav4) {
		if(arrows_len > 0) {
			for(next_arrow = arrows_len - 1; next_arrow >= 0; next_arrow -= 1) {
				if(arrows_on[next_arrow]) arrow_dir = (arrows_on[next_arrow].indexOf("lt") != -1) ? "arrowlt" : "arrowrt";
				eval("document." + arrows_on[next_arrow] + ".src = " + arrow_dir + "off.src;");
				arrows_on = popOff(arrows_on);
			}
		}
	}
}

function hideSecondary() {
	var vis_length = visible_divs.length;
	var old_secondary, old_obj, next_arrow, next_vis;

	var arrows_len = arrows_on.length;
	if(vis_length > 2) {
		for(next_vis = vis_length - 1; next_vis > 1; next_vis -= 1) {
			// hide the previous secondary menu
			if(old_obj=getObject(visible_divs[next_vis])) {
				old_secondary=(document.layers)?old_obj:old_obj.style;
				 old_secondary.visibility="hidden";
			}
			visible_divs = popOff(visible_divs);
		}
	}
	if(vis_length == 2) { // both the primary and a secondary menu are open
		// hide the previous secondary menu
		if(old_obj=getObject(visible_divs[1])) {
			old_secondary=(document.layers)?old_obj:old_obj.style;
			 old_secondary.visibility="hidden";
			 visible_divs = popOff(visible_divs);
		}
	}
	if(!isNav4) {

		if(arrows_len > 0) {
			for(next_arrow = arrows_len - 1; next_arrow >= 0; next_arrow -= 1) {
				if(arrows_on[next_arrow]) arrow_dir = (arrows_on[next_arrow].indexOf("lt") != -1) ? "arrowlt" : "arrowrt";
				eval("document." + arrows_on[next_arrow] + ".src = " + arrow_dir + "off.src;");
				arrows_on = popOff(arrows_on);
			}
		}
	}
}

function showVisList() {
	var vis_length = visible_divs.length;
	var arrow_length = arrows_on.length;
	var next_vis, next_arrow;
	var vis_string = ""; arrow_string = "";
	for(next_vis = 0; next_vis < vis_length; next_vis++) {
		vis_string += visible_divs[next_vis] + "\n";
	}
	for(next_arrow = 0; next_arrow < arrow_length; next_arrow++) {
		arrow_string += arrows_on[next_arrow] + "\n";
	}
//	popOff(bogus)
}


function getObject(n, d) { 
  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(isNav) {
		x = d[n];
	} else {
		x = d.all[n];
	}
  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=getObject(n,d.layers[i].document);
  }
  if(!x && d.getElementById) {
	  x=d.getElementById(n);
  }
  return x;
}

function getObject2(n, d) { 
  var p,i,x, y;
  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(isNav) {
		x = d[n];
	} else {
		x = d.all[n];
	}
  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=getObject(n,d.layers[i].document);
  }
  if(!x && d.getElementById) {
	  x=d.getElementById(n);
  }
  return x;
}


isNav = false;
isNav4 = false;

function set_nav() { 
  with (navigator) {
	  if (appName == "Netscape") {
		  isNav = true;
		  if(appVersion.indexOf('4.') != -1) {
			  isNav4 = true;
		  }
    		document.page_width=innerWidth; document.page_height=innerHeight; onresize=set_nav;
		}
	}
}

function popOff(in_array) {
	var new_array = new Array();
	var array_length = in_array.length;
	for(next_el = 0; next_el < array_length-1; next_el++) {
		new_array[next_el] = in_array[next_el];
	}
	in_array = new_array;
	return new_array;
}

set_nav();
