<!--//--><![CDATA[//><!--
startList = function() {
if (document.getElementById) {
	var baseId = document.getElementsByTagName('body')[0].id;// these  3 lines set currently selected item to on
	var addclass= "xx" + baseId
	document.getElementById(addclass).className ="on";
	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
		node.onclick=function() {		
		this.className = (this.className == "on") ? "off" : "on";

			}
   		}
  	}
 	var imageArray = new Array('menu1.gif', 'menu2.gif', 'menu3.gif', 'menu4.gif'); 
	var img =  new Image(); 
	for(var i=0;i<imageArray.length;i++)
	{
	 
img.src=imageArray[i];     
}
 
 
 }



	 














}
window.onload=startList;
//--><!]]>




























 



var item = new Array();

// "Page Name","path","Page Title","Many,Key,Words","Descriptive Comments"


c=0; item[c]=new Array("contact.htm","","Contact Us","contact,email,visit,address,phone","This page contains contact information for The Farm Environment Ltd.");

c++; item[c]=new Array("events","","Book a Course","courses,events,course","This page contains all upcoming events.");



c++; item[c]=new Array("sitemap.htm","","Sitemap","navigation,sitemap,help","This page contains all the links used within the website.");

c++; item[c]=new Array("index.htm","","Home","home,who,what,how,our,your,wider,services,about","Welcome to The Farm Environment Ltd official website.");

c++; item[c]=new Array("login.htm","","Staff Area","staff,login,secure,email,databases,cpanel,remote","This page is for staff members wishing to login to their account remotely.");

c++; item[c]=new Array("our.htm","","Our Farm Environment","our,who,what,how,contact,summary","This page summarises what The Farm Environment Ltd is all about.");

c++; item[c]=new Array("who.htm","","Who We Are","who,tony,tony seymour,seymour,rory sandison,advisors,advice,advisers,staff","This page introduces our members of staff.");

c++; item[c]=new Array("how.htm","","How We Do It","environmental,carbon,credentials,methods","This page explains our ethos to farm management and the methods we use.");

c++; item[c]=new Array("what.htm","","What We Do","enviro,srdp,arcgis,phase,nvc,difuse pollution,pond,hedge,course,habitat,what,advice,agri,ecological,grant,fund,survey,assess,monitoring,training,conservation","This page explains what services we offer.");

c++; item[c]=new Array("your.htm","","Your Farm Environment","your,questionnaire,gallery,photos,help,service","This page explains what The Farm Environment Ltd can do for you.");

c++; item[c]=new Array("need.htm","","Do You Need","inspiration,services,training,help","This page provides a summary of how The Farm Environment Ltd can help you.");

c++; item[c]=new Array("making.htm","","Making It Work","will,time,want,case,projects","This page shows examples of previous successes.");

c++; item[c]=new Array("us.htm","","Why Choose Us","Why,succes,tesimon,feedback","This page explains why to choose The Farm Environment Ltd.");

c++; item[c]=new Array("know.htm","","Do You Know","what,important,price,how,when,cost","This page explains what information is useful to know.");

c++; item[c]=new Array("your.htm","","The Wider Farm Environment","wider,friends,associates,partners,colleagues,farm","This page provides information on orginisations that The Farm Environment Ltd associate with.");

c++; item[c]=new Array("links.htm","","Farm Businesses and Links","links,businesses,friends","This page provides a list of farm businesses and useful links.");

c++; item[c]=new Array("associatespartners.htm","","Associates and Partners","partners,colleagues,associates,friends","This page provides a list of associates and partners.");


c++; item[c]=new Array("blog","","Official Blog","blog,updates,news,twitter,facebook,contact,courses","This page provides regular updates at The Farm Environment Ltd.");



page="<html><head><title>Search Results</title></head><body bgcolor=#ffffff><blockquote><img width=250 src=http://www.farmenvironment.co.uk/logo.png><br/><br/><font face=Arial color=#444444 size=2><p>";


function search(frm) {
win = window.open ("searchresults");

win.document.write(page);
txt = frm.srchval.value.split(" ");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++) {
fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")
fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++) {
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)
if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w] = 0;
}
win.document.write("Results Found: "+total+"<br/></p></blockquote></font></body></html>");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0]; 
line = "<a href='"+link+"'>"+item[which][2]+"</a><br/> Relevance Rating: "+num+"<br/>";
line += item[which][4] + "<br/><i>www.farmenvironment.co.uk/"+link+"</i><br/><br/>";
wind.document.write(line);
return 1;
}

	function validate()
 	{

	 if(document.form.name.value == "")
  		{
			window.alert('Please enter your Name');
  			return false;
  		}


		 if(document.form.email.value == "")
  		{
			window.alert('Please enter your Email Address');
  			return false;
  		}
 		


	

		if(document.form.message.value == "")
  		{
			window.alert('Please enter your Message');
  			return false;
  		}

  		else
    		return true; 
 	}


