function doHighlight(elem,n,pageName)
{if (pageName == thisPage) return
 switch(n)
 	{case -1:
		elem.style.backgroundColor = "transparent";
		break;
	 case 1:
	 	elem.style.backgroundColor = "#1b3c86";
		break;
	}
}

function _document_onclick(e)
		{var event = e ? e : window.event;
 		 var target = e ? event.target : event.srcElement;
		 switch(target.id)
		 	{case "home":
			 	window.location = "index.htm"
				break;
			 case "van":
			 	window.open("http://www.vanillaactive.com","blank");
				break;
			 case "about":
			 	window.location = "aboutUs.htm"
				break;
			 case "repo":
			 	window.location = "repo.htm"
				break;
			 case "difficulties":
			 	window.location = "difficulties.htm"
				break;
			 case "bereaved":
			 	window.location = "bereaved.htm"
				break;
			 case "sell":
			 	window.location = "sell.htm"
				break;
			 case "over60":
			 	window.location = "over60.htm"
				break;
			 case "emigrate":
			 	window.location = "emigrate.htm"
				break;
			 case "Commercial":
			 	window.location = "Commercial.htm";
				break;
			 case "Disposal":
			 	window.location = "Disposal.htm";
				break;
			 case "Problem":
			 	window.location = "Problem.htm";
				break;
			 case "faqs":
			 	window.location = "faqs.cfm";
				break;
			 case "Works":
			 	window.location = "Works.htm";
				break;
			 case "contact":
			 	try {window.location = "contact.htm?ref="+theLink.toString(10);}catch(e){window.location = "contact.htm";}
				break;
			 case "save":
			 	var errMess = ""
				var errMesses = "You must enter your name\n,You must enter the property address\n,You must enter the Post Code\n,You must enter a contact number".split(",");
				var textFields2Check ="theName,address,thePCode,theTelHome".split(",")
				for(var i = 0;i < textFields2Check.length;i++)
					{if(document.getElementById(textFields2Check[i]).value == ""){errMess += errMesses[i]}}
				if(errMess != ""){alert(errMess);return}
				document.forms.theData.submit();
				break;
				
			}
		}
function doFocus(elem)
{document.getElementById(elem).focus();}
function doReset(theElem)
{theElem.style.color = '#ffffff';}
function doChange(theElem)
{theElem.style.color = '#000000';}
function getParam()
{var theOff = window.location.toString().split("=");
(typeof theOff[1]).toString() != "string" ? theRef = 0 : theRef = theOff[1]
 if(theRef != 0) {document.forms.theData.reason.selectedIndex = theRef}
}	
if (document.layers) document.captureEvents(Event.ONCLICK);
				document.onclick = _document_onclick;
				

