// Version 2 dated 14.11.03 by PS
var page = document.location.href;
// each element of array made up of:
// [Name,Link,External Link?,Sub menu?]
var Menu 	= new Array();

if (page.indexOf("lstz_")>-1)
{
	var tempArray = page.split ("/");
	var currentPage = tempArray[tempArray.length-1];
	page = page.replace ( currentPage, "lstz_tutorzone_login.php");
}


Menu[0] 	= 
["HOME","http://fletchers.webdadi.biz/default.dtx?content=home",0,0];
Menu[1] 	= 
["SEARCH SALES","http://fletchers.webdadi.biz/default.dtx?content=search_sales",0,0];
Menu[2] 	= 
["SEARCH RENTALS","http://fletcherl.webdadi.biz/default.dtx?content=search_lettings",0,0];
Menu[3] 	= 
["REGISTER WITH US","http://fletchers.webdadi.biz/registration.dtx",0,0];
Menu[4] 	= 
["OFFICES","http://fletchers.webdadi.biz/offices.dtx",0,0];
Menu[5] 	= 
["REQUEST VALUATION","http://fletchers.webdadi.biz/evaluation.dtx",0,0];



// -------------------------------------------------------------------------
// do not edit below this line!!
// Last Update 22/03/04

// variables for highlighting section/subsection
var showSection = false;
var showSubSection = false;
var output = output2 = output3 = "";
var breadcrumbs = "";
var sectionLink = "";

var next_link = "";
var next_text = "";
for (i=0; i<Menu.length;i++)
{
	showSection = comparePage(Menu[i][1],page) ? true : false;
	output3="";
	if (Menu[i][3]==1 && Menu[i][4]!="undefined") // sub nav
	{
		
		for (j=4; j<Menu[i].length;j++)
		{
			breadcrumbsSec="<span class=\"darkgreen1\"> > </span><a href=\"" + Menu[i][j][1] + "\" class=\"darkgreenlink1\">" + Menu[i][j][0] + "</a> " + breadcrumbs;
		
			showSubSection = comparePage(Menu[i][j][1],page) ? true : false;
			output2="";
			output4="";
			for (k=4; k<Menu[i][j].length;k++)
			{
				if (comparePage(Menu[i][j][k][1],page))
				{
					output2 += output4 + showTable(Menu[i][j][k][0],Menu[i][j][k][1],showSection,20,true,"",Menu[i][j][k][2]);
				if (k+1 <Menu[i][j].length)
				next_link = Menu[i][j][k+1][1];
				else if (k!=4)
				next_link = Menu[i][j][4][1];
				next_text = "Sub Article";
					showSubSection=showSection=true;
					breadcrumbs+=breadcrumbsSec;
					breadcrumbs+="<span class=\"darkgreen1\"> > </span><a href=\"" + Menu[i][j][k][1] + "\" class=\"darkgreenlink1\">" + Menu[i][j][k][0] + "</a> ";
					output4="";
				}
				else if (showSubSection)
				{
				output2 += showTable(Menu[i][j][k][0],Menu[i][j][k][1],showSection,20,false,"",Menu[i][j][k][2]);

				}
				else
				output4 += showTable(Menu[i][j][k][0],Menu[i][j][k][1],showSection,20,false,"",Menu[i][j][k][2]);
				
			}
			
			if (comparePage(Menu[i][j][1],page))
			{
				showSection=true;
				if (j+1 <Menu[i].length)
				{
					next_link = Menu[i][j+1][1];
					next_text = Menu[i][j+1][0];
				}
				else if (j!=4)
				{
					next_link = Menu[i][4][1];
					next_text = Menu[i][4][0];
				}

				breadcrumbs=breadcrumbsSec + breadcrumbs;
			}
			output3 += showTable(Menu[i][j][0],Menu[i][j][1],showSection,15,comparePage(Menu[i][j][1],page) ? true: false,"",Menu[i][j][2]) + output2;
			output3 = output3.replace("replace"," bgcolor='#004685'");
		

			if (showSection && next_text=="")
			{
				if (i+1 < Menu.length)
				next_link = Menu[i+1][1];
				else
				next_link = Menu[0][1];
				next_text = "Feature";
			}
		}
		if (!showSubSection && !showSection)
		output3="";
		else 
		{
			var featureLink=Menu[i][1];
			
			if (Menu[i][1]=="undefined" || Menu[i][1]=="")
			featureLink=Menu[i][4][1];
			breadcrumbs="<a href=\"" + featureLink + "\" class=\"darkgreenlink1\">" + Menu[i][0] + "</a> " + breadcrumbs;
		}
				
	}
	if (Menu[i][1]=="")
	sectionLink = Menu[i][4][1];
	else 
	sectionLink = Menu[i][1];

	output += showTable(Menu[i][0], sectionLink, showSection,10, comparePage(Menu[i][1],page) ? true : false, showSubSection || showSection ? "" : "bgcolor='#004685'",Menu[i][2]) + output3;
	showSubSection=false; // added 02.03.04 by PS
}
breadcrumbs = "<a href=\"" + Menu[0][1] + "\" class=\"darkgreen2\">Dinosaurs Home</a><span class=\"darkgreenlink1\"> > </span>" + breadcrumbs;
output = "<table><tr><td height=\"30\"><img src=\"http://" + window.location.host + "/public/images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"/></td></tr></table>" + output.replace ("replace"," ");




function comparePage (check,current)
{
	var returnValue = false;
	check = check.replace ("\.\.\/","");
	if (current.match(check)) returnValue=true;
	if (check==current) returnValue=true;
	if (check=="") returnValue=false;
	return returnValue;
}

function showNext()
{
	if (next_link!="")
	return "<a href=\"" + next_link + "\" class=\"greenlink1\"><b>" + next_text + "</b> <img src=\"../_includes/sitewide_images/arrow_next.gif\" width=\"20\" height=\"6\" alt=\"\" border=\"0\"/></a>";
	else
	return "";
}

var hidden=false;
var pixelsb4 = "";
var oldSection = false;

function showTable(name,link,show,pixels,highlight,bgcolor2,target)
{
	bgcolor = show ? "bgcolor='#FF0000'" : "replace";
	nav 	= highlight ? "nav2" : "nav";
	target 	= target==1 ? "target=_new" : "";
	isOn 	= highlight ? "_on" : "";
	var returnString = "";

	//returnString += pixels + " " + pixelsb4 + " " + showSection + " " + showSubSection;

	if (pixels==10 && hidden && pixelsb4)
	returnString +="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"156\"  " + bgcolor2 + ">" + 
	"<tr><td height=\"1\" " + bgcolor2 + "><img src=\"http://snellerss.webdadi.biz/public/files/17981E29-C2A1-411B-BA1B-D6FFF09DECC5/client_files/F7CFF135-5652-418D-9D30-E5F93928A9A3/img/nav_divider.gif\" width=\"156\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 
	"</tr></table>";

	
	returnString += "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"156\" " + bgcolor + "><tr>" +
	"<td width=\"10\"><img src=\"http://" + window.location.host + "/public/images/blank.gif\" width=\"" + pixels + "\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 
	"<td width=\"156\" height=\"25\" align=\"right\" valign=\"middle\"><a href=\"" + link + "\" " + target + " class=\"" + nav + "\"><b>" + name + "</b></a></td>" + 
	
	//"<td width=14><a href=\"" + link + "\" " + target + " class=\"" + nav + "\"><img src=\"_includes/sitewide_images/arrow_nav" + isOn + ".gif\" width=\"7\" height=\"6\" alt=\"\" border=\"0\"/></a>" + 
	//"<img src=\"_includes/sitewide_images/blank.gif\" width=\"5\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 
	
	"</tr></table>"; 
	
	if (pixels==10 && !hidden && pixelsb4)
	{
	returnString +="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"156\"  " + bgcolor2 + ">" + 
	"<tr><td height=\"1\" " + bgcolor2 + "><img src=\"images/nav_divider.gif\" width=\"156\" height=\"1\" alt=\"\" border=\"0\"/></td>" + 
	"</tr></table>";
	hidden=false
	}
	else
	hidden = true;

	oldSection = showSubSection;
	pixelsb4 = pixels;
	return returnString;
}
next = showNext();
