var winName = window.name;

function menuConstruct(fileName) {
	if (fileName == "appetizers") { document.write("<b>Appetizers</b>"); } else { document.write("<a href='appetizers.shtml?=all'>Appetizers</a>"); }
		document.write(" | ");
	if (fileName == "onedish") { document.write("<b>One Dish Meals</b>"); } else { document.write("<a href='onedish.shtml?=all'>One Dish Meals</a>"); }
		document.write(" | ");
	if (fileName == "entrees") { document.write("<b>Entr&eacute;es and Sides</b>"); } else { document.write("<a href='entrees.shtml?=all'>Entr&eacute;es and Sides</a>"); }
/*
	if (winName == "meat") { document.write("<b>Meat</b>"); } else { document.write("<a href='" + fileName + ".shtml?=meat'>Meat</a>"); }
		document.write(" | ");
	if (winName == "seafood") { document.write("<b>Seafood</b>"); } else { document.write("<a href='" + fileName + ".shtml?=seafood'>Seafood</a>"); }
		document.write(" | ");
	if (winName == "vegetable") { document.write("<b>Vegetable</b>"); } else { document.write("<a href='" + fileName + ".shtml?=vegetable'>Vegetable</a>"); }
		document.write(" | ");
	if (fileName == "appetizers") { document.write("<font color='666666'>Noodles</font>"); } else if (winName == "noodle") { document.write("<b>Noodles</b>"); } else { document.write("<a href='" + fileName + ".shtml?=noodle'>Noodles</a>"); }
		document.write(" | ");
	if (fileName == "appetizers" || fileName == "onedish") { document.write("<font color='666666'>Rice</font>"); } else if (winName == "rice") { document.write("<b>Rice</b>"); } else { document.write("<a href='" + fileName + ".shtml?=rice'>Rice</a>"); }
		document.write(" | ");
	if (fileName == "onedish") { document.write("<font color='666666'>Bread</font>"); } else if (winName == "bread") { document.write("<b>Bread</b>"); } else { document.write("<a href='" + fileName + ".shtml?=bread'>Bread</a>"); }
		document.write(" | ");
	if (winName == "all") { document.write("<b>All</b>"); } else { document.write("<a href='" + fileName + ".shtml?=all'>All</a>"); }
*/
}

function ingredMenu(winName) { //Used for ingred_recipes.shtml

	document.write("<center>");
	//document.write("<u>Ingredients:</u><br>");

	if (winName == "beef") { document.write("<b>Beef</b>"); } else { document.write("<a href='ingred_recipes.shtml?=beef'>Beef</a>"); }
		document.write(" | ");
	if (winName == "pork") { document.write("<b>Pork</b>"); } else { document.write("<a href='ingred_recipes.shtml?=pork'>Pork</a>"); }
		document.write(" | ");
	if (winName == "poultry") { document.write("<b>Poultry</b>"); } else { document.write("<a href='ingred_recipes.shtml?=poultry'>Poultry</a>"); }
		document.write(" | ");
	if (winName == "seafood") { document.write("<b>Seafood</b>"); } else { document.write("<a href='ingred_recipes.shtml?=seafood'>Seafood</a>"); }
		document.write(" | ");
	if (winName == "vegetable") { document.write("<b>Vegetable</b>"); } else { document.write("<a href='ingred_recipes.shtml?=vegetable'>Vegetable</a>"); }
		document.write(" | ");
	if (winName == "noodle") { document.write("<b>Noodle</b>"); } else { document.write("<a href='ingred_recipes.shtml?=noodle'>Noodle</a>"); }
		document.write(" | ");
	if (winName == "rice") { document.write("<b>Rice</b>"); } else { document.write("<a href='ingred_recipes.shtml?=rice'>Rice</a>"); }
		document.write(" | ");
	if (winName == "bread") { document.write("<b>Bread</b>"); } else { document.write("<a href='ingred_recipes.shtml?=bread'>Bread</a>"); }
		document.write(" | ");
	if (winName == "all") { document.write("<b>All</b>"); } else { document.write("<a href='ingred_recipes.shtml?=all'>All</a>"); }

	document.write("<center>");
}

function prodMenu(winName) { //Used for product_recipes.shtml

	document.write("<center>");
	//document.write("<u>Products:</u><br>");

	if (winName == "group1") { document.write("<b>Sichuan Peanut Sauce</b>"); } else { document.write("<a href='product_recipes.shtml?=group1'>Sichuan Peanut Sauce</a>"); }
	document.write(" | ");

	if (winName == "group2") { document.write("<b>Thai Hot-Sweet Chili Sauce</b>"); } else { document.write("<a href='product_recipes.shtml?=group2'>Thai Hot-Sweet Chili Sauce</a>"); }
	document.write(" | ");

	if (winName == "group3") { document.write("<b>Mekong Ginger Sauce</b>"); } else { document.write("<a href='product_recipes.shtml?=group3'>Mekong Ginger Sauce</a>"); }
	document.write("<br>");

	if (winName == "group4") { document.write("<b>Toasted Sesame Sauce</b>"); } else { document.write("<a href='product_recipes.shtml?=group4'>Toasted Sesame Sauce</a>"); }
	document.write(" | ");

	if (winName == "group5") { document.write("<b>Sesame Soy Marinade</b>"); } else { document.write("<a href='product_recipes.shtml?=group5'>Sesame Soy Marinade</a>"); }
	document.write(" | ");

	if (winName == "group6") { document.write("<b>Jasmine Rice</b>"); } else { document.write("<a href='product_recipes.shtml?=group6'>Jasmine Rice</a>"); }

	document.write("</center>");
}
//--------------- RECIPE MENU CONSTRUCTOR ---------------//

function recipesMenu() { //Constructs the Menu Items
	if (window.name == "course" || window.name == window.location) {
		document.write("<table border='0' cellspacing='0' cellpadding='5' width='100%' height='100'><tr><td valign='top'> <H4><a href='appetizers.shtml?=all'>JADE Appetizers</a></H4><!-- </td><td> --><H4><a href='onedish.shtml?=all'>JADE One Dish Meals</a></H4><!-- </td><td> --><H4><a href='entrees.shtml?=all'>JADE Entr&eacute;es and Sides</a></H4> </td></tr> </table>");
	} else if (window.name == "ingredients") {
		document.write("<table border='0' cellspacing='0' cellpadding='5' width='100%' height='100'> <tr><td valign='top'> <h4><a href='ingred_recipes.shtml?=beef'>Beef</a></h4> <h4><a href='ingred_recipes.shtml?=pork'>Pork</a></h4> <h4><a href='ingred_recipes.shtml?=poultry'>Poultry</a></h4> <h4><a href='ingred_recipes.shtml?=seafood'>Seafood</a></h4> <h4><a href='ingred_recipes.shtml?=vegetable'>Vegetable</a></h4> <h4><a href='ingred_recipes.shtml?=noodle'>Noodle</a></h4> <h4><a href='ingred_recipes.shtml?=rice'>Rice</a></h4> <h4><a href='ingred_recipes.shtml?=bread'>Bread</a></h4> </td></tr> </table>");
	} else if (window.name == "products") {
		document.write("<table border='0' cellspacing='0' cellpadding='5' width='100%' height='100'> <tr><td valign='top'> <h4><a href='product_recipes.shtml?=group1'>Sichuan Peanut Sauce Recipes</a></h4> <h4><a href='product_recipes.shtml?=group2'>Thai Hot-Sweet Sauce Recipes</a></h4> <h4><a href='product_recipes.shtml?=group3'>Mekong Ginger Sauce Recipes</a></h4> <h4><a href='product_recipes.shtml?=group4'>Toasted Sesame Sauce Recipes</a></h4> <h4><a href='product_recipes.shtml?=group5'>Sesame Soy Marinade Recipes</a></h4> <h4><a href='product_recipes.shtml?=group6'>Jasmine Rice Recipes</a></h4> </td></tr> </table>");
	}
}

// Chooses Recipe Headers
function recipeHeader1() {
	if (window.name == "course" || window.name == window.location) {
		document.write("<b>Course</b>");
	} else {
		document.write("<a href='recipes.shtml?=course'>Course</a>");
	}
}

function recipeHeader2() {
	if (window.name == "ingredients") {
		document.write("<b><font color='#000000'>Ingredients</font></b>");
	} else {
		document.write("<a href='recipes.shtml?=ingredients'>Ingredients</a>");
	}
}

function recipeHeader3() {
	if (window.name == "products") {
		document.write("<b><font color='#000000'>Products</font></b>");
	} else {
		document.write("<a href='recipes.shtml?=products'>Products</a>");
	}
}

function recipeHeaderBG() { //Chooses Recipe Header Background
	if (window.name == "course" || window.name == window.location) {
		document.write("<table width='537' height='31' border='0' cellspacing='0' cellpadding='3'  STYLE='background-IMAGE:URL(img/recipe1_hdr.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'>");
	}
	if (window.name == "ingredients") {
		document.write("<table width='537' height='31' border='0' cellspacing='0' cellpadding='3'  STYLE='background-IMAGE:URL(img/recipe2_hdr.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'>");
	}
	if (window.name == "products") {
		document.write("<table width='537' height='31' border='0' cellspacing='0' cellpadding='3'  STYLE='background-IMAGE:URL(img/recipe3_hdr.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'>");
	}
}


function bgSelect() { //Chooses Background Color
	if (window.name == "products") {
		document.write("<td STYLE='background-IMAGE:URL(img/recipe3_bg.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'>");
	} else if (window.name == "ingredients") {
		document.write("<td STYLE='background-IMAGE:URL(img/recipe2_bg.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'>");
	} else {
		document.write("<td STYLE='background-IMAGE:URL(img/recipe1_bg.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'>");
	}
}

function ftrSelect() { //Chooses Background Footer Color
	if (window.name == "products") {
		document.write("<table width='100%' height='9' cellspacing='0'><tr><td STYLE='background-IMAGE:URL(img/recipe3_ftr.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'></td></tr></table>");
	} else if (window.name == "ingredients") {
		document.write("<table width='100%' height='9' cellspacing='0'><td STYLE='background-IMAGE:URL(img/recipe2_ftr.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'></td></tr></table>");
	} else {
		document.write("<table width='100%' height='9' cellspacing='0'><td STYLE='background-IMAGE:URL(img/recipe1_ftr.gif); BACKGROUND-POSITION: 0% 0%; BACKGROUND-REPEAT: repeat-y'></td></tr></table>");
	}
}