function validateForm(thisForm){
    var valid = true;
    var str = "";
	if(thisForm.company.value == ""){
		valid = false;
		//alert("Company is a required field.");
		thisForm.company.style.background="#ffcc00";
		str = str + "Company is a required field.\r\n";
	}

	if(thisForm.name.value == ""){
		valid = false;
		//alert("Name is a required field.");
		thisForm.name.style.background="#ffcc00";
        str = str + "Name is a required field.\r\n";
	}

	if(thisForm.address.value == ""){
		valid = false;
		//alert("Address is a required field.");
		thisForm.address.style.background="#ffcc00";
        str = str + "Address is a required field.\r\n";
	}

	if(thisForm.city.value == ""){
		valid = false;
		//alert("City is a required field.");
		thisForm.city.style.background="#ffcc00";
        str = str + "City is a required field.\r\n";
	}

	if(thisForm.postal_code.value == ""){
		valid = false;
		//alert("Postal/Zip Code is a required field.");
		thisForm.postal_code.style.background="#ffcc00";
        str = str + "Postal/Zip is a required field.\r\n";
	}

	if(thisForm.country.value == ""){
		valid = false;
		//alert("Country is a required field.");
		thisForm.country.style.background="#ffcc00";
        str = str + "Country is a required field.\r\n";
	}

	if(thisForm.province_state.value == ""){
		valid = false;
		//alert("Province/State is a required field.");
		thisForm.province_state.style.background="#ffcc00";
        str = str + "Province/State is a required field.\r\n";
	}

	if(thisForm.email.value == ""){
		valid = false;
		//alert("Email address is a required field.");
		thisForm.email.style.background="#ffcc00";
        str = str + "Email address is a required field.\r\n";
	}else{
		// validate email
		if (thisForm.email.value.search("@") == -1 || thisForm.email.value.search("[.*]") == -1){ 
			str = str + 'Email address is an invalid format.\r\n';
			valid = false;
		}

		// validate emailConf
		if (thisForm.email2.value.search("@") == -1 || thisForm.email2.value.search("[.*]") == -1){ 
			str = str + 'Email confirmation address is an invalid format.\r\n';
			valid = false;
		}

		if(thisForm.email.value != thisForm.email2.value){
			str = str + 'Email addresses do not match. \r\n Please make sure you enter the same email address twice.\r\n';
			valid = false;
		}
	}
	alert(str);
    return valid;
}