  but_about_Off = new Image();
  but_about_Off.src = "images/but_about_off.gif";
  but_about_On = new Image();
  but_about_On.src = "images/but_about_on.gif";
  but_contact_Off = new Image();
  but_contact_Off.src = "images/but_contact_off.gif";
  but_contact_On = new Image();
  but_contact_On.src = "images/but_contact_on.gif";
  but_gallery_Off = new Image();
  but_gallery_Off.src = "images/but_gallery_off.gif";
  but_gallery_On = new Image();
  but_gallery_On.src = "images/but_gallery_on.gif";
  but_home_Off = new Image();
  but_home_Off.src = "images/but_home_off.gif";
  but_home_On = new Image();
  but_home_On.src = "images/but_home_on.gif";
  but_location_Off = new Image();
  but_location_Off.src = "images/but_location_off.gif";
  but_location_On = new Image();
  but_location_On.src = "images/but_location_on.gif";
  but_news_Off = new Image();
  but_news_Off.src = "images/but_news_off.gif";
  but_news_On = new Image();
  but_news_On.src = "images/but_news_on.gif";
  but_services_Off = new Image();
  but_services_Off.src = "images/but_services_off.gif";
  but_services_On = new Image();
  but_services_On.src = "images/but_services_on.gif";
  but_weblinks_Off = new Image();
  but_weblinks_Off.src = "images/but_weblinks_off.gif";
  but_weblinks_On = new Image();
  but_weblinks_On.src = "images/but_weblinks_on.gif";

function buildMenu()
{
  arrMenuHTML = new Array("home", "about","services", "gallery","location","contact", "news", "weblinks");
  txtMenuHTML = '';
  txtMenuHTML+= '<table cellspacing="0" cellpadding="0" border="0"><tr><td rowspan="16">';
  txtMenuHTML+= '<img src="images/blank.gif" width="20" height="100"></td><td><img src="images/blank.gif" width="1" height="20">';
  txtMenuHTML+= '</td></tr>';
  for (i=0; i<arrMenuHTML.length; i++)
  {
    txtMenuHTML+= '<tr><td>';
    txtMenuHTML+= '<a href="'+arrMenuHTML[i]+'.html" onmouseover="imgAct(\''+arrMenuHTML[i]+'\',1);"';
    txtMenuHTML+= ' onmouseout="imgInact(\''+arrMenuHTML[i]+'\',1);"><img src="images/but_'+arrMenuHTML[i]+'_off.gif"';
    txtMenuHTML+= ' width="93" height="27" border="0" name="'+arrMenuHTML[i]+'"></a></td></tr>';
    txtMenuHTML+= '<tr><td><img src="images/blank.gif" width="1" height="5"></td></tr>';
  }
  txtMenuHTML+='</table>';
  document.write(txtMenuHTML);
}

function PEDaddress()
{
  txtAddressHTML = '';
  txtAddressHTML+= '<img src="images/blank.gif" width="10" height="87" border="0" align="left"><br />';
  txtAddressHTML+= '<b>Precision Engineering Design Ltd</b>,<br />GMS House, Boundary Road, Woking, Surrey, GU21 5BX, UK<br />';
  txtAddressHTML+= 'Tel: +44(0)1483 722610<br />Fax: +44 (0)8707 625404<br />';
  txtAddressHTML+= 'e-mail:- <a href="mailto:ped@p-e-d.co.uk">paul-and-richard@p-e-d.co.uk</a>';
  document.write(txtAddressHTML);
}

function imgAct(imgName,imgNum) {
	//if (imgNum!=sampimg) {
		if (document.images) {
	//	  if (document.getElementById) {
  		  	  eval("document.images['"+imgName+"'].src = but_"+imgName + "_On.src");
	//	  } else {
	//	    eval(docLay+brackl+"'dstimga'"+brackr+".document.images['"+imgName+"'].src = "+imgName + "On.src");
	//	  }
    	}
//	}
}
function imgInact(imgName,imgNum) {
	//if (imgNum!=sampimg) {
		if (document.images) {
		 // if (document.getElementById) {
  		  	  eval("document.images['"+imgName+"'].src = but_"+imgName + "_Off.src");
		 // } else {
		 //   eval(docLay+brackl+"'dstimga'"+brackr+".document.images['"+imgName+"'].src = "+imgName + "Off.src");
		 // }
		}
	//}
}

function check_email(e) {
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){
return (false);
}}
if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);		
}}}

function check_form(f) {

if(f.name.value.length < 1){
alert("You entered less than one character in the name field.");
f.name.focus();
if(document.all || document.getElementByID){
f.name.style.background = "yellow";
}
return false;
}

if(f.email.value.length < 1){
alert("You entered less than one character in the email field.");
f.email.focus();
if(document.all || document.getElementByID){
f.email.style.background = "yellow";
}
return false;
}

if(!check_email(f.email.value)){
alert("Invalid email detected.");
f.email.focus(); 
if(document.all || document.getElementByID){
f.email.style.background = "yellow";
}
return false;
}}

function switch_map() {
document.images['mapimg'].src = map_img.src;
}
