
//////////////////// browser checking
//////////// if Netscape 6
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 5)) {
	layerRef="document.getElementById"
	styleRef=".style."
	showStr1="document.getElementById('layer"
	showStr2="').style.visibility="
}

//////////// if explorer (4.x)
else if (document.all) {
	layerRef="document.all"
	styleRef=".style."
	showStr1="document.all.layer"
	showStr2=".style.visibility="
}

//////////// else if netscape (4.x)
else if (document.layers) {
	layerRef="document.layers"
	styleRef="."
	showStr1="document.layers.layer"
	showStr2=".visibility="
}


layerStr = new Array ();

Z = new Array ("1", "2", "3", "4", "5", "6", "7", "8");
left = new Array(132,221, 294, 364, 452, 547, 642, 716);

if (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) < 5))) {

	for (var i=0; i<=7; i++) {
	var c= 235+78*i
		layerStr [i] = "<layer id='layer"+Z[i]+"' "
				+ "z-index='"+Z[i]+"' "
				+ "left='"+ left[i] +"' "
				+ "width='143' "
				+ "height='133' "
				+ "top='86' "
				+ "bgcolor='' "
				+ "border='1px'"
				+ "visibility='hidden'>"
	}

	layerEnd = "</layer>"
}

else {

	for (var i=0; i<=7; i++) {
		layerStr [i] = "<div id='layer"+Z[i]+"' "
				+ "style='position:absolute; "
				+ "z-index:"+Z[i]+"; "
				+ "left:" + left[i]+"; "
				+ "width:; "
				+ "height:133; "
				+ "top:86; "
				+ "border:1px;"
				+ "visibility:hidden'>"
	}

	layerEnd = "</div>"
}

var k=8     //////////////////// first menu length

//////////// turn on the sub-menu/turn off the previous

function show(n) {
	eval (showStr1 + n + showStr2 + "'visible'");
	for(var i=0; i<n-1; i++) {
		var m=i+1
		eval (showStr1 + m + showStr2 + "'hidden'");
	}

	for(var j=n; j<k-1; j++) {
		var m=j+1
		eval (showStr1 + m + showStr2 + "'hidden'");
	}
}


var n, s, timerID_main;


//////////// turn off all 2nd tier
function TurnOff() {
	for(var i=1; i<=k-1; i++) {
		eval (showStr1 + i + showStr2 + "'hidden'");
	}
}

//////////// set time out
var timerID_sub

function LayerTimeOut() {
	timerID_sub = setTimeout ("TurnOff()",300);
}

function ClearTimeOut() {
	clearTimeout (timerID_main);
	clearTimeout (timerID_sub);
}

document.write ("<table border='0'  cellspacing='0' cellpadding='0' height='20' width=100%><tr><td width=760 valign=top>")
document.write ("<table border='0'  cellspacing='0' cellpadding='0' height='20' width=760>")
document.write ("<tr><td width=760 align=right>")


<!-- main menu begins here -->

menuStr = new Array();


///////////////////////////////////////////////////////
/////////////// update main menu item names here //////
///////////////////////////////////////////////////////

menuName = new Array(null,
"/images/images/about_OFF.gif",
"/images/images/awards_OFF.gif", 
"/images/images/events_OFF.gif",
"/images/images/for_chefs_OFF.gif",
"/images/images/education_OFF.gif",
"/images/images/magazines_OFF.gif", 
"/images/images/greens_OFF.gif", 
"/images/images/home_OFF.gif");


menuName_on = new Array(null,
"/images/images/about_ON.gif",
"/images/images/awards_ON.gif", 
"/images/images/events_ON.gif",
"/images/images/for_chefs_ON.gif",
"/images/images/education_ON.gif",
"/images/images/magazines_ON.gif", 
"/images/images/greens_ON.gif", 
"/images/images/home_ON.gif");

///////////////////////////////////////////////////////
/////// adjust main menu item table cell width here ///
///////////////////////////////////////////////////////

menuWidth = new Array(null, 102, 46, 38, 77, 66, 46,96);


///////////////////////////////////////////////////////
/////////////// update main menu URLs here ////////////
///////////////////////////////////////////////////////

menuURL = new Array(null,			
			"/about/history.shtml",
			"/awards/index.shtml",
			"/events/index.shtml",
			"/for_chefs/invitation_to_cook.shtml",
			"/scholarships/index.shtml",
			"/dateline/index.shtml",
			"/greens/index.shtml",
			"http://www.jamesbeard.org/"
			);



for (var j = 1; j <= menuWidth.length; j++) {
if (j==2 || j==8) {
menuStr[j] = "<a href='"+ menuURL[j]+ "' onMouseOver=ClearTimeOut()||show(" + j + ");document.images.image"+j+".src='" + menuName_on[j] + "' "
+ "onMouseOut=LayerTimeOut();document.images.image"+j+".src='" + menuName[j] + "' target='_top'>"
+ "<img src=" + menuName[j] + " border=0 name=image" + j + "></a>"
}
else {

menuStr[j] = "<a href='#' onMouseOver=ClearTimeOut()||show(" + j + ");document.images.image"+j+".src='" + menuName_on[j] + "' "
+ "onMouseOut=LayerTimeOut();document.images.image"+j+".src='" + menuName[j] + "' target='_top'>"
+ "<img src=" + menuName[j] + " border=0 name=image" + j + "></a>"
}
if ( j == menuWidth.length)
menuStr[j]=menuStr[j]
else
menuStr[j]=menuStr[j] + "<img src=/images/colon.gif border=0>"
document.write (menuStr[j])

}

<!-- end of main menu -->

var searchBox = '';
document.write ("</td></tr></table></td><td width=*>"+searchBox+"</td></tr></table>")


<!-- submenus begin here -->

itemSpace = new Array(null, 0, 0, 100, 100, 210, 170, 100, 400, 400, 300,550);
itemName = new Array();
itemURL = new Array();
itemStr = new Array();

itemStr[1] = new Array();
itemStr[2] = new Array();
itemStr[3] = new Array();
itemStr[4] = new Array();
itemStr[5] = new Array();
itemStr[6] = new Array();
itemStr[7] = new Array();
itemStr[8] = new Array();


///////////////////////////////////////////////////////
/////////////// update submenu item names here ////////
///////////////////////////////////////////////////////

itemName[1] = new Array(null,   
                                 "&nbsp; our mission",
                                 "&nbsp; financials",
				"&nbsp; membership",
                                "&nbsp; foundation history",
				"&nbsp; who was james beard?",
				"&nbsp; james beard&#8217;s books",
				"&nbsp; people & contacts",
				"&nbsp; supporters",
				"&nbsp; press releases",
				"&nbsp; ethics and governance")

itemName[2] = new Array(null, 
                        "&nbsp; ceremony & reception",
                        "&nbsp; nominees & winners",
                        "&nbsp; policies & procedures",
                        "&nbsp; entry forms"
                        )

itemName[3] = new Array(null,
                                "&nbsp; at the beard house",
								"&nbsp; out-of-house events",
								"&nbsp; foundation celebrations"
				//"&nbsp Making Reservations"
			)

itemName[4] = new Array(null,
               "&nbsp; invitation to cook",
                "<b>&nbsp; c o o k i n g &nbsp;a t &nbsp;t h e &nbsp;b e a r d &nbsp;h o u s e</b>",
				"&nbsp;&nbsp;&nbsp;&nbsp; chefs' info packet",
				"&nbsp;&nbsp;&nbsp;&nbsp; kitchen virtual tour",
				"&nbsp;&nbsp;&nbsp;&nbsp; rosenthal plates",
				"&nbsp;&nbsp;&nbsp;&nbsp; dining room seating chart",
				"&nbsp; jobfinder"
				)

itemName[5] = new Array(null,
                                "<b>&nbsp; s c h o l a r s h i p s</b>",
								"<b>&nbsp e d u c a t i o n a l  &nbsp; p r o g r a m s</b>",
				"&nbsp;&nbsp;&nbsp;&nbsp; conferences, courses, and lectures",
				"&nbsp;&nbsp;&nbsp;&nbsp; Spoons Across America"
				)

itemName[6] = new Array(null,
				"&nbsp; articles",
				"&nbsp; Beard Bites",
				"&nbsp; dateline",
				"&nbsp; eat these words",
				"&nbsp; greenhouse gallery",
				"&nbsp; photo gallery",
				"&nbsp; professional directory",
				"&nbsp; recipes",
				"&nbsp; restaurant directory"
				)

itemName[7] = new Array(null,
                        "&nbsp; about the GREENS",
                        "&nbsp; GREENS events",
                        "&nbsp; sign up for GREENS events" 
                        )

itemName[8] = new Array(null)





//////////////////////////////////////////////////////
/////////////// update submenu item URLs here ////////
//////////////////////////////////////////////////////

itemURL[1] = new Array (null,
                                "/about/mission.shtml",
                                "/about/financials.shtml",
				"/membership/index.php",
				"/about/history.shtml",
				"/about/beard.shtml",
				"/about/beard_books.shtml",
				"/about/people.shtml",
				"/about/supporters.shtml",
				"/about/press/index.php",
				"/about/ethics.shtml"
			)

itemURL[2] = new Array (null,
                       "/awards/index.shtml",
                       "/awards/index.php",
                       "/awards/policies.shtml",
                       "/awards/forms/index.shtml")

itemURL[3] = new Array (null,
                        "/events/index.shtml",
                        "/events/out_of_house/index.shtml",
                        "/events/other/index.shtml"
                        )

itemURL[4] = new Array (null, "/for_chefs/invitation_to_cook.shtml",
                        "/for_chefs/chef_info_packet.shtml",
                        "/for_chefs/chef_info_packet.shtml",
                        "/for_chefs/chef_info_packet.shtml#kitchen",
						"/for_chefs/rosenthal.shtml",
			"/for_chefs/chef_info_packet.shtml#seating",
			"http://www.starchefsjobfinder.com"
						)

itemURL[5] = new Array (null,
                       "/scholarships/index.shtml",
		      
		       "/education/index.shtml",
			   "/education/conferences/index.shtml",
			"/education/spoons.shtml"
)

itemURL[6] = new Array (null,
				"/features/index.shtml",		
				"/beardbites/",				
				"/dateline/index.shtml",
				"/events/words/index.shtml",
				"/greenhouse/",
				"/gallery/",
				"/directory_listing/",
				"/recipes/",
				"/restaurants/"
				)

itemURL[7] = new Array (null,
                        "/greens/index.shtml",
                        "/greens/events/index.shtml",
                        "/greens/signup.php"
                        )

itemURL[8] = new Array (null)





for (var k = 1; k <= 8; k++) {
document.write (layerStr [k-1])
document.write ("<table border='1' bgcolor='#FFCC33' cellspacing='0' cellpadding='0' bordercolor='#666699'>")

<!-- space -->
//document.write ("<tr><td width='" + itemSpace[k] + "'>&nbsp;</td><td height=20 nowrap>")


//////////// sub menus

for (var j = 1; j <= itemName[k].length - 1; j++) {

itemStr[k][j] = "<a href='" + itemURL[k][j] + "' onMouseOver=ClearTimeOut() onMouseOut=LayerTimeOut() class='secondtier' target='_top'>"
				+ "<span class='secondtier'>" + itemName[k][j]
				+ "</span></a>&nbsp;&nbsp;&nbsp;"

document.write ("<tr><td align=left>" + itemStr[k][j])
document.write ("</td></tr>")

}

//document.write ("</td>")
document.write ("</table>")
document.write (layerEnd)

}



document.write("</td>")
document.write ("</tr></table>")
document.write (layerEnd)
