var enableFrench=false;
//the object containing all information about the navigation menu
//this was done as an object so the names of the pages could easily
//be associated with the text within them and the child menus below
//DO NOT EDIT THIS OBJECT directly, even if you think you know what
//you are doing.  Instead, use the menu-editing script located in
//the cgi-bin directory called menuedit.pl.  Just load it in the
//browser and let it do the work, this ensures that it will always
//be able to read the menu since it relies on strict formatting
var menuList =	{
	history:	{	text:	"Seagram History", french: "Histoire de Seagram",

		city:	{	text:	"The City", french: "La Ville"
			},
		plant:	{	text:	"The Plant", french: "L'Usine",

			timeline:	{	text:	"Timeline", french: "Cronologia"
				},
			siteplan:	{	text:	"Site Plan", french: "Plan du Site"
				},
			doorway:	{	text:	"Doorway to Quality", french: "Porte à la Qualité"
				}
			},
		seagram:	{	text:	"Seagram & Bronfman", french: "Seagram & Bronfman"
			},
		making:	{	text:	"Making Fine Products", french: "Fabrication des Produits",

			production:	{	text:	"Production", french: "Production",

				milling:	{	text:	"Milling", french: "Fraisage"
					},
				fermenting:	{	text:	"Mash & Fermenting", french: "Mâche & Fermentation"
					},
				distilling:	{	text:	"Distilling", french: "Distillation"
					},
				hydrometer:	{	text:	"Hydrometer", french: "Hydromètre"
					}
				},
			ageing:	{	text:	"Ageing", french: "Vieillissement",

				warehouse:	{	text:	"Barrel Warehouses", french: "Entrepôts de Baril"
					},
				inventory:	{	text:	"Barrel Inventory", french: "Inventaire de Baril"
					},
				removing:	{	text:	"Removing Barrels", french: "Enlèvement des Barils"
					},
				coopering:	{	text:	"Coopering", french: "La Tonnellerie"
					},
				alchemy:	{	text:	"Alchemy of Oak", french: "Alchimie de Chêne"
					}
				},
			bottling:	{	text:	"Bottling", french: "Mise en Bouteilles",

				line:	{	text:	"Working the Line", french: "Travailler la Ligne"
					},
				labelling:	{	text:	"Labelling Bottles", french: "Marquant les Bouteilles"
					},
				quality:	{	text:	"Quality Control", french: "Contrôle de Qualité"
					}
				}
			},
		workers:	{	text:	"The Workers", french: "Les Ouvriers",

			reporting:	{	text:	"Reporting for Work", french: "Reportage au Travail"
				},
			administration:	{	text:	"Administration", french: "Administration",

				bridge:	{	text:	"Over the Bridge", french: "Traversant le Pont"
					},
				managers:	{	text:	"Plant Managers", french: "Directeurs d'Usine"
					}
				},
			union:	{	text:	"Union", french: "Union"
				},
			maintenance:	{	text:	"Maintenance", french: "Entretien"
				},
			health:	{	text:	"Health & Safety", french: "Salubrité & Sûreté"
				},
			awards:	{	text:	"Awards & Benefits", french: "Récompenses & Avantages",

				picnics:	{	text:	"Annual Picnics & Sports Teams", french: "Pique-Niques Annuels & Équipes de Sports"
					}
				}
			},
		products:	{	text:	"Products", french: "Produits",

			vo:	{	text:	"V.O.", french: "V.O."
				},
			crownroyal:	{	text:	"Crown Royal", french: "Crown Royal"
				}
			},
		closing:	{	text:	"Plant Closing", french: "Fermeture de l'Usine",

			fire:	{	text:	"Distillery Blaze", french: "Enfer de la Distillerie"
				}
			},
		didyouknow:	{	text:	"Did You Know?", french: "Avez-Vous Su?"
			}
		},
	about:	{	text:	"About this Project", french: "Au Sujet de ce Projet",

		heritage:	{	text:	"Heritage Resources", french: "Ressources d'Héritage"
			},
		team:	{	text:	"Project Team", french: "Équipe de Projet"
			},
		thanks:	{	text:	"Acknowledgements", french: "Remerciements"
			}
		},
	resources:	{	text:	"Educational Resources", french: "Ressources Éducatives",

		links:	{	text:	"Links", french: "Liens"
			}
		},
	copyright:	{	text:	"Terms & Conditions of Use", french: "États d'Utilisation"
		},
	contact:	{	text:	"Contact Us", french: "Contactez-Nous"
		},
	sitemap:	{	text:	"Site Map", french: "Carte du Site"		}
};

//information about the logo images for each section
//When the pages are modular as they are, the script needs to know
//what image to place at the top of the page.  This object tells it
//that, based on the directory in which the page sits.
//at the moment, this stuff needs to be added manually
//all images are found in the images/menu/ folder
var logoImages =	{	history:		"logo_history.gif",
							plant:			"logo_plant.gif",
							seagram:		"logo_seagram.gif",
 							making:			"logo_making.gif",
 							workers:		"logo_workers.gif",
							city:			"logo_city.gif",
							warehouse:		"logo_warehouse.gif",
							didyouknow:		"logo_didyouknow.gif",
							products:		"logo_products.gif",
							closing:		"logo_closing.gif",
						about:			"logo_about.gif",
							heritage:		"logo_heritage.gif",
							team:			"logo_team.gif",
							photos:			"logo_photos.gif",
						events:			"logo_events.gif",
						resources:		"logo_resources.gif",
							links:			"logo_links.gif",
						copyright:		"logo_copyright.gif",
						contact:		"logo_contact.gif",
						sitemap:		"logo_sitemap.gif",

						other:			"spacer.gif"
					};

//these are used for the parent menu items in the nav menu
//all images are found in the images/menu/ folder
var menuImages =	{	history:		"menu_history.gif",
							history_sub:{	//submenu
								plant:			"menu_history_plant.gif",
									plant_sub:{	//submenu
										doorway:		"menu_history_plant_doorway.gif",
										siteplan:		"menu_history_plant_siteplan.gif",
										timeline:		"menu_history_plant_timeline.gif",
										other:			"spacer.gif"
									},
								seagram:		"menu_history_seagram.gif",
								making:			"menu_history_making.gif",
									making_sub:{	//submenu
										production:		"menu_history_making_production.gif",
											production_sub:{	//submenu
												milling:		"menu_history_making_production_milling.gif",
												fermenting:		"menu_history_making_production_fermenting.gif",
												distilling:		"menu_history_making_production_distilling.gif",
												hydrometer:		"menu_history_making_production_hydrometer.gif",
												other:			"spacer.gif"
											},
										ageing:			"menu_history_making_ageing.gif",
											ageing_sub:{	//submenu
												warehouse:		"menu_history_making_ageing_warehouse.gif",
												coopering:		"menu_history_making_ageing_coopering.gif",
												repair:			"menu_history_making_ageing_repair.gif",
												removing:		"menu_history_making_ageing_removing.gif",
												alchemy:		"menu_history_making_ageing_alchemy.gif",
												inventory:		"menu_history_making_ageing_inventory.gif",
												other:			"spacer.gif"
											},
										bottling:		"menu_history_making_bottling.gif",
											bottling_sub:{	//submenu
												line:			"menu_history_making_bottling_line.gif",
												labelling:		"menu_history_making_bottling_labelling.gif",
												quality:		"menu_history_making_bottling_quality.gif",
												other:			"spacer.gif"
											},
										other:			"spacer.gif"
									},
								workers:		"menu_history_workers.gif",
									workers_sub:{	//submenu
										reporting:	"menu_history_workers_reporting.gif",
										administration:	"menu_history_workers_administration.gif",
											administration_sub:{	//submenu
												bridge:			"menu_history_workers_administration_bridge.gif",
												managers:		"menu_history_workers_administration_managers.gif",
												other:			"spacer.gif"
											},
										union:			"menu_history_workers_union.gif",
										maintenance:	"menu_history_workers_maintenance.gif",
											maintenance_sub:{	//submenu
												lineshaft:		"menu_history_workers_maintenance_lineshaft.gif",
												other:			"spacer.gif"
											},
										health:			"menu_history_workers_health.gif",
										awards:			"menu_history_workers_awards.gif",
											awards_sub:{	//submenu
												picnics:		"menu_history_workers_awards_picnics.gif",
												other:			"spacer.gif"
											},
										other:			"spacer.gif"
									},
								city:			"menu_history_city.gif",
								didyouknow:			"menu_history_didyouknow.gif",
								products:		"menu_history_products.gif",
									products_sub:{	//submenu
										vo:				"menu_history_products_vo.gif",
										crownroyal:		"menu_history_products_crownroyal.gif",
										other:			"spacer.gif"
									},
								closing:		"menu_history_closing.gif",
									closing_sub:{	//submenu
										fire:			"menu_history_closing_fire.gif",
										other:			"spacer.gif"
									},
								other:			"spacer.gif"
							},
						about:			"menu_about.gif",
							about_sub:{	//submenu
								heritage:		"menu_about_heritage.gif",
								team:			"menu_about_team.gif",
								thanks:			"menu_about_thanks.gif",
								photos:			"menu_about_photos.gif",
								other:			"spacer.gif"
							},
						events:			"menu_events.gif",
						resources:		"menu_resources.gif",
							resources_sub:{	//submenu
								links:		"menu_resources_links.gif",
								other:			"spacer.gif"
							},
						copyright:		"menu_copyright.gif",
						contact:		"menu_contact.gif",
						sitemap:		"menu_sitemap.gif",

						other:			"spacer.gif"
					};



var mapping = 0;

var firstItem=new Array("","");
var previousItem=new Array("","");
var currentItem=new Array("","");
var nextItem=new Array("","");
var gotFirst=false;
var gotCurrent=false;
var gotNext=false;
var parentPage="";
var parentName="";

//retreives the previous and next menu items
function getPrevNext() {

	var sublevels=new Array();
	var mainlevel=new Array();

	var written;

	//parse the path and filename of the page to determine which
	//menu to display unless this is the site map
	page = location.href;
	page = page.toLowerCase();

	if(page.indexOf('_fr.')!=-1){
		isFrench=true;
		page=page.replace(/_fr./,'.');
	}

	end = page.lastIndexOf(".");
	if(end > 0) {
		page = page.slice(1,end);
	} else {
		page = page.slice(1,page.length);
	}
	temp = page.split('/');
	mainlevel = temp[temp.length-2];
	if (!(mainlevel))
		mainlevel = temp[temp.length-1];
	if(temp.length > 1) {
		sublevels = temp[temp.length-1].split('_');
	}

	//find the previous and next pages
	for (curr_item in menuList) {
		if((curr_item != "text")&&(curr_item != "french")) {
			if (!(gotFirst)) {
				firstItem[0]="../"+curr_item+"/index.html";
				firstItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
				gotFirst=true;
			}

			if (!(gotCurrent)) {
				previousItem[0]=currentItem[0];
				previousItem[1]=currentItem[1];
				currentItem[0]="../"+curr_item+"/index.html";
				currentItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
			} else if (!(gotNext)) {
				nextItem[0]="../"+curr_item+"/index.html";
				nextItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
				gotNext=true;
			}

			if(curr_item == mainlevel) {
				if (sublevels[0]=="index") {
					gotCurrent=true;
				}
			}
			for(curr_item1 in menuList[curr_item]) {
				if((curr_item1 != "text")&&(curr_item1 != "french")) {
					if (!(gotCurrent)) {
						previousItem[0]=currentItem[0];
						previousItem[1]=currentItem[1];
						currentItem[0]="../" + curr_item + "/" + curr_item1 + ".html";
						currentItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
					} else if (!(gotNext)) {
						nextItem[0]="../" + curr_item + "/" + curr_item1 + ".html";
						nextItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
						gotNext=true;
					}
					if(curr_item1 == sublevels[0]) {
						if (sublevels.length==1) {
							gotCurrent=true;
						}
					}
					for(curr_item2 in menuList[curr_item][curr_item1]) {
						if((curr_item2 != "text")&&(curr_item2 != "french")) {
							if (!(gotCurrent)) {
								previousItem[0]=currentItem[0];
								previousItem[1]=currentItem[1];
								currentItem[0]="../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + ".html";
								currentItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
							} else if (!(gotNext)) {
								nextItem[0]="../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + ".html";
								nextItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
								gotNext=true;
							}
							if(curr_item2 == sublevels[1]) {
								if (sublevels.length==2) {
									gotCurrent=true;
								}
							}
							for(curr_item3 in menuList[curr_item][curr_item1][curr_item2]) {
								if((curr_item3 != "text")&&(curr_item3 != "french")) {
									if (!(gotCurrent)) {
										previousItem[0]=currentItem[0];
										previousItem[1]=currentItem[1];
										currentItem[0]="../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + "_" + curr_item3 + ".html";
										currentItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][curr_item3][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
									} else if (!(gotNext)) {
										nextItem[0]="../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + "_" + curr_item3 + ".html";
										nextItem[1]=menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][curr_item3][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;');
										gotNext=true;
									}
									if(curr_item3 == sublevels[2]) {
										if (sublevels.length==3) {
											gotCurrent=true;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	if (!(gotCurrent)) {
		previousItem[0]="";
		previousItem[1]="";

		currentItem[0]=location.href.replace(/\?([^>]*)/gi, "");
		currentItem[1]="";

		if(currentItem[0].indexOf('_fr.')!=-1){
			currentItem[0]=currentItem[0].replace(/_fr./,'.');
		}
	}
}

//makes the navigation menu based on the filename of the page
function makeMenu() {

	var sublevels=new Array();
	var mainlevel=new Array();

	var written;

	//parse the path and filename of the page to determine which
	//menu to display unless this is the site map
	page = location.href;
	page = page.toLowerCase();

	if(page.indexOf('_fr.')!=-1){
		isFrench=true;
		page=page.replace(/_fr./,'.');
	}

	end = page.lastIndexOf(".");
	if(end > 0) {
		page = page.slice(1,end);
	} else {
		page = page.slice(1,page.length);
	}
	temp = page.split('/');
	mainlevel = temp[temp.length-2];
	if (!(mainlevel))
		mainlevel = temp[temp.length-1];
	if(temp.length > 1) {
		sublevels = temp[temp.length-1].split('_');
	}
	//write the menu out, expanding it where it applies
	for (curr_item in menuList) {
		if(menuImages[curr_item]) {
			document.writeln("<a href=\"../" + curr_item + "/index" + (isFrench?'_fr':'') + ".html\" class=\"parent\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/" + (isFrench?menuImages[curr_item].replace('.gif','_fr.gif'):menuImages[curr_item]) + "\" width=\"170\" height=\"20\" border=\"0\" alt=\"" + menuList[curr_item][isFrench?'french':'text'].replace(/&/g,'&amp;') + "\" align=\"left\"></a><br clear=\"all\" />\n");
		} else {
			document.writeln("<a href=\"../" + curr_item + "/index" + (isFrench?'_fr':'') + ".html\" class=\"parent\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">" + menuList[curr_item][isFrench?'french':'text'].replace(/&/g,'&amp;').replace(/\s/g, "&nbsp;") + "</a><br clear=\"all\" />\n");
		}
		if(((curr_item != "text")&&(curr_item != "french")) && ((mapping) || (curr_item == mainlevel))) {
			for(curr_item1 in menuList[curr_item]) {
				if((curr_item1 != "text")&&(curr_item1 != "french")) {
					written=false;
					if(menuImages[curr_item+'_sub']) {
					if(menuImages[curr_item+'_sub'][curr_item1]) {
						document.writeln("<img src=\"../images/menu/spacer.gif\" width=\"16\" height=\"1\" alt=\"\" /><img src=\"../images/menu/bullet1.gif\" width=\"16\" height=\"12\" alt=\"\" /><a href=\"../" + curr_item + "/" + curr_item1 + (isFrench?'_fr':'') + ".html\" class=\"child\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/" + (isFrench?menuImages[curr_item+'_sub'][curr_item1].replace('.gif','_fr.gif'):menuImages[curr_item+'_sub'][curr_item1]) + "\" width=\"140\" height=\"16\" border=\"0\" alt=\"" + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/&/g,'&amp;') + "\"></a><br clear=\"all\" />");
						written=true;
					}}
					if (written==false) {
						document.writeln("<img src=\"../images/menu/spacer.gif\" width=\"16\" height=\"1\" alt=\"\" /><img src=\"../images/menu/bullet1.gif\" width=\"16\" height=\"12\" alt=\"\" /><a href=\"../" + curr_item + "/" + curr_item1 + (isFrench?'_fr':'') + ".html\" class=\"child\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">" + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/&/g,'&amp;').replace(/\s/g, "&nbsp;") + "</a><br clear=\"all\" />");
					}
					if((mapping) || (curr_item1 == sublevels[0])) {
						for(curr_item2 in menuList[curr_item][curr_item1]) {
							if((curr_item2 != "text")&&(curr_item2 != "french")) {
								written=false;
								if(menuImages[curr_item+'_sub']) {
								if(menuImages[curr_item+'_sub'][curr_item1+'_sub']) {
								if(menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2]) {
									document.writeln("<img src=\"../images/menu/spacer.gif\" width=\"32\" height=\"1\" alt=\"\" /><img src=\"../images/menu/bullet2.gif\" width=\"16\" height=\"12\" alt=\"\" /><a href=\"../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + (isFrench?'_fr':'') + ".html\" class=\"submenu\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/" + (isFrench?menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2].replace('.gif','_fr.gif'):menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2]) + "\" width=\"124\" height=\"16\" border=\"0\" alt=\"" + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/&/g,'&amp;') + "\"></a><br clear=\"all\" />");
									written=true;
								}}}
								if (written==false) {
									document.writeln("<img src=\"../images/menu/spacer.gif\" width=\"32\" height=\"1\" alt=\"\" /><img src=\"../images/menu/bullet2.gif\" width=\"16\" height=\"12\" alt=\"\" /><a href=\"../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + (isFrench?'_fr':'') + ".html\" class=\"submenu\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">" + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/&/g,'&amp;').replace(/\s/g, "&nbsp;") + "</a><br clear=\"all\" />");
								}
								if((mapping) || (curr_item2 == sublevels[1])) {
									for(curr_item3 in menuList[curr_item][curr_item1][curr_item2]) {
										if((curr_item3 != "text")&&(curr_item3 != "french")) {
											written=false;
											if(menuImages[curr_item+'_sub']) {
											if(menuImages[curr_item+'_sub'][curr_item1+'_sub']) {
											if(menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2+'_sub']) {
											if(menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2+'_sub'][curr_item3]) {
												document.writeln("<img src=\"../images/menu/spacer.gif\" width=\"48\" height=\"1\" alt=\"\" /><img src=\"../images/menu/bullet1.gif\" width=\"16\" height=\"12\" alt=\"\" /><a href=\"../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + "_" + curr_item3 + (isFrench?'_fr':'') + ".html\" class=\"submenu\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][curr_item3][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/" + (isFrench?menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2+'_sub'][curr_item3].replace('.gif','_fr.gif'):menuImages[curr_item+'_sub'][curr_item1+'_sub'][curr_item2+'_sub'][curr_item3]) + "\" width=\"108\" height=\"16\" border=\"0\" alt=\"" + menuList[curr_item][curr_item1][curr_item2][curr_item3][isFrench?'french':'text'].replace(/&/g,'&amp;') + "\"></a><br clear=\"all\" />");
												written=true;
											}}}}
											if (written==false) {
												document.writeln("<img src=\"../images/menu/spacer.gif\" width=\"48\" height=\"1\" alt=\"\" /><img src=\"../images/menu/bullet1.gif\" width=\"16\" height=\"12\" alt=\"\" /><a href=\"../" + curr_item + "/" + curr_item1 + "_" + curr_item2 + "_" + curr_item3 + (isFrench?'_fr':'') + ".html\" class=\"submenu\" onmouseover=\"status='" + menuList[curr_item][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + " - " + menuList[curr_item][curr_item1][curr_item2][curr_item3][isFrench?'french':'text'].replace(/\'/g,'\\\'').replace(/&/g,'&amp;') + "'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">" + menuList[curr_item][curr_item1][curr_item2][curr_item3][isFrench?'french':'text'].replace(/&/g,'&amp;').replace(/\s/g, "&nbsp;") + "</a><br clear=\"all\" />");
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}

	//YOU CAN MAKE ADJUSTMENTS TO THIS NEXT BLOCK, BUT ONLY IF YOU KNOW WHAT YOU ARE DOING
	//write out the rest of the menu items that do not fit with the
	//above naming conventions.
	//DO NOT MAKE CHANGES BEYOND THIS POINT
//is you want to, you can add a line between 'above naming conventions'
//and do not make changes beyond this point -- i.e.:
//  document.writeln("<a href=\"/contact.html\" class=\"parent\">Contact Info / Location</a><br />");

}


//prints out the top of the page.  this ensures that pages are kept
//small and consistent and that nobody can screw things up or change
//little things around that would ruin the look.  if any changes
//need to be made to the layout or style of the page, this is where
//it will be done.  any formatting that is not in here, can be found
//in the styles.css file in css format....
//note: DO NOT MAKE CHANGES WITHOUT PERMISSION!
var isFrench=false;
function startPage() {

	var sublevels=new Array();
	var mainlevel=new Array();

	page = location.href;
	page = page.toLowerCase();

	if(page.indexOf('_fr.')!=-1){
		isFrench=true;
		page=page.replace(/_fr./,'.');
	}

	end = page.lastIndexOf(".");
	if(end > 0) {
		page = page.slice(1,end);
	} else {
		page = page.slice(1,page.length);
	}
	temp = page.split('/');
	mainlevel = temp[temp.length-2];
	if (!(mainlevel))
		mainlevel = temp[temp.length-1];
	if(temp.length > 1) {
		sublevels = temp[temp.length-1].split('_');
	}


	if (mainlevel)
		if (menuList[mainlevel])
			document.title=""+menuList[mainlevel][isFrench?'french':'text'];
	if (sublevels[0])
		if (menuList[mainlevel][sublevels[0]])
			document.title=document.title+" - "+menuList[mainlevel][sublevels[0]][isFrench?'french':'text'];
	if (sublevels[1])
		if (menuList[mainlevel][sublevels[0]][sublevels[1]])
			document.title=document.title+" - "+menuList[mainlevel][sublevels[0]][sublevels[1]][isFrench?'french':'text'];
	if (sublevels[2])
		if (menuList[mainlevel][sublevels[0]][sublevels[1]][sublevels[2]])
			document.title=document.title+" - "+menuList[mainlevel][sublevels[0]][sublevels[1]][sublevels[2]][isFrench?'french':'text'];
	if (location.href.indexOf('_thumbnails.html')!=-1)
		document.title=document.title+" - Thumbnails";
	if (location.href.indexOf('_video.html')!=-1)
		document.title=document.title+" - Video";
	if (location.href.indexOf('_thumbnails_fr.html')!=-1)
		document.title=document.title+" - Thumbnails";
	if (location.href.indexOf('_video_fr.html')!=-1)
		document.title=document.title+" - Vidéo";


	getPrevNext();

	if(location.search.indexOf("?accessible")!=-1){
		document.write("<link href=\"../nostyles.css\" type=\"text/css\" rel=\"stylesheet\" />");
		if(isFrench) {
			document.write("<span lang=\"fr\" xml:lang=\"fr\">");
		}

		document.write("<table summary=\"Navigation\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td width=\"50%\" align=\"left\" valign=\"top\">");

		if (previousItem[0]!="") {
			if(isFrench) {
				document.write("<a class=\"printable\" href=\""+previousItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Précédente</a>");
			} else {
				document.write("<a class=\"printable\" href=\""+previousItem[0]+"?accessible\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Previous Page</a>");
			}
			if (nextItem[0]=="") {
				if(isFrench) {
					document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Première Page</a>");
				} else {
					document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0]+"?accessible\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">First Page</a>");
				}
			}
		}
		if ((previousItem[0]!="")&&(nextItem[0]!="")) {
			document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small>");
		}
		if (nextItem[0]!="") {
			if(isFrench) {
				document.write("<a class=\"printable\" href=\""+nextItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Suivante</a>");
			} else {
				document.write("<a class=\"printable\" href=\""+nextItem[0]+"?accessible\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Next Page</a>");
			}
		}

		if ((previousItem[0]=="")&&(nextItem[0]=="")) {
			parentPage = location.href;
			if ((parentPage.indexOf('_thumbnails.html')!=-1)||(parentPage.indexOf('_video.html')!=-1)||(parentPage.indexOf('_thumbnails_fr.html')!=-1)||(parentPage.indexOf('_video_fr.html')!=-1)) {
				parentPage=parentPage.replace('_thumbnails','').replace('_video','');

				parentName = "Previous Page";

				if (mainlevel) {
					if ((mainlevel!='thumbnails')&&(mainlevel!='video'))
						parentName = "Previous Page";
					if (menuList[mainlevel])
						parentName=""+menuList[mainlevel][isFrench?'french':'text'];
				} if (sublevels[0]) {
					if ((sublevels[0]!='thumbnails')&&(sublevels[0]!='video'))
						parentName = "Previous Page";
					if (menuList[mainlevel][sublevels[0]])
						parentName=""+menuList[mainlevel][sublevels[0]][isFrench?'french':'text'];
				} if (sublevels[1]) {
					if ((sublevels[1]!='thumbnails')&&(sublevels[1]!='video'))
						parentName = "Previous Page";
					if (menuList[mainlevel][sublevels[0]][sublevels[1]])
						parentName=""+menuList[mainlevel][sublevels[0]][sublevels[1]][isFrench?'french':'text'];
				} if (sublevels[2]) {
					if ((sublevels[2]!='thumbnails')&&(sublevels[2]!='video'))
						parentName = "Previous Page";
					if (menuList[mainlevel][sublevels[0]][sublevels[1]][sublevels[2]])
						parentName=""+menuList[mainlevel][sublevels[0]][sublevels[1]][sublevels[2]][isFrench?'french':'text'];
				}
	
				document.write("<a class=\"printable\" href=\""+parentPage+"\" onmouseover=\"status='"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/\'/g,'\\\'').replace(/&/g,'&amp;')+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/&/g,'&amp;')+"</a>");
			}
		}
		document.write("</td><td align=\"center\" valign=\"top\">");

		if(isFrench) {
			document.write("<span lang=\"en\" xml:lang=\"en\"><a class=\"printable\" href=\""+location.href.replace('_fr.html','.html')+"\" onmouseover=\"status='Go to the english version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">English&nbsp;Version</a></span>");
		} else {
			if(enableFrench) {
				document.write("<span lang=\"fr\" xml:lang=\"fr\"><a class=\"printable\" href=\""+location.href.replace('.html','_fr.html')+"\" onmouseover=\"status='Allez à la Version&nbsp;Française de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version&nbsp;Française</a></span>");
			}
		}

		document.write("</td><td width=\"50%\" align=\"right\" valign=\"top\">");

		if(isFrench) {
			document.write("<a class=\"printable\" href=\""+currentItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='Allez à la version complète de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version Régulière de Page</a>");
		} else {
			document.write("<a class=\"printable\" href=\""+currentItem[0]+"\" onmouseover=\"status='Go to the complete version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Regular Version of Page</a>");
		}

		document.write("</td></tr></table>");

		return 1;
	}

	if(isFrench) {
		document.write("<span lang=\"fr\" xml:lang=\"fr\">");
	}

	document.writeln("<table summary=\"\" width=\"100%\" class=\"table1\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">");
	document.writeln("<tr>");
	document.write("<td bgcolor=\"#CCC5B3\" class=\"title-cell-left\" width=\"180\" height=\"100\" valign=\"bottom\"><img src=\"../images/menu/titleleft.gif\" width=\"180\" height=\"100\" border=\"0\" alt=\"\" /></td>");
	document.write("<td bgcolor=\"#CCC5B3\" class=\"title-cell-right\" height=\"100\" width=\"100%\" valign=\"bottom\">");

	document.write("<table summary=\"\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\">");
	document.write("<tr>");
	document.write("<td>");
	document.write("<table summary=\"\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\">");
	document.write("<tr>");
	document.write("<td align=\"left\" valign=\"bottom\" width=\"350\">");

	if(isFrench) {
		document.write("<a class=\"printable\" href=\""+currentItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='Allez au version imprimeur-amicale / accessible de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img align=\"right\" src=\"../images/menu/spacer.gif\" width=\"1\" height=\"1\" alt=\"Allez au Version Accessible de Cette Page\" border=\"0\" /></a> ");
		document.write("<a href=\"#pagecontent\"><img align=\"right\" src=\"../images/menu/spacer.gif\" width=\"1\" height=\"1\" alt=\"Skip Over Navigation Bars to Content\" border=\"0\" /></a>");
		document.write("<a class=\"printable\" href=\"../index_fr.html\" onmouseover=\"status='Home Page de l\\\'Histoire de la Usine de Seagram dans Waterloo'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/titlemain_fr.gif\" width=\"336\" height=\"55\" border=\"0\" alt=\"Home Page de l\'Histoire de la Usine de Seagram dans Waterloo\" /></a>");
	} else {
		document.write("<a class=\"printable\" href=\""+currentItem[0]+"?accessible\" onmouseover=\"status='Go to a printer-friendly / accessible version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img align=\"right\" src=\"../images/menu/spacer.gif\" width=\"1\" height=\"1\" alt=\"Go to the Accessible Version of this Web Site\" border=\"0\" /></a> ");
		document.write("<a href=\"#pagecontent\"><img align=\"right\" src=\"../images/menu/spacer.gif\" width=\"1\" height=\"1\" alt=\"Skip Over Navigation Bars to Content\" border=\"0\" /></a>");
		document.write("<a class=\"printable\" href=\"../index.html\" onmouseover=\"status='History of the Seagram Plant in Waterloo\\\'s Home Page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/titlemain.gif\" width=\"336\" height=\"55\" border=\"0\" alt=\"History of the Seagram Plant in Waterloo\'s Home Page\" /></a>");
	}

	document.write("</td>");
	document.write("<td align=\"right\" valign=\"bottom\">");
	document.write("<img src=\"../images/menu/titlerighttop.gif\" width=\"241\" height=\"55\" border=\"0\" alt=\"\" />");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td>");
	document.write("<table summary=\"\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\">");
	document.write("<tr>");
	document.write("<td align=\"left\" valign=\"top\">");

	if(logoImages[sublevels[0]]) {

		if(isFrench) {
			document.write("<img src=\"../images/menu/" + logoImages[sublevels[0]].replace('.gif','_fr.gif') + "\" width=\"290\" height=\"40\" border=\"0\" alt=\"\" align=\"left\">");
		} else {
			document.write("<img src=\"../images/menu/" + logoImages[sublevels[0]] + "\" width=\"290\" height=\"40\" border=\"0\" alt=\"\" align=\"left\">");
		}

	} else if(logoImages[mainlevel]) {

		if(isFrench) {
			document.write("<img src=\"../images/menu/" + logoImages[mainlevel].replace('.gif','_fr.gif') + "\" width=\"290\" height=\"40\" border=\"0\" alt=\"\" align=\"left\">");
		} else {
			document.write("<img src=\"../images/menu/" + logoImages[mainlevel] + "\" width=\"290\" height=\"40\" border=\"0\" alt=\"\" align=\"left\">");
		}

	} else {
		document.write("<img src=\"../images/menu/" + logoImages["other"] + "\" width=\"290\" height=\"40\" border=\"0\" alt=\"\" align=\"left\">");
	}

	document.write("</td>");
	document.write("<td align=\"right\" valign=\"bottom\">");
	document.write("<img src=\"../images/menu/titlerightbottom.gif\" width=\"293\" height=\"44\" border=\"0\" alt=\"\" />");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");


	document.write("</td>");
	document.writeln("</tr>");
	document.writeln("<tr>");

	document.write("<td width=\"180\" bgcolor=\"#FFCE71\" class=\"left-cell\" height=\"");

	var agent = navigator.userAgent.toLowerCase();
	var ns = ((agent.indexOf('mozilla') != -1) && (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('webtv') == -1) || (agent.indexOf('opera') != -1));
	var availheight;
	if (ns) {
		if (agent.indexOf('opera')!=-1) {
          availheight=innerHeight-135;
		} else if (navigator.appVersion.substring(0,1) < 5) {
          availheight=innerHeight-148;
		} else {
          availheight=innerHeight-130;
		}
	} else if(document.body.clientHeight) {
	    availheight=document.body.clientHeight-130;
	} else {
	    availheight=500;
	}

	document.write(availheight);
	document.write("\">");

	if(isFrench) {
		document.writeln("&nbsp;<a class=\"printable\" href=\"http://www.city.waterloo.on.ca\" onmouseover=\"status='Allez à la Home Page du Ville de Waterloo'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/citylogotext_small_fr.gif\" width=\"79\" height=\"41\" border=\"0\" alt=\"Ville de Waterloo\" /></a><br clear=\"all\" />");
	} else {
		document.writeln("&nbsp;<a class=\"printable\" href=\"http://www.city.waterloo.on.ca\" onmouseover=\"status='Go to the City of Waterloo\\'s Home Page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\"><img src=\"../images/menu/citylogotext_small.gif\" width=\"79\" height=\"41\" border=\"0\" alt=\"City of Waterloo\" /></a><br clear=\"all\" />");
	}

	makeMenu();

	if(isFrench) {
		document.write("<p class=\"update\">Dernier Mis à Jour: ");
	} else {
		document.write("<p class=\"update\">Last Updated: ");
	}

	var m = "" + document.lastModified;
	m=m.replace(/Monday/gi,"Mon");
	m=m.replace(/Tuesday/gi,"Tue");
	m=m.replace(/Wednesday/gi,"Wed");
	m=m.replace(/Thursday/gi,"Thu");
	m=m.replace(/Friday/gi,"Fri");
	m=m.replace(/Saturday/gi,"Sat");
	m=m.replace(/Sunday/gi,"Sun");
	m=m.replace(/January/gi,"Jan");
	m=m.replace(/February/gi,"Feb");
	m=m.replace(/March/gi,"Mar");
	m=m.replace(/April/gi,"Apr");
	m=m.replace(/May/gi,"May");
	m=m.replace(/June/gi,"Jun");
	m=m.replace(/July/gi,"Jul");
	m=m.replace(/August/gi,"Aug");
	m=m.replace(/September/gi,"Sep");
	m=m.replace(/October/gi,"Oct");
	m=m.replace(/November/gi,"Nov");
	m=m.replace(/December/gi,"Dec");
	var p = m.length-9;
	document.write(m.substring(0, p));

	document.writeln("</p>");
	document.writeln("</td>");
	document.write("<td class=\"rightcell\">");
	document.write("<a name=\"pagecontent\" id=\"pagecontent\"></a><a name=\"top\" id=\"top\"></a>");
	document.write("<table summary=\"Page Content\" width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" align=\"center\"><tr><td class=\"rightcell\">");


	document.write("<table summary=\"\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td align=\"left\" valign=\"top\" width=\"50%\">");

	if (previousItem[0]!="") {
		if(isFrench) {
			document.write("<a class=\"printable\" href=\""+previousItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Précédente</a>");
		} else {
			document.write("<a class=\"printable\" href=\""+previousItem[0]+"\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Previous Page</a>");
		}
		if (nextItem[0]=="") {
			if(isFrench) {
				document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Première Page</a>");
			} else {
				document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0]+"\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">First Page</a>");
			}
		}
	}
	if ((previousItem[0]!="")&&(nextItem[0]!="")) {
		document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small>");
	}
	if (nextItem[0]!="") {
		if(isFrench) {
			document.write("<a class=\"printable\" href=\""+nextItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Suivante</a>");
		} else {
			document.write("<a class=\"printable\" href=\""+nextItem[0]+"\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Next Page</a>");
		}
	}

	if ((previousItem[0]=="")&&(nextItem[0]=="")) {
		parentPage = location.href;
		if ((parentPage.indexOf('_thumbnails.html')!=-1)||(parentPage.indexOf('_video.html')!=-1)||(parentPage.indexOf('_thumbnails_fr.html')!=-1)||(parentPage.indexOf('_video_fr.html')!=-1)) {
			parentPage=parentPage.replace('_thumbnails','').replace('_video','');

			parentName = "Previous Page";

			if (mainlevel) {
				if ((mainlevel!='thumbnails')&&(mainlevel!='video'))
					parentName = "Previous Page";
				if (menuList[mainlevel])
					parentName=""+menuList[mainlevel][isFrench?'french':'text'];
			} if (sublevels[0]) {
				if ((sublevels[0]!='thumbnails')&&(sublevels[0]!='video'))
					parentName = "Previous Page";
				if (menuList[mainlevel][sublevels[0]])
					parentName=""+menuList[mainlevel][sublevels[0]][isFrench?'french':'text'];
			} if (sublevels[1]) {
				if ((sublevels[1]!='thumbnails')&&(sublevels[1]!='video'))
					parentName = "Previous Page";
				if (menuList[mainlevel][sublevels[0]][sublevels[1]])
					parentName=""+menuList[mainlevel][sublevels[0]][sublevels[1]][isFrench?'french':'text'];
			} if (sublevels[2]) {
				if ((sublevels[2]!='thumbnails')&&(sublevels[2]!='video'))
					parentName = "Previous Page";
				if (menuList[mainlevel][sublevels[0]][sublevels[1]][sublevels[2]])
					parentName=""+menuList[mainlevel][sublevels[0]][sublevels[1]][sublevels[2]][isFrench?'french':'text'];
			}

			document.write("<a class=\"printable\" href=\""+parentPage+"\" onmouseover=\"status='"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/\'/g,'\\\'').replace(/&/g,'&amp;')+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/&/g,'&amp;')+"</a>");
		}
	}

	document.write("</td><td align=\"center\" valign=\"top\">");

	if(isFrench) {
		document.write("<span lang=\"en\" xml:lang=\"en\"><a class=\"printable\" href=\""+location.href.replace('_fr.html','.html')+"\" onmouseover=\"status='Go to the english version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">English&nbsp;Version</a></span>");
	} else {
		if(enableFrench) {
			document.write("<span lang=\"fr\" xml:lang=\"fr\"><a class=\"printable\" href=\""+location.href.replace('.html','_fr.html')+"\" onmouseover=\"status='Allez à la Version&nbsp;Française de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version&nbsp;Française</a></span>");
		}
	}

	document.write("</td><td width=\"50%\" align=\"right\" valign=\"top\">");

	if(isFrench) {
		document.write("<a class=\"printable\" href=\""+currentItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='Allez au version imprimeur-amicale / accessible de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version Imprimable / Accessible<img src=\"../images/menu/accessibility.gif\" width=\"25\" height=\"20\" alt=\"\" align=\"top\" border=\"0\" /></a>");
	} else {
		document.write("<a class=\"printable\" href=\""+currentItem[0]+"?accessible\" onmouseover=\"status='Go to a printer-friendly / accessible version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Printable /  Accessible Version<img src=\"../images/menu/accessibility.gif\" width=\"25\" height=\"20\" alt=\"\" align=\"top\" border=\"0\" /></a>");
	}

	document.write("</td></tr></table>");
    document.write('');
}


//print out the last few lines of the page, ensuring that it is done
function endPage() {
	if(location.search.indexOf("?accessible")!=-1){
		document.write("<br clear=\"all\" /><table summary=\"Navigation\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td width=\"50%\" align=\"left\" valign=\"bottom\">");

		if (previousItem[0]!="") {
			if(isFrench) {
				document.write("<a class=\"printable\" href=\""+previousItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Précédente</a>");
			} else {
				document.write("<a class=\"printable\" href=\""+previousItem[0]+"?accessible\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Previous Page</a>");
			}
			if (nextItem[0]=="") {
				if(isFrench) {
					document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Première Page</a>");
				} else {
					document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0]+"?accessible\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">First Page</a>");
				}
			}
		}
		if ((previousItem[0]!="")&&(nextItem[0]!="")) {
			document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small>");
		}
		if (nextItem[0]!="") {
			if(isFrench) {
				document.write("<a class=\"printable\" href=\""+nextItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Suivante</a>");
			} else {
				document.write("<a class=\"printable\" href=\""+nextItem[0]+"?accessible\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Next Page</a>");
			}
		}

		if ((previousItem[0]=="")&&(nextItem[0]=="")) {
			parentPage = location.href;
			if ((parentPage.indexOf('_thumbnails.html')!=-1)||(parentPage.indexOf('_video.html')!=-1)||(parentPage.indexOf('_thumbnails_fr.html')!=-1)||(parentPage.indexOf('_video_fr.html')!=-1)) {
				parentPage=parentPage.replace('_thumbnails','').replace('_video','');
				document.write("<a class=\"printable\" href=\""+parentPage+"\" onmouseover=\"status='"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/\'/g,'\\\'').replace(/&/g,'&amp;')+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/&/g,'&amp;')+"</a>");
			}
		}
		document.write("</td><td align=\"center\" valign=\"bottom\">");

		if(isFrench) {
			document.write("<span lang=\"en\" xml:lang=\"en\"><a class=\"printable\" href=\""+location.href.replace('_fr.html','.html')+"\" onmouseover=\"status='Go to the english version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">English&nbsp;Version</a></span>");
		} else {
			if(enableFrench) {
				document.write("<span lang=\"fr\" xml:lang=\"fr\"><a class=\"printable\" href=\""+location.href.replace('.html','_fr.html')+"\" onmouseover=\"status='Allez à la Version&nbsp;Française de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version&nbsp;Française</a></span>");
			}
		}

		document.write("</td><td width=\"50%\" align=\"right\" valign=\"bottom\">");

		if(isFrench) {
			document.write("<a class=\"printable\" href=\""+currentItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='Allez à la version complète de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version Régulière de Page</a>");
		} else {
			document.write("<a class=\"printable\" href=\""+currentItem[0]+"\" onmouseover=\"status='Go to the complete version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Regular Version of Page</a>");
		}

		document.write("</td></tr></table>");
		if(isFrench) {
			document.write("</span>");
		}

		return 1;
	}
	document.write("</td>");
	document.write("</tr></table>");
	document.write("</td></tr>");

	document.write("<tr>");
	document.write("<td width=\"180\" height=\"21\" bgcolor=\"#FFCE71\" class=\"left-cell\">&nbsp;");
	document.write("</td>");
	document.write("<td class=\"rightcell\" height=\"21\">");

	document.write("<table summary=\"\" width=\"100%\" height=\"21\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" align=\"center\"><tr><td>");
	document.write("<table summary=\"\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td width=\"50%\" align=\"left\" valign=\"bottom\">");

	if (previousItem[0]!="") {
		if(isFrench) {
			document.write("<a class=\"printable\" href=\""+previousItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Précédente</a>");
		} else {
			document.write("<a class=\"printable\" href=\""+previousItem[0]+"\" onmouseover=\"status='"+previousItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Previous Page</a>");
		}
		if (nextItem[0]=="") {
			if(isFrench) {
				document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Première Page</a>");
			} else {
				document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small><a class=\"printable\" href=\""+firstItem[0]+"\" onmouseover=\"status='"+firstItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">First Page</a>");
			}
		}
	}
	if ((previousItem[0]!="")&&(nextItem[0]!="")) {
		document.write("<small><font color=\"#FFFFFF\">&nbsp;-&nbsp;</font></small>");
	}
	if (nextItem[0]!="") {
		if(isFrench) {
			document.write("<a class=\"printable\" href=\""+nextItem[0].replace('.html','_fr.html')+"\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Page Suivante</a>");
		} else {
			document.write("<a class=\"printable\" href=\""+nextItem[0]+"\" onmouseover=\"status='"+nextItem[1]+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Next Page</a>");
		}
	}

	if ((previousItem[0]=="")&&(nextItem[0]=="")) {
		parentPage = location.href;
		if ((parentPage.indexOf('_thumbnails.html')!=-1)||(parentPage.indexOf('_video.html')!=-1)||(parentPage.indexOf('_thumbnails_fr.html')!=-1)||(parentPage.indexOf('_video_fr.html')!=-1)) {
			parentPage=parentPage.replace('_thumbnails','').replace('_video','');
			document.write("<a class=\"printable\" href=\""+parentPage+"\" onmouseover=\"status='"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/\'/g,'\\\'').replace(/&/g,'&amp;')+"'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">"+(isFrench?'De nouveau à':'Back to')+" "+parentName.replace(/&/g,'&amp;')+"</a>");
		}
	}

	document.write("</td><td align=\"center\" valign=\"bottom\">");

	if(isFrench) {
		document.write("<span lang=\"en\" xml:lang=\"en\"><a class=\"printable\" href=\""+location.href.replace('_fr.html','.html')+"\" onmouseover=\"status='Go to the english version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">English&nbsp;Version</a></span>");
	} else {
		if(enableFrench) {
			document.write("<span lang=\"fr\" xml:lang=\"fr\"><a class=\"printable\" href=\""+location.href.replace('.html','_fr.html')+"\" onmouseover=\"status='Allez à la Version&nbsp;Française de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version&nbsp;Française</a></span>");
		}
	}

	document.write("</td><td width=\"50%\" align=\"right\" valign=\"bottom\">");

	if(isFrench) {
		document.write("<a class=\"printable\" href=\""+currentItem[0].replace('.html','_fr.html')+"?accessible\" onmouseover=\"status='Allez au version imprimeur-amicale / accessible de cette page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Version Imprimable / Accessible<img src=\"../images/menu/accessibility.gif\" width=\"25\" height=\"20\" alt=\"\" align=\"absbottom\" border=\"0\" /></a>");
	} else {
		document.write("<a class=\"printable\" href=\""+currentItem[0]+"?accessible\" onmouseover=\"status='Go to a printer-friendly / accessible version of this page'; return true;\"  onmouseout=\"status=defaultStatus; return true;\">Printable /  Accessible Version<img src=\"../images/menu/accessibility.gif\" width=\"25\" height=\"20\" alt=\"\" align=\"absbottom\" border=\"0\" /></a>");
	}

	document.write("</td></tr></table>");
	document.write("</td></tr></table>");

	document.write("</td>");
	document.write("</tr>");

	document.write("</table>");

	if(isFrench) {
		document.write("</span>");
	}
    document.write('');
}

//print out the site map, basically just the menu system expanded fully
function MapIt() {
	mapping = 1;
	makeMenu();
	mapping = 0;
}

var SeagramNewWindow = null;
function PopIt(URL,width,height) {
	SeagramNewWindow = window.open(URL,'SeagramItemWindow','width='+width+',height='+height+',scrollbars=yes,resizable=yes,titlebar=no,menubar=no,status=no,toolbar=no,location=no,directories=no,top=100,left=100');
	if (window.focus) {
		SeagramNewWindow.focus();
	}
}

var styleNotWritten=true;
function ClosePop() {

	page = location.href;
	page = page.toLowerCase();
	if(page.indexOf('_fr.')!=-1){
		isFrench=true;
	}

	if((location.search.indexOf("?accessible")!=-1)&&(styleNotWritten)){
		document.write("<link href=\"../nostyles.css\" type=\"text/css\" rel=\"stylesheet\" />");
		styleNotWritten=false;
		if(isFrench) {
			document.write("<span lang=\"fr\" xml:lang=\"fr\">");
		}
	} else {
		if(isFrench) {
			document.write("</span>");
		}
	}

	if(isFrench) {
		document.write('<p align="center"><a href="javascript:window.close();" class="printable">Fermer Fenêtre</a></p>');
	} else {
		document.write('<p align="center"><a href="javascript:window.close();" class="printable">Close Window</a></p>');
	}

    document.write('');
}

function UnPopIt() {
	if (SeagramNewWindow && SeagramNewWindow.open && !SeagramNewWindow.closed) {
		SeagramNewWindow.close();
	}
}

    // 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 4")!=-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));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1); 

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

function embedIt(movie, width, height, bgcolor, title){
	if(is_ie) {
		document.write('<object title="'+title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'"><param id="bgcolor" value="'+bgcolor+'" name="bgcolor" /><param id="Movie" value="'+movie+'" name="Movie" /><param name="menu" value="true" /><param name="quality" value="high" /></object>');
	} else if (is_opera2 || is_opera3 || is_opera4 || is_opera5 || is_nav2 || is_nav3 || is_nav4 ) {
		document.write('<object title="'+title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'"><param id="bgcolor" value="'+bgcolor+'" name="bgcolor" /><param id="Movie" value="'+movie+'" name="Movie" /><param name="menu" value="true" /><param name="quality" value="high" /><embed src="'+movie+'" menu="false" quality="high" bgcolor="'+bgcolor+'"  width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" title="'+title+'"></embed></object>');
	} else {
		document.write('<object title="'+title+'" type="application/x-shockwave-flash" height="'+height+'" width="'+width+'" data="'+movie+'"><param id="bgcolor" value="'+bgcolor+'" name="bgcolor" /><param id="Movie" value="'+movie+'" name="Movie" /><param name="menu" value="true" /><param name="quality" value="high" /></object>');
	}
    document.write('');
}
