
		// Reference Locations
		var baseURL = window.location.hostname
		//baseURL = "http://" + baseURL + "" //Comment out before publishing
		baseURL = ".." //Comment out before publishing
		var imagesURL = baseURL +"/images"
		var curSection = getSection()
		var curFile = getFile()
		
		// Stylesheet
		document.write('<LINK REL=STYLESHEET href="' + baseURL + '/styles/uplands.css" TYPE="text/css" title="uplandsStyle">')
		
		// Menu Definition
		var menuUplands = new menuDefinition()		
		with (menuUplands){			
			addMenuItem("sitemap", "menu1")
			addMenuItem("privacypolicy", "menu1")
			addMenuItem("faq", "menu1")
			addMenuItem("home", "menu2")
			addMenuItem("recipes", "menu2")			
			addMenuItem("ourproducts", "menu2")
			addMenuItem("familysection", "menu2")
			addMenuItem("ourheritage", "menu2")
			addMenuItem("testimonials", "menu2")
			addMenuItem("howtoorder", "menu2")			
			addMenuItem("outlets", "menu2")
			addMenuItem("contactus", "menu2")
		}
		
		// ***********************************************************************
		// Gets the current section
		// ***********************************************************************
		function getSection () {
			var temp = location.href.substring(0,location.href.lastIndexOf("/"))
			temp = temp.substring(temp.lastIndexOf("/")+1, temp.length)
			return temp
		}
		
		// ***********************************************************************
		// Gets the current file
		// ***********************************************************************
		function getFile() {
			return location.href.substring(location.href.lastIndexOf("/") + 1,location.href.length)
		}		
		
		// ***********************************************************************
		// Menu Object
		// ***********************************************************************
		function menuDefinition() {
			var arrTemp = new Array()
			arrTemp.addMenuItem = addMenuItem //adds a new menu item
			arrTemp.loadImages = loadImages
			return arrTemp
		}		

		// ***********************************************************************
		// Constructor for menu item
		// ***********************************************************************
		function addMenuItem(menuName, menuType){
			var intMenu = this.length
			var objTemp = new Object()			
			objTemp.name = menuName
			objTemp.type = menuType			
			this[intMenu] = objTemp		
		}
		
		// ***********************************************************************
		// Constructor for adding a graphic image
		// ***********************************************************************
		function loadImages(){
			var intMenu = this.length			
			for (var i=0;i<intMenu; i++) {
				this[i].hi = new Image()
				this[i].hi.src = imagesURL + "/" + this[i].name + "_hi.gif"
			}
		}
		
		function createMenu1(){
			var menu1 = ""
			menu1 += '<table border="0" cellpadding="0" cellspacing="0">'
			menu1 += '<tr>'
			for (var i=0; i<menuUplands.length; i++){
				if (menuUplands[i].type == "menu1") {
					menu1 += '<td>'
					if (menuUplands[i].name == curSection && curFile == "index.html") {
						menu1 += '<img border="0" src="' + imagesURL + "/" + menuUplands[i].name +"_hi.gif" + '">' // section and index	
					} else {
					    if (menuUplands[i].name == curSection) {
							menu1 += '<a href="' + baseURL + '/' + menuUplands[i].name + 'index.html' + '">'
							menu1 += '<img border="0" src="' + imagesURL + "/" + menuUplands[i].name +"_hi.gif" + '">'
							menu1 += '</a>' // section not index
						} else {
							menu1 += '<a href="' + baseURL + '/' + menuUplands[i].name + "/" + 'index.html' + '">'						
							menu1 += '<img id="' + menuUplands[i].name + '" border="0" src="' + imagesURL + "/" + menuUplands[i].name +"_lo.gif" + '" '
							menu1 += 'onMouseOver="this.src=\'' + imagesURL + "/" + menuUplands[i].name + '_hi.gif\'" '
							menu1 += 'onMouseOut="this.src=\'' + imagesURL + "/" + menuUplands[i].name + '_lo.gif\'" '
							menu1 += '</a>' // not section
						}
					}
					menu1 += '</td>'					
				}
				if ( i+1 < menuUplands.length) {
					if (menuUplands[i + 1].type == "menu1") {
						menu1 += '<td><img border="0" src="' + imagesURL + "/" + "submenu_divider.gif" + '"></td>' // divider
					}
				}
			}
			menu1 += '<td><img src="' + baseURL + "/" + 'images/spacer.gif" height="24" width="9">'
			menu1 += '</tr>'
			menu1 += '</table>'			
            return menu1                  
		}
		
		function createMenu2() {
			var menu2 = ""
			menu2 += '<table border="0" cellpadding="0" cellspacing="0" width="144">'			
			for (var i=0; i<menuUplands.length; i++){
				if (menuUplands[i].type == "menu2") {
					menu2 += '<tr>'
					menu2 += '<td>'
					if (menuUplands[i].name == curSection && curFile == "index.html") {
						menu2 += '<img border="0" src="' + imagesURL + "/" + menuUplands[i].name +"_hi.gif" + '">' // section and index	
					} else {
					    if (menuUplands[i].name == curSection) {
							menu2 += '<a href="' + baseURL + '/' + menuUplands[i].name + '/index.html' + '">'
							menu2 += '<img border="0" src="' + imagesURL + "/" + menuUplands[i].name +"_hi.gif" + '">'
							menu2 += '</a>' // section not index
						} else {
							menu2 += '<a href="' + baseURL + '/' + menuUplands[i].name + "/" + 'index.html' + '">'						
							menu2 += '<img id="' + menuUplands[i].name + '" border="0" src="' + imagesURL + "/" + menuUplands[i].name +"_lo.gif" + '" '
							menu2 += 'onMouseOver="this.src=\'' + imagesURL + "/" + menuUplands[i].name + '_hi.gif\'" '
							menu2 += 'onMouseOut="this.src=\'' + imagesURL + "/" + menuUplands[i].name + '_lo.gif\'" '
							menu2 += '</a>' // not section
						}
					}
					menu2 += '</td>'	
					menu2 += '</tr>'				
				}
			}
			menu2 += '</table>'
            return menu2
		}	
		
		function createHeader(){
			var header = ""
			header += '<table border="0" cellpadding="0" cellspacing="0">'
            header += '<tr>'
            header += '<td><img border="0" src="' + imagesURL + "/" + 'logo.gif" width="287" height="57"></td>'
            header += '<td><img border="0" src="' + imagesURL + "/" + 'thetaste.gif" width="300" height="57"></td>'
            header += '<td><img border="0" src="' + imagesURL + "/" + 'piggy.jpg" width="173" height="57"></td>'
            header += '</tr>'
            header += '<tr>'
			header += '<td colspan="3" align="right" height="14" background="' + imagesURL + "/" + 'banner.jpg">'
			header += createMenu1()
			header += '</td>'				
            header += '</tr>'
			header += '</table>'
			return header
		}
		
		function createFooter(){
			return '<p class="footer">© 2004 Uplands Meat Products Inc.</p>'
		}
		
		function ready(){			
			menuUplands.loadImages()
		}
