sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function FormValidationContact(ContactForm) {
									
		//Name
	   if(ContactForm.fname.value == "") {
				alert("Please enter your name.");
				ContactForm.fname.focus();
				return (false);
			}

		//Email
	   if(ContactForm.emailaddress.value == "") {
				alert("Please enter your Email address.");
				ContactForm.emailaddress.focus();
				return (false);
			}

		//Email
	  if ((ContactForm.emailaddress.value.indexOf('@') < 1) || (ContactForm.emailaddress.value.indexOf('.') <= 2)) {
				alert("Please enter a valid Email address.");
				ContactForm.emailaddress.focus();
				return (false);
			}


        //Telephone
	   if(ContactForm.telephone.value == "") {
				alert("Please enter your Telephone number.");
				ContactForm.telephone.focus();
				return (false);
			}

			//Captcha verification
if(ContactForm.recaptcha_response_field.value == "") {
				alert("Please enter the captcha verification words.");
				ContactForm.recaptcha_response_field.focus();
				return (false);
			}
              
		                                
}


function FormValidationContractorInterest(ContractorInterestForm) {
									
		//Name
	   if(ContractorInterestForm.fname.value == "") {
				alert("Please enter your name.");
				ContractorInterestForm.fname.focus();
				return (false);
			}

		//Email
	   if(ContractorInterestForm.emailaddress.value == "") {
				alert("Please enter your Email address.");
				ContractorInterestForm.emailaddress.focus();
				return (false);
			}



		//Email
	  if ((ContractorInterestForm.emailaddress.value.indexOf('@') < 1) || (ContractorInterestForm.emailaddress.value.indexOf('.') <= 2)) {
				alert("Please enter a valid Email address.");
				ContractorInterestForm.emailaddress.focus();
				return (false);
			}


		//Business
	   if(ContractorInterestForm.title.value == "") {
				alert("Please enter your business information.");
				ContractorInterestForm.title.focus();
				return (false);
			}


	   //Type of work
	   if ((ContractorInterestForm.refrigeration.checked == false) && (ContractorInterestForm.lighting.checked == false)  && (ContractorInterestForm.hvac.checked == false)  && (ContractorInterestForm.food.checked == false)  && (ContractorInterestForm.computer.checked == false)  && (ContractorInterestForm.other.checked == false))
	   {
		   alert("Please select a type of work.");
			ContractorInterestForm.refrigeration.focus();
		   return (false);
	   }

	   //If Other is selected
	   if (ContractorInterestForm.other.checked == true)
	   {

			 if(ContractorInterestForm.otherservice.value == "") {
				alert("Please specify the Other type of service.");
				ContractorInterestForm.otherservice.focus();
				return (false);
			}


	   }


        //Telephone
	   if(ContractorInterestForm.telephone.value == "") {
				alert("Please enter your Telephone number.");
				ContractorInterestForm.telephone.focus();
				return (false);
			}
              
		
		//Captcha verification
if(ContractorInterestForm.recaptcha_response_field.value == "") {
				alert("Please enter the captcha verification words.");
				ContractorInterestForm.recaptcha_response_field.focus();
				return (false);
			}

                        
}


