<!-- 
// updated 21 October 2004

function validate(form) {
if ( findwebsiteOK(form) == false || otherfindwebsite(form) == false || searchengine(form)== false || anothersite(form)== false || ratewebsiteOK(form) == false || otherusewebsitecheck(form) == false || feedbackcontactname(form)== false  || feedbackcontactemail(form)== false ) {
	return false;
	 } else 
	 {
	document.location = "#end" ;
	form.submit.title = "Your message is being sent \n This may take up to a minute." ;
	searchengine(form);
	anothersite(form);
	otherfindwebsite(form);
	findwebsite2(form);
	useGenintsendvalue(form);
	useFormLeafsendvalue(form);
	useJudgmentssendvalue(form);
	useDailyListssendvalue(form);
	useLegProcsendvalue(form);
	useAboutHMCSsendvalue(form);
	useAboutDCAsendvalue(form);
	useAddresssendvalue(form);
	useMakeClaimsendvalue(form);
	useOthersendvalue(form);
	feedbackcontactname(form);
	feedbackcontactemail(form);
	otherusewebsitecheck(form);
	return true;
	form.reset();
	 }
}

function findwebsiteOK(form) {
  if (form.findwebsite[0].checked == false && 
  form.findwebsite[1].checked == false &&
  form.findwebsite[2].checked == false &&
  form.findwebsite[3].checked == false &&
  form.findwebsite[4].checked == false) {
	document.location ="#findwebsite" ; // named anchor so HTML page goes back to section to complete
	   alert("Please tell us how you found the website \n \n Please select one option.");
		return false;
			}
  else {
   return true;
   }
}


function useGenintsendvalue(form) {
if (form.xxxxxuseGenInt.checked) {
form.useGenInt.value = "yes";
 }
else {
form.useGenInt.value = "not selected";
 }
}

function useFormLeafsendvalue(form) {
if (form.xxxxxuseFormLeaf.checked) {
form.useFormLeaf.value = "yes";
 }
else {
form.useFormLeaf.value = "not selected";
 }
}

function useJudgmentssendvalue(form) {
if (form.xxxxxuseJudgments.checked) {
form.useJudgments.value = "yes";
 }
else {
form.useJudgments.value = "not selected";
 }
}

function useDailyListssendvalue(form) {
if (form.xxxxxuseDailyLists.checked) {
form.useDailyLists.value = "yes";
 }
else {
form.useDailyLists.value = "not selected";
 }
}


function useLegProcsendvalue(form) {
if (form.xxxxxuseLegProc.checked) {
form.useLegProc.value = "yes";
 }
else {
form.useLegProc.value = "not selected";
 }
}

function useAboutHMCSsendvalue(form) {
if (form.xxxxxuseAboutHMCS.checked) {
form.useAboutHMCS.value = "yes";
 }
else {
form.useAboutHMCS.value = "not selected";
 }
}

function useAboutDCAsendvalue(form) {
if (form.xxxxxuseAboutDCA.checked) {
form.useAboutDCA.value = "yes";
 }
else {
form.useAboutDCA.value = "not selected";
 }
}


function useAddresssendvalue(form) {
if (form.xxxxxuseAddress.checked) {
form.useAddress.value = "yes";
 }
else {
form.useAddress.value = "not selected";
 }
}

function useMakeClaimsendvalue(form) {
if (form.xxxxxuseMakeClaim.checked) {
form.useMakeClaim.value = "yes";
 }
else {
form.useMakeClaim.value = "not selected";
 }
}

function useOthersendvalue(form) {
if (form.xxxxxuseOther.checked) {
form.useOther.value = "yes";
 }
else {
form.useOther.value = "not selected";
 }
}

function getSelectedButton(buttonGroup){
	for (var i = 0; i < buttonGroup.length; i++) {
		if (buttonGroup[i].checked) {
			return i
		}
	}
	return "none"
}


// this joins the radio button value and the textbox value together with a - between
function findwebsite2(form) {
// first find which button selected
var i = getSelectedButton(form.findwebsite);
if (i !="none" && i == 0 ) {
// concatonate all the values
if (form.searchengine.value.length > 2) {
form.findwebsite[i].value = (form.findwebsite[i].value + "  -  " + form.searchengine.value);
form.searchengine.value = "" ;
form.searchengine.name = "" ;
	}
if (form.otherfindwebsite.value.length > 2) {
form.findwebsite[i].value = (form.findwebsite[i].value + "  -  " + form.otherfindwebsite.value);
form.otherfindwebsite.value = "" ;
form.otherfindwebsite.name = "" ;
	}
if (form.anothersite.value.length > 2) {
form.findwebsite[i].value = (form.findwebsite[i].value + "  -  " + form.anothersite.value);
form.anothersite.value = "" ;
form.anothersite.name = "" ;
	}
   }
}

function officechoiceother(form) {
  if ((form.office.value == "Other") &&
  (form.otheroffice.value == "")){
			form.otheroffice.title = "Please give the name of \n the office where you work.";
			form.otheroffice.style.background = "#fff8dd" ;
			form.otheroffice.focus();
	              alert("Please give the name of \n the office where you work.");
			return false;
	}
	 else {
	form.otheroffice.title = "";
	 form.otheroffice.style.background = "#fff" ;
   return true;
  	}
}

function searchengine(form) {
  if ((form.findwebsite[0].checked == true) &&
  (form.searchengine.value == "")){
			form.searchengine.title = "Please give the name of \n the office where you work.";
			form.searchengine.style.background = "#fff8dd" ;
			form.searchengine.focus();
	              alert("Please give the name of \n the searchengine.");
			return false;			
	}
	 else {
	form.searchengine.title = "";
	 form.searchengine.style.background = "#fff" ;
   return true;
  	}
}

function anothersite(form) {
  if ((form.findwebsite[1].checked == true) &&
  (form.anothersite.value == "")){
			form.anothersite.title = "Please give the name of \n the site you linked from.";
			form.anothersite.style.background = "#fff8dd" ;
			form.anothersite.focus();
	              alert("Please give the name of \n the site you linked from");
			return false;			
	}
	 else {
	form.anothersite.title = "";
	 form.anothersite.style.background = "#fff" ;
   return true;
  	}
}

function otherfindwebsite(form) {
  if ((form.findwebsite[4].checked == true) &&
  (form.otherfindwebsite.value == "")){
			form.otherfindwebsite.title = "Please tell us how  \n you found our site.";
			form.otherfindwebsite.style.background = "#fff8dd" ;
			form.otherfindwebsite.focus();
	              alert("Please tell us how  \n you found our site");
			return false;			
	}
	 else {
	form.otherfindwebsite.title = "";
	 form.otherfindwebsite.style.background = "#fff" ;
   return true;
  	}
}

function feedbackcontactname(form) {
  if ((form.feedbackcontact.checked == true) &&
  (form.personname.value == "")){
			form.personname.title = "Please tell us  \n your name and email address.";
			form.personname.style.background = "#fff8dd" ;
			form.personname.focus();
	              alert("Please tell us \n your name and email address");
			return false;			
	}
	 else {
	form.personname.title = "";
	 form.personname.style.background = "#fff" ;
   return true;
  	}
}

function feedbackcontactemail(form) {
  if ((form.feedbackcontact.checked == true) &&
  (form.personemail.value == "")){
			form.personemail.title = "Please tell us  \n your email address.";
			form.personemail.style.background = "#fff8dd" ;
			form.personemail.focus();
	              alert("Please tell us \n your email address");
			return false;			
	}
	 else {
	form.personemail.title = "";
	 form.personemail.style.background = "#fff" ;
   return true;
  	}
}

function ratewebsiteOK(form) {
 if (form.ratewebsite[0].checked == false && 
  form.ratewebsite[1].checked == false &&
  form.ratewebsite[2].checked == false &&
  form.ratewebsite[3].checked == false &&
  form.ratewebsite[4].checked == false) {
	document.location ="#ratewebsite" ;
            alert("Please rate the website \n \n Please select one option.");
				return false;
					}
  else {
   return true;
 }
}

function otherusewebsitecheck(form) {
  if ((form.useOther.value == "yes") &&
  ( form.otherusewebsite.value == "")){
			form.otherusewebsite.title = "Please tell us how  \n you found our site.";
			form.otherusewebsite.style.background = "#fff8dd" ;
			form.otherusewebsite.focus();
	              alert("Please tell us what  \n you used the site for");
			return false;			
	}
	 else {
	form.otherusewebsite.title = "";
	 form.otherusewebsite.style.background = "#fff" ;
   return true;
  	}
}


// --->